/* ═══════════════════════════════════════════
   M-Neural Design System
   neural.marpeap.com — Marpeap Digitals
   ═══════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Backgrounds */
    --bg-base:     #07090F;
    --bg-surface:  #0C0F1A;
    --bg-elevated: #111726;
    --bg-alt:      #090C16;

    /* M-Neural accent — electric blue */
    --accent:        #5B8BFF;
    --accent-hover:  #4A7CF0;
    --accent-dim:    rgba(91, 139, 255, 0.10);
    --accent-border: rgba(91, 139, 255, 0.20);

    /* Marpeap brand gold — brand anchor color, mirrors marpeap.com identity */
    --brand-gold:        #D4B87A;
    --brand-gold-dim:    rgba(212, 184, 122, 0.08);
    --brand-gold-border: rgba(212, 184, 122, 0.18);

    /* Borders */
    --border:        rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.12);

    /* Text */
    --text-1: #EDF0F7;
    --text-2: rgba(237, 240, 247, 0.68);
    --text-3: rgba(237, 240, 247, 0.42);
    --text-4: rgba(237, 240, 247, 0.24);

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body:    'DM Sans', sans-serif;
    --font-mono:    'JetBrains Mono', monospace;

    /* Widths */
    --max-content: 72rem;
    --max-wide:    84rem;

    /* Easing */
    --ease-out: cubic-bezier(0.33, 1, 0.68, 1);

    /* Status */
    --success: #0DD9A4;
    --danger:  #FF5A5A;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    text-rendering: optimizeLegibility;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-1);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ── Utilities ── */
.container {
    max-width: var(--max-content);
    margin: 0 auto;
    padding: 0 1.5rem;
}
.container-wide {
    max-width: var(--max-wide);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ══════════════════════════════
   NAVBAR
   ══════════════════════════════ */
.n-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 0 1.5rem;
}
.n-nav-inner {
    max-width: var(--max-wide);
    margin: 0 auto;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, background 0.3s ease, backdrop-filter 0.3s ease;
}
.n-nav.scrolled .n-nav-inner {
    border-color: var(--border);
    background: rgba(7, 9, 15, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.n-logo-group {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    margin-right: 0.5rem;
}
.n-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.n-logo-mark {
    width: 28px;
    height: 28px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
.n-logo-text {
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.02em;
}
.n-logo-sub {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    color: var(--brand-gold);
    opacity: 0.9;
    letter-spacing: 0.04em;
    margin-left: 6px;
    transition: opacity 0.15s ease;
}
a.n-logo-sub:hover { opacity: 1; }

.n-nav-links {
    display: flex;
    gap: 0;
    list-style: none;
    margin-left: auto;
}
.n-nav-links a {
    display: block;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    color: var(--text-2);
    text-decoration: none;
    transition: color 0.18s ease;
    font-weight: 400;
}
.n-nav-links a:hover { color: var(--text-1); }

.n-nav-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: 1rem;
    flex-shrink: 0;
}

/* ══════════════════════════════
   BUTTONS
   ══════════════════════════════ */
.btn-ghost {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-2);
    text-decoration: none;
    background: none;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    font-family: var(--font-body);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}
.btn-ghost:hover {
    color: var(--text-1);
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.04);
}

.btn-primary {
    padding: 0.5rem 1.125rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: var(--accent);
    border: none;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.15s ease;
    font-family: var(--font-body);
    letter-spacing: -0.01em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    box-sizing: border-box;
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}
.btn-primary:active {
    transform: translateY(0);
    filter: brightness(0.93);
}

.btn-primary-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    border-radius: 0.625rem;
}
.btn-ghost-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    border-radius: 0.625rem;
}

/* ══════════════════════════════
   HERO
   ══════════════════════════════ */
.n-hero {
    padding-top: 140px;
    padding-bottom: 72px;
    position: relative;
    overflow: hidden;
}
.n-hero::before {
    content: '';
    position: absolute;
    top: -15%;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 620px;
    background:
        radial-gradient(ellipse 55% 50% at 38% 45%, rgba(91, 139, 255, 0.085) 0%, transparent 62%),
        radial-gradient(ellipse 48% 42% at 66% 36%, rgba(212, 184, 122, 0.055) 0%, transparent 58%);
    pointer-events: none;
}

.n-hero-inner {
    text-align: center;
    position: relative;
    z-index: 1;
}

.n-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--brand-gold);
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--brand-gold-dim);
    border: 1px solid var(--brand-gold-border);
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}
.n-hero-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-gold);
    animation: n-pulse 2s ease infinite;
    flex-shrink: 0;
}
@keyframes n-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.75); }
}

.n-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5.5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.04;
    color: var(--text-1);
    max-width: 18ch;
    margin: 0 auto 1.25rem;
}
.n-hero-title em {
    font-style: normal;
    color: var(--accent);
}

.n-hero-sub {
    font-size: clamp(1rem, 1.5vw, 1.0625rem);
    color: var(--text-2);
    max-width: 50ch;
    margin: 0 auto 2.25rem;
    line-height: 1.58;
    font-weight: 400;
}

.n-hero-ctas {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

/* Code block visual */
.n-code-window {
    max-width: 580px;
    margin: 0 auto;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    text-align: left;
}
.n-code-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}
.n-code-dots {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}
.n-code-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.n-code-dots span:nth-child(1) { background: rgba(255, 95, 87, 0.5); }
.n-code-dots span:nth-child(2) { background: rgba(255, 189, 46, 0.5); }
.n-code-dots span:nth-child(3) { background: rgba(39, 201, 63, 0.5); }
.n-code-file {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-3);
    margin-left: 0.5rem;
}
.n-code-body {
    padding: 1.375rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.75;
    color: var(--text-2);
}
.ct { color: #7FBEFD; }
.ca { color: #A5D6A7; }
.cv { color: #FFCC80; }
.cc { color: var(--text-4); font-style: italic; }

/* ══════════════════════════════
   MARQUEE STRIP
   ══════════════════════════════ */
.n-marquee-strip {
    padding: 1.125rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-alt);
    overflow: hidden;
}
.n-marquee-track {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    min-width: 200%;
    animation: marquee-scroll 32s linear infinite;
    -webkit-animation: marquee-scroll 32s linear infinite;
    will-change: transform;
}
.n-marquee-track:hover { animation-play-state: paused; }
.n-marquee-content {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
    gap: 1.125rem;
    padding: 0 1.125rem;
}
.n-mw {
    font-size: 0.8125rem;
}
.n-mw.brand {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.75rem;
}
.n-mw.client {
    font-family: var(--font-body);
    font-weight: 300;
    font-style: italic;
    color: var(--text-3);
    font-size: 0.8125rem;
}
.n-ms {
    color: var(--accent);
    opacity: 0.22;
    font-size: 0.6875rem;
    flex-shrink: 0;
}
@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .n-marquee-track { animation: none; }
}

/* ══════════════════════════════
   SECTION TYPOGRAPHY
   ══════════════════════════════ */
.n-section-tag {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    opacity: 0.85;
}
.n-section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.07;
    color: var(--text-1);
    margin-bottom: 1rem;
}
.n-section-sub {
    font-size: 1rem;
    color: var(--text-2);
    line-height: 1.58;
    max-width: 52ch;
}

/* ══════════════════════════════
   HOW IT WORKS
   ══════════════════════════════ */
.n-how {
    padding: 6rem 0;
    background: var(--bg-surface);
}
.n-how-header {
    text-align: center;
    margin-bottom: 4rem;
}
.n-how-header .n-section-sub { margin: 0 auto; }

.n-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: var(--border);
    border-radius: 16px;
    overflow: hidden;
}
.n-step {
    background: var(--bg-surface);
    padding: 2rem 1.75rem;
}
.n-step-num {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--accent);
    opacity: 0.55;
    margin-bottom: 1.25rem;
    letter-spacing: 0.05em;
}
.n-step-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.125rem;
}
.n-step-icon svg { width: 18px; height: 18px; color: var(--accent); }
.n-step-title {
    font-family: var(--font-heading);
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-1);
    margin-bottom: 0.5rem;
}
.n-step-desc {
    font-size: 0.875rem;
    color: var(--text-2);
    line-height: 1.58;
}

/* ══════════════════════════════
   FEATURES BENTO
   ══════════════════════════════ */
.n-features {
    padding: 6rem 0;
}
.n-features-header { margin-bottom: 3rem; }

.n-bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 12px;
}
.n-bento-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s var(--ease-out);
}
.n-bento-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}
.n-bento-card.col-7  { grid-column: span 7; }
.n-bento-card.col-5  { grid-column: span 5; }
.n-bento-card.col-4  { grid-column: span 4; }
.n-bento-card.col-6  { grid-column: span 6; }
.n-bento-card.col-12 { grid-column: span 12; }

.n-bento-card.featured {
    background:
        radial-gradient(ellipse 85% 70% at 10% 15%, rgba(91, 139, 255, 0.11) 0%, transparent 55%),
        var(--bg-surface);
    border-color: var(--accent-border);
}
.n-bento-card.featured:hover { border-color: rgba(91, 139, 255, 0.35); }

.n-bento-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.n-bento-icon svg { width: 16px; height: 16px; color: var(--accent); }

.n-bento-title {
    font-family: var(--font-heading);
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-1);
    margin-bottom: 0.4rem;
}
.n-bento-desc {
    font-size: 0.875rem;
    color: var(--text-2);
    line-height: 1.52;
}
.n-bento-large-title {
    font-family: var(--font-heading);
    font-size: clamp(1.375rem, 2.5vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-1);
    margin-bottom: 0.625rem;
    line-height: 1.12;
}

/* Bento color variants */
.n-bento-card.teal {
    background:
        radial-gradient(ellipse 70% 55% at 15% 20%, rgba(13, 217, 164, 0.09) 0%, transparent 52%),
        var(--bg-surface);
}
.n-bento-card.warm {
    background:
        radial-gradient(ellipse 70% 55% at 15% 20%, rgba(255, 189, 46, 0.07) 0%, transparent 52%),
        var(--bg-surface);
}
.n-bento-card.violet {
    background:
        radial-gradient(ellipse 70% 55% at 15% 20%, rgba(162, 107, 255, 0.08) 0%, transparent 52%),
        var(--bg-surface);
}

/* Mini code snippet inside bento */
.n-mini-code {
    margin-top: 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.65;
    color: var(--text-3);
}

/* ══════════════════════════════
   PRICING
   ══════════════════════════════ */
.n-pricing {
    padding: 6rem 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(91, 139, 255, 0.055) 0%, transparent 65%),
        var(--bg-alt);
}
.n-pricing-header {
    text-align: center;
    margin-bottom: 3rem;
}
.n-pricing-header .n-section-sub { margin: 0 auto; }

.n-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

.n-pricing-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color 0.2s ease;
}
.n-pricing-card.featured {
    border-color: var(--accent-border);
    background:
        radial-gradient(ellipse 110% 70% at 50% -10%, rgba(91, 139, 255, 0.08) 0%, transparent 60%),
        var(--bg-surface);
}

.n-plan-badge {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.5875rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 3px 10px;
    white-space: nowrap;
}

.n-plan-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-1);
    letter-spacing: -0.01em;
    margin-bottom: 0.2rem;
}
.n-plan-tagline {
    font-size: 0.8125rem;
    color: var(--text-3);
    margin-bottom: 1.5rem;
}

.n-plan-price {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.035em;
    color: var(--text-1);
    line-height: 1;
    margin-bottom: 0.2rem;
}
.n-plan-price sup {
    font-size: 1.125rem;
    font-weight: 600;
    vertical-align: super;
    letter-spacing: 0;
}
.n-plan-price span {
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--text-3);
    letter-spacing: 0;
}
.n-plan-price-text {
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    padding-top: 0.35rem;
}
.n-plan-period {
    font-size: 0.8125rem;
    color: var(--text-3);
    margin-bottom: 1.5rem;
}

.n-plan-divider {
    height: 1px;
    background: var(--border);
    margin-bottom: 1.5rem;
}

.n-plan-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-bottom: 1.75rem;
    flex-grow: 1;
}
.n-plan-features li {
    font-size: 0.8125rem;
    color: var(--text-2);
    padding-left: 1.25rem;
    position: relative;
}
.n-plan-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.5;
}
.n-plan-features li.off {
    color: var(--text-4);
}
.n-plan-features li.off::before {
    background: var(--text-4);
    opacity: 0.4;
}

.btn-plan {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.7rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease, color 0.18s ease;
    font-family: var(--font-body);
    box-sizing: border-box;
    cursor: pointer;
}
.btn-plan-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-1);
    border: 1px solid var(--border-strong);
}
.btn-plan-ghost:hover {
    background: rgba(255, 255, 255, 0.09);
    transform: translateY(-1px);
}
.btn-plan-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-plan-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* ══════════════════════════════
   FAQ
   ══════════════════════════════ */
.n-faq-section {
    padding: 5rem 0;
}
.n-faq-wrap {
    max-width: 680px;
    margin: 0 auto;
}
.n-faq-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-1);
    margin-bottom: 2.5rem;
}
.n-faq-item {
    border-bottom: 1px solid var(--border);
}
.n-faq-q {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 1.125rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-1);
    text-align: left;
}
.n-faq-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--text-3);
    transition: transform 0.25s var(--ease-out), color 0.2s ease;
}
.n-faq-item.open .n-faq-icon {
    transform: rotate(45deg);
    color: var(--accent);
}
.n-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease-out);
}
.n-faq-item.open .n-faq-a { max-height: 240px; }
.n-faq-a p {
    font-size: 0.875rem;
    color: var(--text-2);
    line-height: 1.65;
    padding-bottom: 1.25rem;
}

/* ══════════════════════════════
   CTA FINAL
   ══════════════════════════════ */
.n-cta-final {
    padding: 6rem 0;
    text-align: center;
    background:
        radial-gradient(ellipse 50% 60% at 50% 50%, rgba(91, 139, 255, 0.065) 0%, transparent 68%),
        radial-gradient(ellipse 36% 38% at 50% 85%, rgba(212, 184, 122, 0.042) 0%, transparent 60%);
    border-top: 1px solid var(--border);
}
.n-cta-final .n-section-title {
    max-width: 26ch;
    margin: 0 auto 1rem;
}
.n-cta-final .n-section-sub {
    margin: 0 auto 2.5rem;
}
.n-cta-note {
    margin-top: 1.125rem;
    font-size: 0.8125rem;
    color: var(--text-4);
}

/* ══════════════════════════════
   FOOTER
   ══════════════════════════════ */
.n-footer {
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--border);
}
.n-footer-inner {
    max-width: var(--max-wide);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.n-footer-brand {
    font-size: 0.8125rem;
    color: var(--text-3);
}
.n-footer-brand a {
    color: var(--brand-gold);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.15s ease;
}
.n-footer-brand a:hover { opacity: 1; }
.n-footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}
.n-footer-links a {
    font-size: 0.8125rem;
    color: var(--text-3);
    text-decoration: none;
    transition: color 0.15s ease;
}
.n-footer-links a:hover { color: var(--text-2); }

/* ══════════════════════════════
   AUTH PAGE
   ══════════════════════════════ */
.n-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    position: relative;
}
.n-auth-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 50% 55% at 50% 20%, rgba(91, 139, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.n-auth-back {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-3);
    text-decoration: none;
    transition: color 0.15s ease;
    z-index: 10;
}
.n-auth-back:hover { color: var(--text-2); }
.n-auth-back svg { width: 14px; height: 14px; }

.n-auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.25rem 2rem;
    position: relative;
    z-index: 1;
}
.n-auth-logo {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.n-auth-logo .n-logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 0.6875rem;
}

.n-auth-tabs {
    display: flex;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 1.75rem;
    gap: 2px;
}
.n-auth-tab {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-3);
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
    user-select: none;
}
.n-auth-tab.active {
    color: var(--text-1);
    background: var(--bg-elevated);
}

.n-form-group { margin-bottom: 0.875rem; }
.n-form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 0.375rem;
}
.n-form-input {
    width: 100%;
    padding: 0.65rem 0.875rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-1);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    outline: none;
    box-sizing: border-box;
}
.n-form-input:focus {
    border-color: var(--accent-border);
    box-shadow: 0 0 0 3px rgba(91, 139, 255, 0.10);
}
.n-form-input::placeholder { color: var(--text-4); }

.n-form-submit {
    width: 100%;
    margin-top: 1.25rem;
    padding: 0.75rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0.625rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.15s ease, opacity 0.18s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
    box-sizing: border-box;
    letter-spacing: -0.01em;
}
.n-form-submit:hover { background: var(--accent-hover); transform: translateY(-1px); }
.n-form-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.n-form-link {
    font-size: 0.8125rem;
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.15s ease;
}
.n-form-link:hover { opacity: 0.8; }

.n-auth-msg {
    margin-top: 1rem;
    padding: 0.75rem 0.875rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    display: none;
    line-height: 1.5;
}
.n-auth-msg.show { display: block; }
.n-auth-msg.error {
    background: rgba(255, 90, 90, 0.08);
    border: 1px solid rgba(255, 90, 90, 0.2);
    color: var(--danger);
}
.n-auth-msg.success {
    background: rgba(13, 217, 164, 0.08);
    border: 1px solid rgba(13, 217, 164, 0.2);
    color: var(--success);
}

.n-auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-3);
}

.n-panel-hidden { display: none; }

/* ══════════════════════════════
   DASHBOARD (APP)
   ══════════════════════════════ */
.n-app {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-base);
}

/* Sidebar */
.n-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}
.n-sidebar-logo {
    padding: 1.125rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    flex-shrink: 0;
}
.n-sidebar-nav {
    flex: 1;
    padding: 0.625rem 0.5rem;
    overflow-y: auto;
}
.n-sidebar-section {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-4);
    padding: 0.625rem 0.625rem 0.25rem;
    margin-top: 0.375rem;
}
.n-sidebar-section:first-child { margin-top: 0; }

.n-nav-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.625rem;
    border-radius: 7px;
    color: var(--text-2);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    transition: color 0.15s ease, background 0.15s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-body);
    line-height: 1;
}
.n-nav-item svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.65; transition: opacity 0.15s ease; }
.n-nav-item:hover { color: var(--text-1); background: rgba(255, 255, 255, 0.04); }
.n-nav-item:hover svg { opacity: 0.9; }
.n-nav-item.active { color: var(--text-1); background: rgba(91, 139, 255, 0.10); font-weight: 500; }
.n-nav-item.active svg { opacity: 1; color: var(--accent); }

.n-sidebar-footer {
    padding: 0.625rem 0.5rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.n-user-block {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.625rem;
    border-radius: 7px;
    transition: background 0.15s ease;
    cursor: pointer;
}
.n-user-block:hover { background: rgba(255, 255, 255, 0.04); }
.n-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
    text-transform: uppercase;
}
.n-user-info { flex: 1; min-width: 0; }
.n-user-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.n-user-plan {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    color: var(--accent);
    opacity: 0.65;
    letter-spacing: 0.04em;
}

/* Main content */
.n-main {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.n-topbar {
    height: 54px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    flex-shrink: 0;
    background: var(--bg-base);
    position: sticky;
    top: 0;
    z-index: 10;
}
.n-topbar-title {
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-1);
    letter-spacing: -0.015em;
}
.n-topbar-actions {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.n-content {
    padding: 1.75rem 1.5rem;
    flex: 1;
}

/* Stats row */
.n-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 1.25rem;
}
.n-stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.125rem 1.25rem;
}
.n-stat-label { font-size: 0.75rem; color: var(--text-3); margin-bottom: 0.375rem; }
.n-stat-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-1);
    line-height: 1;
    margin-bottom: 0.2rem;
}
.n-stat-sub { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-3); }

/* Cards */
.n-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.375rem;
    margin-bottom: 1rem;
}
.n-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}
.n-card-title {
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text-1);
}
.n-card-sub { font-size: 0.8125rem; color: var(--text-3); margin-top: 0.15rem; }

/* Badges */
.n-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-family: var(--font-mono);
    font-size: 0.5875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}
.n-badge-inactive { background: rgba(255,255,255,0.06); color: var(--text-3); border: 1px solid var(--border); }
.n-badge-active   { background: rgba(13,217,164,0.08); color: var(--success); border: 1px solid rgba(13,217,164,0.2); }
.n-badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

/* Empty setup state */
.n-setup {
    text-align: center;
    padding: 2.5rem 2rem;
}
.n-setup-icon {
    width: 52px;
    height: 52px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}
.n-setup-icon svg { width: 22px; height: 22px; color: var(--accent); }
.n-setup-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-1);
    margin-bottom: 0.5rem;
}
.n-setup-desc {
    font-size: 0.875rem;
    color: var(--text-2);
    max-width: 34ch;
    margin: 0 auto 1.5rem;
    line-height: 1.55;
}

/* Two column */
.n-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Upload */
.n-upload-area {
    border: 1.5px dashed var(--border-strong);
    border-radius: 10px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
    margin-bottom: 1rem;
}
.n-upload-area:hover {
    border-color: var(--accent-border);
    background: rgba(91, 139, 255, 0.04);
}
.n-upload-icon { width: 30px; height: 30px; color: var(--text-3); margin: 0 auto 0.75rem; }
.n-upload-title { font-size: 0.875rem; color: var(--text-2); font-weight: 500; margin-bottom: 0.25rem; }
.n-upload-sub { font-size: 0.75rem; color: var(--text-3); }
.n-file-input { display: none; }

/* Document list */
.n-doc-list { display: flex; flex-direction: column; gap: 0.5rem; }
.n-doc-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 9px;
}
.n-doc-icon {
    width: 28px; height: 28px;
    background: var(--accent-dim);
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.n-doc-icon svg { width: 13px; height: 13px; color: var(--accent); }
.n-doc-name { font-size: 0.8125rem; color: var(--text-1); font-weight: 400; }
.n-doc-meta { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-3); margin-top: 1px; }
.n-doc-del {
    margin-left: auto;
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px;
    background: none;
    border: 1px solid transparent;
    color: var(--text-3);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.n-doc-del:hover { background: rgba(255,90,90,0.08); color: var(--danger); border-color: rgba(255,90,90,0.2); }
.n-doc-del svg { width: 12px; height: 12px; }

/* Embed code */
.n-embed-code {
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 1rem;
}
.n-embed-bar {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
}
.n-embed-label { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-3); }
.n-embed-copy {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    transition: opacity 0.15s ease;
    padding: 0;
}
.n-embed-copy:hover { opacity: 0.75; }
.n-embed-copy svg { width: 12px; height: 12px; }
.n-embed-pre {
    padding: 1rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.75;
    color: var(--text-2);
    overflow-x: auto;
    margin: 0;
    white-space: pre;
}

/* Tabs */
.n-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
    gap: 0;
}
.n-tab {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--text-3);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-weight: 400;
    background: none;
    border-top: none; border-left: none; border-right: none;
    font-family: var(--font-body);
    transition: color 0.15s ease, border-color 0.15s ease;
}
.n-tab:hover:not(.active) { color: var(--text-2); }
.n-tab.active { color: var(--text-1); border-bottom-color: var(--accent); font-weight: 500; }

.n-tab-panel { display: none; }
.n-tab-panel.active { display: block; }

/* Form inline */
.n-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}
.n-settings-row:last-child { border-bottom: none; }
.n-settings-label { font-size: 0.875rem; color: var(--text-1); font-weight: 500; }
.n-settings-desc { font-size: 0.8125rem; color: var(--text-3); margin-top: 0.125rem; }

/* Toggle */
.n-toggle {
    position: relative;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}
.n-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.n-toggle-track {
    position: absolute;
    inset: 0;
    background: var(--border-strong);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.n-toggle input:checked + .n-toggle-track { background: var(--accent); }
.n-toggle-track::before {
    content: '';
    position: absolute;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #fff;
    top: 3px; left: 3px;
    transition: transform 0.2s var(--ease-out);
}
.n-toggle input:checked + .n-toggle-track::before { transform: translateX(16px); }

/* Danger zone */
.n-danger-zone {
    border: 1px solid rgba(255,90,90,0.2);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-top: 1.5rem;
    background: rgba(255,90,90,0.03);
}
.n-danger-title { font-size: 0.875rem; font-weight: 600; color: var(--danger); margin-bottom: 0.25rem; }
.n-danger-desc { font-size: 0.8125rem; color: var(--text-3); margin-bottom: 0.875rem; }
.btn-danger {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--danger);
    background: rgba(255,90,90,0.08);
    border: 1px solid rgba(255,90,90,0.2);
    cursor: pointer;
    font-family: var(--font-body);
    transition: background 0.18s ease;
}
.btn-danger:hover { background: rgba(255,90,90,0.15); }

/* Notification toast */
.n-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--text-1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    z-index: 9999;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s var(--ease-out), opacity 0.3s ease;
    pointer-events: none;
}
.n-toast.show { transform: translateY(0); opacity: 1; }

/* ══════════════════════════════
   RESPONSIVE
   ══════════════════════════════ */
@media (max-width: 1024px) {
    .n-bento-card.col-7, .n-bento-card.col-5 { grid-column: span 12; }
    .n-bento-card.col-4, .n-bento-card.col-6 { grid-column: span 6; }
    .n-stats { grid-template-columns: repeat(2, 1fr); }
    .n-two-col { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .n-pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
    .n-steps { grid-template-columns: 1fr; }
    .n-bento-card.col-4, .n-bento-card.col-6 { grid-column: span 12; }
}
@media (max-width: 768px) {
    .n-nav-links { display: none; }
    .n-sidebar { display: none; }
    .n-app { flex-direction: column; }
    .n-hero { padding-top: 120px; }
}
@media (max-width: 520px) {
    .n-stats { grid-template-columns: 1fr 1fr; }
    .n-hero-title { font-size: clamp(2rem, 9vw, 2.5rem); }
}
