/* =============================================
   DESIGN TOKENS
   Aligned with Spectra app design system.
   See frontend/STYLE_GUIDE.md for full reference.
   ============================================= */
:root {
    /* ── Brand primary ── */
    --brand: #1a2634;           /* dark navy — footer, roadmap bg */
    --brand-light: #2c3e50;     /* ui.main — buttons, logo, links */
    --brand-hover: #223344;     /* ui.mainDark — hover state */
    --brand-active: #16222e;    /* ui.mainDarker — pressed state */
    --brand-tint: #e8ecf0;      /* ui.mainTint — highlight backgrounds */

    /* ── Status: Blue — Steel Blue #3580a8 ── */
    --blue-50:  #e8f2f8;
    --blue-100: #d0e5f1;
    --blue-500: #3580a8;        /* replaces bright #3b82f6 */
    --blue-600: #245472;

    /* ── Status: Red — Deep Red #8f3030 ── */
    --red-50:  #f5e8e8;
    --red-500: #8f3030;
    --red-600: #6e2222;

    /* ── Status: Amber — #a86826 ── */
    --amber-50:  #f5ece3;
    --amber-500: #a86826;
    --amber-600: #6e4218;

    /* ── Status: Green — Pine Green #2e855c ── */
    --green-50:  #e4f2eb;
    --green-400: #3d9168;       /* replaces bright #4ade80 */
    --green-500: #2e855c;
    --green-600: #1a5236;

    /* ── Status: Purple — Slate Purple #634f90 ── */
    --purple-50:  #eeebf5;
    --purple-500: #634f90;
    --purple-600: #3e3060;

    /* ── Surfaces ── */
    --off-white: #f4f6f8;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* ── Layout ── */
    --nav-height: 3.5rem;
    --section-height: 100dvh;
    --bg-letter-size: 28vw;
    --content-max: 72rem;
    --content-narrow: 48rem;

    /* ── Typography ── */
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'Space Mono', 'Menlo', monospace;

    /* ── Shadows ── */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.15);
}

@supports not (height: 100dvh) {
    :root { --section-height: 100vh; }
}


/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: var(--font-body);
    color: var(--gray-700);
    background: var(--off-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Desktop: lock body only on landing page so the snap container handles scroll */
@media (min-width: 768px) {
    body.landing-page { height: 100%; overflow: hidden; }
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }


/* =============================================
   ACCESSIBILITY
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .scroll-container { scroll-snap-type: none !important; }
}


/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
    text-decoration: none;
}
.btn-primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 4px 14px rgba(26, 38, 52, 0.2);
}
.btn-primary:hover { background: var(--brand-light); }
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.8rem; }
.btn-md { padding: 0.75rem 1.5rem; font-size: 0.9rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }

@media (min-width: 768px) {
    .btn-md { padding: 0.75rem 2rem; }
    .btn-lg { padding: 0.85rem 2.5rem; }
}
.btn-outline {
    background: transparent;
    border: 2px solid rgba(26, 38, 52, 0.15);
    color: var(--brand);
}
.btn-outline:hover { background: rgba(26, 38, 52, 0.04); }


/* =============================================
   NAVIGATION
   ============================================= */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 100;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
}
.nav-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    gap: 0.5rem;
}
.nav-logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1rem;
    color: var(--brand);
    flex-shrink: 0;
    letter-spacing: -0.03em;
    text-decoration: none;
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
.nav-social {
    color: var(--gray-400);
    transition: color 0.2s;
    text-decoration: none;
}
.nav-social:hover { color: var(--brand); }

/* Desktop text links */
.nav-links {
    display: none;
    align-items: center;
    gap: 1.5rem;
}
.nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-500);
    transition: color 0.2s;
    text-decoration: none;
}
.nav-link:hover { color: var(--brand); }

/* Show text links on desktop */
@media (min-width: 768px) {
    .nav-links { display: flex; }
    .nav-inner { padding: 0 2rem; }
    .nav-logo { font-size: 1.1rem; }
}


/* ── Letter Nav ── */
.letter-nav {
    display: flex;
    align-items: center;
    gap: 0.125rem;
}
.nav-letter {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-weight: 700;
    font-size: 1rem;
    color: var(--gray-400);
    opacity: 0.4;
    transform: scale(0.9);
    transition: all 0.25s ease;
    min-width: 2.5rem;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
}
.nav-letter:hover { opacity: 0.65; }
.nav-letter.active {
    opacity: 1;
    transform: scale(1.15);
    color: var(--brand);
    font-weight: 800;
}


/* ── Hamburger button ── */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 2.25rem;
    height: 2.25rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 0.375rem;
    -webkit-tap-highlight-color: transparent;
}
.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--brand);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Hide hamburger on desktop */
@media (min-width: 768px) {
    .hamburger { display: none; }
}


/* ── Mobile drawer ── */
.mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 99;
    pointer-events: none;
    visibility: hidden;
}
.mobile-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
}

.drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-drawer.is-open .drawer-overlay { opacity: 1; }

.drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(80vw, 320px);
    height: 100%;
    background: #fff;
    padding: calc(var(--nav-height) + 1.5rem) 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -4px 0 30px rgba(0,0,0,0.1);
}
.mobile-drawer.is-open .drawer-panel { transform: translateX(0); }

.drawer-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.drawer-link {
    display: block;
    padding: 0.85rem 0;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    text-decoration: none;
    transition: color 0.15s;
}
.drawer-link:hover { color: var(--brand); }

.drawer-bottom {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1.5rem;
}
.drawer-social {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--gray-500);
    text-decoration: none;
}


/* ── Mobile nav specifics (default = mobile) ── */
/* Hide logo on mobile landing page so letter nav has room */
body.landing-page .nav-logo { display: none; }
/* Letter nav fills the center on mobile */
.letter-nav { flex: 1; justify-content: center; }
.nav-letter { min-width: 2.25rem; min-height: 2.25rem; font-size: 0.95rem; }
/* Hide social + desktop CTA on mobile (they're in the drawer) */
.nav-social { display: none; }
.nav-cta-desktop { display: none; }

@media (min-width: 768px) {
    body.landing-page .nav-logo { display: block; }
    .letter-nav { flex: initial; justify-content: initial; }
    .nav-letter { font-size: 1.15rem; min-width: 2.75rem; min-height: 2.75rem; }
    .nav-social { display: block; }
    .nav-cta-desktop { display: block; }
}


/* =============================================
   SCROLL SNAP CONTAINER (landing page only)
   ============================================= */
/* Mobile: normal page — body scrolls, no snap container */
.scroll-container { /* intentionally empty on mobile */ }

@media (min-width: 768px) {
    .scroll-container {
        height: var(--section-height);
        overflow-y: scroll;
        scroll-snap-type: y mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
}

@media (min-width: 768px) and (max-height: 500px) {
    .scroll-container { scroll-snap-type: none; }
}

/* Mobile: natural height sections, body scrolls */
.snap-section {
    width: 100%;
    position: relative;
    overflow-x: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: calc(var(--nav-height) + 2.5rem);
    padding-bottom: 3.5rem;
}

/* Desktop: snap into viewport-height sections */
@media (min-width: 768px) {
    .snap-section {
        scroll-snap-align: start;
        min-height: var(--section-height);
        padding-top: var(--nav-height);
        padding-bottom: 0;
        overflow: hidden;
        align-items: center;
    }
}

.snap-section--scrollable {
    overflow-y: auto;
    align-items: flex-start;
}

@media (min-width: 768px) {
    .snap-section--scrollable {
        overflow-y: auto;
        align-items: flex-start;
    }
}

/* Scroll progress bar — desktop only */
.scroll-progress { display: none; }

@media (min-width: 768px) {
    .scroll-progress {
        display: block;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        height: 2px;
        background: var(--brand);
        z-index: 101;
        transition: width 0.12s ease-out;
        width: 0%;
        pointer-events: none;
    }
}


/* =============================================
   SECTION GRID
   ============================================= */
.section-grid {
    max-width: var(--content-max);
    width: 100%;
    padding: 0 1.25rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
    align-items: center;
    position: relative;
    z-index: 1;
}
@media (min-width: 480px) {
    .section-grid { padding: 0 1.5rem; gap: 2rem; }
}

@media (min-width: 768px) {
    .section-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        padding: 2rem 3rem;
    }
}
.section-grid--reversed .section-text  { order: 1; }
.section-grid--reversed .section-media { order: 2; }
@media (min-width: 768px) {
    .section-grid--reversed .section-text  { order: 2; }
    .section-grid--reversed .section-media { order: 1; }
}


/* =============================================
   TYPOGRAPHY — SECTIONS
   ============================================= */
.section-heading {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.1;
    margin: 0 0 0.25rem;
}
.section-heading .accent { color: var(--brand); }
.section-subheading {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--gray-400);
    margin: 0 0 1.25rem;
}
.section-body {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--gray-600);
    margin: 0;
}

@media (min-width: 480px) {
    .section-heading { font-size: 2.5rem; }
    .section-subheading { font-size: 1.15rem; }
}

@media (min-width: 768px) {
    .section-heading { font-size: 3.75rem; }
    .section-subheading { font-size: 1.4rem; }
    .section-body { font-size: 1.1rem; }
}


/* =============================================
   BACKGROUND LETTER
   ============================================= */
.bg-letter {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 45vw;
    font-weight: 900;
    font-family: var(--font-mono);
    color: var(--gray-300);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
    line-height: 1;
}
@media (min-width: 768px) {
    .bg-letter { font-size: 28vw; }
}


/* =============================================
   MOCKUP FRAME
   ============================================= */
.mockup-frame {
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: var(--shadow-xl);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.mockup-frame img {
    max-height: 200px;
    width: 100%;
    object-fit: cover;
}
@media (min-width: 768px) {
    .mockup-frame img { max-height: none; }
    .mockup-frame:hover {
        transform: translateY(-4px);
        box-shadow: 0 32px 60px -12px rgba(0,0,0,0.2);
    }
}


/* =============================================
   FEATURE LIST
   ============================================= */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    color: var(--gray-600);
}
.feature-list i { color: var(--brand); font-size: 0.85rem; }


/* =============================================
   ANIMATIONS
   ============================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.snap-section.in-view .fade-in-up {
    opacity: 1;
    transform: translateY(0);
}
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }


/* =============================================
   HERO
   ============================================= */
.hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.1;
    margin: 0 0 1.25rem;
}
.hero-title .accent { color: var(--brand); }
.hero-acronym { font-weight: 300; color: var(--gray-500); line-height: 1.8; font-size: 0.95rem; }
.hero-acronym strong { font-weight: 700; color: var(--brand); }

.hero-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: rgba(26, 38, 52, 0.08);
    color: var(--brand);
    font-size: 0.7rem;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* Acronym: hidden on small phones to keep hero tight */
@media (max-width: 479px) {
    .hero-acronym { display: none; }
}

/* Full-width CTA buttons on small mobile */
.hero-ctas {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.hero-ctas .btn { width: 100%; justify-content: center; }

@media (min-width: 480px) {
    .hero-title { font-size: 3rem; }
    .hero-acronym { font-size: 1rem; }
    .hero-ctas { flex-direction: row; flex-wrap: wrap; }
    .hero-ctas .btn { width: auto; }
}

@media (min-width: 768px) {
    .hero-title { font-size: 4.5rem; }
    .hero-acronym { font-size: 1.1rem; }
}


/* =============================================
   RESOURCES SECTION (landing page)
   ============================================= */
.resources-inner {
    max-width: var(--content-max);
    width: 100%;
    padding: 2rem 1.25rem;
    z-index: 1;
    position: relative;
}

@media (min-width: 768px) {
    .resources-inner { padding: 3rem; }
}

.resources-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 2rem;
}
@media (min-width: 600px) {
    .resources-grid { grid-template-columns: repeat(3, 1fr); }
}

.resource-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.75rem;
    text-decoration: none;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
}
.resource-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: var(--brand);
}
.resource-card .rc-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: rgba(26, 38, 52, 0.06);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 1rem;
}
.resource-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 0.5rem;
}
.resource-card p {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin: 0 0 1rem;
    line-height: 1.6;
    flex: 1;
}
.resource-card .rc-arrow {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}


/* =============================================
   ROADMAP
   ============================================= */
.roadmap-section {
    background: var(--brand);
    color: #fff;
}
.roadmap-inner {
    max-width: var(--content-narrow);
    margin: 0 auto;
    padding: 2rem 1.5rem 2rem;
    width: 100%;
}

@media (min-width: 768px) {
    .roadmap-inner { padding-top: 4rem; }
}
.roadmap-step { display: flex; gap: 1rem; }
.roadmap-dot {
    flex-shrink: 0;
    width: 2rem; height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}
.roadmap-line {
    width: 2px;
    flex-grow: 1;
    margin: 0.5rem auto;
    opacity: 0.3;
}
.roadmap-current-card {
    background: rgba(255,255,255,0.08);
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255,255,255,0.15);
    flex: 1;
}
.roadmap-badge {
    font-size: 0.6rem;
    font-weight: 700;
    font-family: var(--font-mono);
    background: var(--blue-500);
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}


/* =============================================
   FOOTER
   ============================================= */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-400);
    font-size: 0.85rem;
}
/* When footer is inside dark roadmap, blend in */
.roadmap-section .site-footer {
    background: transparent;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 3rem;
}
.footer-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 1.5rem;
}
.footer-brand { margin-bottom: 1.5rem; }
.footer-logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}
.footer-tagline {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}
.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.footer-col h4 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.4);
    margin: 0 0 0.6rem;
}
.footer-col a {
    display: block;
    margin-bottom: 0.4rem;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.8rem;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
}
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; gap: 1rem; }
.footer-legal a { color: rgba(255,255,255,0.3); text-decoration: none; }
.footer-legal a:hover { color: #fff; }


/* =============================================
   INNER PAGES — docs, blog, usecases
   ============================================= */
.page-layout {
    padding-top: calc(var(--nav-height) + 2rem);
    min-height: 100vh;
}
.page-container {
    max-width: var(--content-narrow);
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}
.page-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}
.page-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .page-header h1 { font-size: 2.25rem; }
}
.page-header .meta {
    font-size: 0.85rem;
    color: var(--gray-400);
}

/* Prose */
.prose h2 { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); margin: 2.5rem 0 0.75rem; }
.prose h3 { font-size: 1.15rem; font-weight: 600; color: var(--gray-800); margin: 2rem 0 0.5rem; }
.prose p { line-height: 1.8; margin: 0 0 1.25rem; }
.prose ul, .prose ol { padding-left: 1.5rem; margin: 0 0 1.25rem; }
.prose li { margin-bottom: 0.4rem; line-height: 1.7; }
.prose code { font-family: var(--font-mono); font-size: 0.85em; background: var(--gray-100); padding: 0.15em 0.4em; border-radius: 0.25rem; }
.prose pre { background: var(--gray-900); color: var(--gray-100); padding: 1.25rem; border-radius: 0.5rem; overflow-x: auto; font-size: 0.85rem; margin: 0 0 1.5rem; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose blockquote { border-left: 3px solid var(--brand); padding: 0.75rem 1.25rem; margin: 0 0 1.25rem; background: rgba(26,38,52,0.03); color: var(--gray-600); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: 0.9rem; }
.prose th, .prose td { padding: 0.6rem 0.75rem; text-align: left; border-bottom: 1px solid var(--gray-200); }
.prose th { font-weight: 600; color: var(--gray-800); background: var(--gray-50); }
/* Prevent table overflow on narrow screens */
.prose .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.5rem; }
.prose .table-wrap table { margin: 0; }


/* =============================================
   DOC SIDEBAR (future)
   ============================================= */
.doc-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; max-width: var(--content-max); margin: 0 auto; padding: calc(var(--nav-height) + 2rem) 1.5rem 4rem; }
@media (min-width: 900px) { .doc-layout { grid-template-columns: 220px 1fr; gap: 3rem; } }
.doc-sidebar { position: sticky; top: calc(var(--nav-height) + 2rem); align-self: start; }
.doc-sidebar a { display: block; padding: 0.35rem 0; font-size: 0.85rem; color: var(--gray-500); transition: color 0.15s; text-decoration: none; }
.doc-sidebar a:hover, .doc-sidebar a.active { color: var(--brand); font-weight: 600; }


/* =============================================
   INDEX LISTING PAGES
   ============================================= */
.listing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 600px) { .listing-grid { grid-template-columns: repeat(2, 1fr); } }

.listing-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    display: block;
}
.listing-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.listing-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); margin: 0 0 0.5rem; }
.listing-card p { font-size: 0.9rem; color: var(--gray-500); margin: 0; line-height: 1.6; }
.listing-card .tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-mono);
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    background: var(--gray-100);
    color: var(--gray-600);
    margin-top: 0.75rem;
}


/* =============================================
   DEMO REQUEST MODAL
   ============================================= */
.demo-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    visibility: hidden;
}
@media (min-width: 600px) {
    .demo-modal { align-items: center; }
}
.demo-modal.is-open {
    pointer-events: auto;
    visibility: visible;
}

.demo-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.demo-modal.is-open .demo-modal__overlay { opacity: 1; }

.demo-modal__panel {
    position: relative;
    z-index: 1;
    background: #fff;
    width: 100%;
    max-width: 680px;
    max-height: 92dvh;
    overflow-y: auto;
    border-radius: 1.25rem 1.25rem 0 0;
    padding: 2rem 1.5rem 2.5rem;
    transform: translateY(40px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
@media (min-width: 600px) {
    .demo-modal__panel {
        border-radius: 1.25rem;
        padding: 2.5rem;
        transform: translateY(20px) scale(0.97);
    }
}
.demo-modal.is-open .demo-modal__panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.demo-modal__close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--gray-100);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    font-size: 0.85rem;
    transition: background 0.15s, color 0.15s;
}
.demo-modal__close:hover { background: var(--gray-200); color: var(--gray-800); }

.demo-modal__header { margin-bottom: 1.75rem; }
.demo-modal__header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 0.35rem;
}
.demo-modal__header p {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin: 0;
}

/* Form layout */
.dform-row { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1rem; }
@media (min-width: 500px) {
    .dform-row--2 { flex-direction: row; }
    .dform-row--2 .dform-field { flex: 1; }
}

.dform-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}
.dform-row .dform-field { margin-bottom: 0; }

.dform-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
}
.dform-field label span { color: var(--red-500); }

.dform-field input,
.dform-field select,
.dform-field textarea {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--gray-800);
    background: var(--gray-50);
    border: 1.5px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 0.6rem 0.85rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
}
.dform-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.25rem;
}
.dform-field input:focus,
.dform-field select:focus,
.dform-field textarea:focus {
    border-color: var(--brand-light);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
    background: #fff;
}
.dform-field textarea { resize: vertical; min-height: 80px; }

.dform-submit {
    width: 100%;
    border-radius: 0.5rem;
    position: relative;
    justify-content: center;
    gap: 0.5rem;
}
.dform-submit__spinner {
    display: none;
    position: absolute;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.dform-privacy {
    margin: 1rem 0 0;
    font-size: 0.75rem;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Success state */
.demo-modal__success {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 0;
}
.demo-success-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: var(--green-50);
    color: var(--green-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}
.demo-modal__success h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 0.5rem;
}
.demo-modal__success p {
    font-size: 0.95rem;
    color: var(--gray-500);
    margin: 0;
    line-height: 1.6;
}
