/* ==========================================================================
   PostPyro Docs — design tokens
   Dev-tool dark theme: near-black surfaces, one accent, flat borders
   instead of gradients/glow. Icons are inline SVG, not emoji.
   ========================================================================== */

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

:root {
    /* Surfaces */
    --bg: #0a0a0b;
    --bg-raised: #111113;
    --bg-card: #16161a;
    --bg-code: #0d0d0f;
    --bg-hover: #1c1c20;

    /* Borders */
    --border: #232327;
    --border-hover: #313136;

    /* Text */
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #6b6b74;

    /* Accent — single flat color, no gradients */
    --accent: #ff6a3d;
    --accent-hover: #ff8158;
    --accent-dim: rgba(255, 106, 61, 0.12);
    --accent-text: #ffb199;

    /* Status */
    --success: #3ecf8e;
    --danger: #f0555a;

    /* Type */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

    /* Spacing */
    --space-2xs: 0.25rem;
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4.5rem;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --transition: all 0.15s ease;
    --nav-height: 64px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

a {
    color: inherit;
    text-decoration: none;
}

code, pre, .mono {
    font-family: var(--font-mono);
}

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    background: rgba(10, 10, 11, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.brand-mark {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.brand-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.version-badge {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--accent-text);
    background: var(--accent-dim);
    border: 1px solid rgba(255, 106, 61, 0.25);
    border-radius: var(--radius-sm);
    padding: 2px 6px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    list-style: none;
    flex: 1;
    justify-content: center;
}

.nav-link {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: var(--space-xs) 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active {
    border-bottom-color: var(--accent);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 6px var(--space-sm);
    color: var(--text-muted);
    width: 200px;
    flex-shrink: 0;
    transition: var(--transition);
}

.nav-search:focus-within {
    border-color: var(--border-hover);
}

.nav-search svg {
    flex-shrink: 0;
}

.nav-search input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.8125rem;
    width: 100%;
}

.nav-search input::placeholder {
    color: var(--text-muted);
}

.nav-search kbd {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
    flex-shrink: 0;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-shrink: 0;
}

.icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: var(--transition);
}

.icon-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.hamburger .bar {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: var(--transition);
}

.hamburger.active .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.625rem 1.125rem;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent);
    color: #140a06;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: transparent;
    border-color: var(--border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-hover);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
    padding: var(--space-3xl) 0 var(--space-2xl);
    border-bottom: 1px solid var(--border);
}

.hero .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-2xl);
    align-items: center;
}

/* Grid items default to min-width:auto, which lets an unwrapped <pre> force
   the whole grid wider than the viewport - the actual root cause of the
   mobile overflow bug this rewrite fixes. min-width: 0 lets both columns
   shrink below their content's natural width so the code panel scrolls
   inside itself instead of blowing out the page. */
.hero-content,
.hero-code {
    min-width: 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--accent-text);
    background: var(--accent-dim);
    border: 1px solid rgba(255, 106, 61, 0.2);
    border-radius: 999px;
    padding: 4px 10px;
    margin-bottom: var(--space-lg);
}

.hero-title {
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.hero-description {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
    max-width: 46ch;
}

.hero-description code {
    color: var(--accent-text);
    font-size: 0.875em;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.hero-meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.hero-meta-item svg {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.code-window {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
}

.code-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-hover);
}

.code-title {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.code-content {
    padding: var(--space-lg);
    overflow-x: auto;
}

.code-content pre {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    overflow: visible;
}

/* ==========================================================================
   Section shell
   ========================================================================== */

section {
    padding: var(--space-3xl) 0;
    border-bottom: 1px solid var(--border);
}

.section-header {
    margin-bottom: var(--space-2xl);
    max-width: 60ch;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: var(--space-sm);
}

.section-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

/* ==========================================================================
   Feature grid
   ========================================================================== */

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-lg);
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--border-hover);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--accent-dim);
    color: var(--accent);
    margin-bottom: var(--space-md);
}

.feature-title {
    font-size: 1rem;
    margin-bottom: var(--space-xs);
}

.feature-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.feature-description code {
    color: var(--accent-text);
    font-size: 0.875em;
}

/* ==========================================================================
   Callouts / notices
   ========================================================================== */

.callout {
    display: flex;
    gap: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-xl);
}

.callout svg {
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.callout-title {
    font-size: 0.9375rem;
    margin-bottom: var(--space-2xs);
}

.callout p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.callout code {
    color: var(--accent-text);
    font-size: 0.875em;
}

/* ==========================================================================
   Installation
   ========================================================================== */

.install-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.install-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    min-width: 0;
}

.install-title {
    font-size: 0.9375rem;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-secondary);
}

.requirements {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.requirements h4 {
    font-size: 0.9375rem;
    margin-bottom: var(--space-sm);
}

.requirements ul {
    list-style: none;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    display: grid;
    gap: var(--space-xs);
}

.requirements li::before {
    content: '—';
    color: var(--text-muted);
    margin-right: var(--space-xs);
}

/* ==========================================================================
   Code blocks (generic)
   ========================================================================== */

pre {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    overflow-x: auto;
    min-width: 0;
}

pre code {
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: none;
}

.code-block {
    position: relative;
    min-width: 0;
}

.copy-btn {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

/* ==========================================================================
   Quick start tabs
   ========================================================================== */

.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-lg);
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.875rem;
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: var(--text-secondary);
}

.tab-btn.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
}

.tab-content {
    display: none;
    min-width: 0;
}

.tab-content.active {
    display: block;
}

/* ==========================================================================
   API reference
   ========================================================================== */

.api-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: var(--space-2xl);
    align-items: start;
}

.api-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + var(--space-lg));
}

.api-menu {
    list-style: none;
    display: grid;
    gap: var(--space-2xs);
    border-left: 1px solid var(--border);
}

.api-link {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    padding: var(--space-2xs) var(--space-md);
    border-left: 2px solid transparent;
    margin-left: -1px;
    transition: var(--transition);
}

.api-link:hover {
    color: var(--text-secondary);
}

.api-link.active {
    color: var(--text-primary);
    border-left-color: var(--accent);
}

.api-content {
    min-width: 0;
    display: grid;
    gap: var(--space-2xl);
}

.api-section-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border);
}

.api-method {
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--border);
}

.api-method:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.method-signature {
    margin-bottom: var(--space-sm);
}

.method-name {
    font-size: 0.9375rem;
    color: var(--accent-text);
    background: var(--accent-dim);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    display: inline-block;
    word-break: break-word;
}

.method-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.method-description code {
    color: var(--text-primary);
    font-size: 0.875em;
}

.method-params h5,
.method-returns h5,
.method-raises h5,
.method-example h5 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.method-params ul {
    list-style: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: grid;
    gap: var(--space-2xs);
    margin-bottom: var(--space-md);
}

.method-params code,
.method-returns code {
    color: var(--accent-text);
}

.method-returns,
.method-raises {
    margin-bottom: var(--space-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.method-example {
    margin-top: var(--space-md);
}

/* Type table */

.type-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

thead th {
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: var(--bg-raised);
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    vertical-align: top;
}

tbody tr:last-child td {
    border-bottom: none;
}

td code {
    color: var(--accent-text);
    font-size: 0.8125rem;
}

/* Error hierarchy tree */

.error-tree {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: var(--space-lg);
    overflow-x: auto;
}

.error-tree .exc-name { color: var(--text-primary); }
.error-tree .exc-comment { color: var(--text-muted); }

/* ==========================================================================
   Examples
   ========================================================================== */

.examples-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-lg);
}

.example-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    min-width: 0;
}

.example-title {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.9375rem;
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

.example-title svg {
    color: var(--accent);
}

/* ==========================================================================
   Performance
   ========================================================================== */

.performance-reasons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.reason {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.reason-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--accent);
}

.reason h4 {
    font-size: 0.9375rem;
}

.reason p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.comparison-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-2xl);
}

.comparison-wrap th:first-child,
.comparison-wrap td:first-child {
    color: var(--text-primary);
    font-weight: 500;
}

.check {
    color: var(--success);
}

.cross {
    color: var(--danger);
}

.dash {
    color: var(--text-muted);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    padding: var(--space-2xl) 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.footer-brand svg {
    color: var(--accent);
}

.footer-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    max-width: 32ch;
}

.footer-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.footer-menu {
    list-style: none;
    display: grid;
    gap: var(--space-sm);
}

.footer-menu-link {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-menu-link:hover {
    color: var(--text-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.search-hit {
    background: var(--accent-dim);
    border-radius: 4px;
    box-shadow: 0 0 0 1px rgba(255, 106, 61, 0.25);
}

/* ==========================================================================
   Scroll to top
   ========================================================================== */

.scroll-top {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--transition);
    z-index: 90;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

/* ==========================================================================
   Syntax highlighting (Prism overrides)
   ========================================================================== */

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: var(--text-muted);
}

.token.punctuation {
    color: var(--text-secondary);
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #e39a6b;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #9ecb8f;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #7ec7c2;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #c298e0;
}

.token.function,
.token.class-name {
    color: #e5c07b;
}

.token.regex,
.token.important,
.token.variable {
    color: var(--accent-text);
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .nav-search {
        display: none;
    }

    .hero .container {
        grid-template-columns: minmax(0, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .api-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .api-sidebar {
        position: static;
    }

    .api-menu {
        display: flex;
        overflow-x: auto;
        border-left: none;
        border-bottom: 1px solid var(--border);
        padding-bottom: var(--space-sm);
        gap: var(--space-xs);
    }

    .api-link {
        border-left: none;
        border-bottom: 2px solid transparent;
        white-space: nowrap;
        margin-left: 0;
    }

    .api-link.active {
        border-bottom-color: var(--accent);
    }

    .performance-reasons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: var(--space-md) var(--space-lg);
        gap: var(--space-sm);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        padding: var(--space-sm) 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-link.active {
        border-bottom: 1px solid var(--border);
    }

    .hamburger {
        display: flex;
    }

    .hero {
        padding: var(--space-2xl) 0 var(--space-xl);
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .features-grid,
    .install-grid,
    .examples-grid,
    .performance-reasons,
    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    section {
        padding: var(--space-2xl) 0;
    }
}

@media (max-width: 480px) {
    .container,
    .nav-container {
        padding: 0 var(--space-md);
    }

    .code-content {
        padding: var(--space-md);
    }
}

@media print {
    .navbar, .footer, .scroll-top {
        display: none;
    }
}
