/* flashQ Documentation Styles - Stripe-style Minimal */

/* Base with fluid typography */
body {
    background: #ffffff;
    color: #374151;
    font-size: clamp(0.9375rem, 2.5vw, 1.0625rem);
    line-height: 1.75;
}

/* Fluid headings - optimized typography */
h1 {
    font-size: clamp(1.75rem, 6vw, 3rem) !important;
    color: #111827;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
}
h2 {
    font-size: clamp(1.375rem, 4vw, 1.875rem) !important;
    color: #111827;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}
h3 {
    font-size: clamp(1.125rem, 3vw, 1.25rem) !important;
    color: #111827;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}
h4 {
    font-size: clamp(1rem, 2.5vw, 1.125rem) !important;
    color: #1f2937;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Paragraph and list typography */
p {
    max-width: 65ch;
    margin-bottom: 1.25rem;
}

ul, ol {
    max-width: 65ch;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

li {
    margin-bottom: 0.5rem;
}

li:last-child {
    margin-bottom: 0;
}

/* Strong and emphasis */
strong, b {
    font-weight: 600;
    color: #111827;
}

em, i {
    font-style: italic;
}

/* Scrollbar - subtle */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f9fafb; }
::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #d1d5db; }

/* Code blocks */
pre {
    margin: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

pre code.hljs {
    background: #f9fafb !important;
    padding: clamp(0.75rem, 3vw, 1.25rem) !important;
    border-radius: 0.75rem;
    font-size: clamp(0.8125rem, 2vw, 0.875rem);
    line-height: 1.7;
    font-family: 'Geist Mono', monospace;
    display: block;
    overflow-x: auto;
}

.hljs { background: #f9fafb !important; }

/* Syntax highlighting - muted, professional */
.hljs-keyword { color: #6366f1; font-weight: 500; }
.hljs-built_in { color: #0891b2; }
.hljs-type { color: #0891b2; }
.hljs-literal { color: #6366f1; }
.hljs-number { color: #0d9488; }
.hljs-string { color: #059669; }
.hljs-comment { color: #9ca3af; font-style: italic; }
.hljs-function { color: #111827; }
.hljs-title { color: #111827; font-weight: 500; }
.hljs-property { color: #475569; }
.hljs-params { color: #64748b; }
.hljs-attr { color: #475569; }

/* Inline code - neutral gray, no accent color */
code:not(.hljs):not([class*="language-"]) {
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.375rem;
    font-size: clamp(0.8125rem, 2vw, 0.875rem);
    color: #1f2937;
    border: 1px solid #e5e7eb;
    font-family: 'Geist Mono', monospace;
    font-weight: 450;
}

/* Navigation - subtle, minimal */
.nav-link.active {
    background: #f3f4f6;
    color: #111827;
    font-weight: 500;
    border-left: 2px solid #111827;
}

/* Links - only element with color */
a:not(.nav-link):not(.btn) {
    color: #2563eb;
    text-decoration: none;
}
a:not(.nav-link):not(.btn):hover {
    text-decoration: underline;
}

/* Copy button */
.copy-btn { opacity: 0; transition: opacity 0.2s; }
.code-block:hover .copy-btn { opacity: 1; }

/* Sections */
section { scroll-margin-top: 5rem; }

/* Mobile menu */
.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}
.mobile-menu.open { transform: translateX(0); }

/* Callouts - subtle, professional */
.callout {
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-left: 3px solid;
}
.callout-info { background: #f8fafc; border-left-color: #94a3b8; }
.callout-success { background: #f0fdf4; border-left-color: #22c55e; }
.callout-warning { background: #fffbeb; border-left-color: #f59e0b; }
.callout-danger { background: #fef2f2; border-left-color: #ef4444; }

/* Tables - clean */
table { width: 100%; border-collapse: collapse; font-size: clamp(0.8125rem, 2.2vw, 0.9375rem); }
th, td { padding: clamp(0.6rem, 2vw, 0.875rem) clamp(0.4rem, 2vw, 1rem); text-align: left; border-bottom: 1px solid #e5e7eb; }
th { background: #f9fafb; font-weight: 500; font-size: clamp(0.6875rem, 1.8vw, 0.75rem); text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; }
tr:hover td { background: #f9fafb; }

/* ASCII diagrams */
.ascii-diagram {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem;
    font-family: 'Geist Mono', monospace;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: #4b5563;
    overflow-x: auto;
    white-space: pre;
}

/* Mobile optimizations */
@media (max-width: 640px) {
    body {
        line-height: 1.6;
    }

    h1 {
        letter-spacing: -0.02em !important;
        line-height: 1.15 !important;
        margin-bottom: 1.25rem !important;
    }

    h2 {
        letter-spacing: -0.015em !important;
        line-height: 1.25 !important;
        margin-top: 2rem !important;
    }

    h3 {
        letter-spacing: -0.01em !important;
        margin-top: 1.5rem !important;
    }

    p, ul, ol {
        max-width: none;
        margin-bottom: 1rem;
    }

    li {
        margin-bottom: 0.375rem;
    }

    .ascii-diagram { font-size: 0.625rem; padding: 0.75rem; }
    th, td { padding: 0.5rem 0.375rem; }
    .callout { padding: 0.75rem 1rem; }
}

/* Touch-friendly targets */
.touch-manipulation {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Prevent body scroll when menu open */
body.overflow-hidden { overflow: hidden; }

/* Better mobile table handling */
.overflow-x-auto { -webkit-overflow-scrolling: touch; }

/* Active state for mobile */
@media (hover: none) {
    .nav-link:active { background: #e5e7eb; }
}
