/* ========================================
   0. SELF-HOSTED FONTS
   ======================================== */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/inter-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/inter-500-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/outfit-600-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/outfit-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ========================================
   1. RESET & BASE
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5.5rem;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-foreground);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent);
}

/* Inline links in content areas must be underlined (WCAG: not color-only) */
p a:not(.btn), .callout-content a {
    text-decoration: underline;
    text-decoration-color: var(--color-primary);
    text-underline-offset: 2px;
}

p a:not(.btn):hover, .callout-content a:hover {
    text-decoration-color: var(--color-accent);
}

ul, ol {
    list-style: none;
}

/* ========================================
   2. CUSTOM PROPERTIES (DESIGN TOKENS)
   ======================================== */
:root {
    /* Colors */
    --color-primary: #1a5a8a;
    --color-primary-dark: #144a72;
    --color-primary-foreground: #ffffff;
    --color-accent: #b34d0e;
    --color-accent-dark: #934009;
    --color-background: #f0f2f5;
    --color-foreground: #1a1d24;
    --color-card: #ffffff;
    --color-muted: #e8eaed;
    --color-muted-foreground: #4b5563;
    --color-border: rgba(0, 0, 0, 0.1);
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-error: #ef4444;

    /* Typography */
    --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, monospace;

    /* Font sizes - fluid with clamp() */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: clamp(1.25rem, 2vw, 1.5rem);
    --text-3xl: clamp(1.5rem, 2.5vw, 1.875rem);
    --text-4xl: clamp(1.875rem, 3vw, 2.25rem);
    --text-5xl: clamp(2.25rem, 4vw, 3rem);
    --text-6xl: clamp(2.5rem, 5vw, 3.75rem);

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Borders & Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* Layout */
    --container-max: 1400px;
    --header-height: 4.5rem;
}

/* ========================================
   3. TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-foreground);
}

h1 { font-size: var(--text-6xl); line-height: 1.1; }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); font-weight: 600; line-height: 1.3; }
h4 { font-size: var(--text-xl); font-weight: 600; line-height: 1.4; }

p {
    margin-bottom: var(--space-4);
}

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

code, pre {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
}

code {
    background: var(--color-muted);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
}

pre code {
    background: none;
    padding: 0;
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   4. LAYOUT UTILITIES
   ======================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-6);
    padding-right: var(--space-6);
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.text-center { text-align: center; }
.text-left { text-align: left; }

.w-full { width: 100%; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }

/* ========================================
   5. SPACING UTILITIES
   ======================================== */
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

/* ========================================
   6. COLOR UTILITIES
   ======================================== */
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-muted-foreground { color: var(--color-muted-foreground); }
.text-white { color: #ffffff; }
.bg-card { background-color: var(--color-card); }
.bg-background { background-color: var(--color-background); }
.bg-primary { background-color: var(--color-primary); }

/* ========================================
   7. COMPONENTS
   ======================================== */

/* 7a. Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.625rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-primary-foreground);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-primary-foreground);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-foreground);
    border-color: var(--color-border);
}

.btn-outline:hover {
    background-color: var(--color-muted);
    color: var(--color-foreground);
}

.btn-accent {
    background-color: var(--color-accent);
    color: #ffffff;
    border-color: var(--color-accent);
}

.btn-accent:hover {
    background-color: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    color: #ffffff;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: var(--text-xs);
}

.btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: var(--text-base);
}

.btn-white {
    background-color: #ffffff;
    color: var(--color-primary);
    border-color: #ffffff;
}

.btn-white:hover {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--color-primary);
}

.btn-outline-white {
    background-color: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline-white:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* 7b. Cards */
.card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 90, 138, 0.1);
    border-radius: var(--radius-lg);
    color: var(--color-primary);
    margin-bottom: var(--space-4);
}

.card-title {
    margin-bottom: var(--space-2);
}

.card-description {
    color: var(--color-muted-foreground);
    font-size: var(--text-sm);
    line-height: 1.6;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-primary);
}

.card-link:hover {
    gap: var(--space-3);
}

/* Problem cards (red accent) */
.card-problem .card-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
}

/* Solution cards (green accent) */
.card-solution .card-icon {
    background: rgba(34, 197, 94, 0.1);
    color: var(--color-success);
}

/* 7c. Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 50;
    transition: box-shadow var(--transition-base);
}

.header-scrolled {
    box-shadow: var(--shadow-soft);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--color-foreground);
    text-decoration: none;
}

.header-logo:hover {
    color: var(--color-primary);
}

.header-logo-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.header-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.header-logo-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-lg);
}

.header-logo-subtitle {
    font-size: var(--text-xs);
    color: var(--color-muted-foreground);
    font-weight: 400;
}

.nav-desktop {
    display: none;
    align-items: center;
    gap: var(--space-1);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-muted-foreground);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link-active {
    color: var(--color-primary);
    background: rgba(26, 90, 138, 0.06);
}

.nav-link-icon {
    padding: var(--space-2);
}

.header-actions {
    display: none;
    align-items: center;
    gap: var(--space-3);
}

.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-foreground);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background: var(--color-muted);
}

.mobile-menu {
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--color-card);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    padding: var(--space-4);
}

.mobile-menu[hidden] {
    display: none;
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.mobile-menu-nav .nav-link {
    display: flex;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
}

.mobile-menu-nav .btn {
    margin-top: var(--space-4);
}

/* 7d. Footer */
.footer {
    background: var(--color-card);
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-16);
}

.footer-inner {
    padding-top: var(--space-12);
    padding-bottom: var(--space-10);
}

.footer-grid {
    display: grid;
    gap: var(--space-8);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--color-foreground);
    margin-bottom: var(--space-4);
    text-decoration: none;
}

.footer-logo:hover {
    color: var(--color-primary);
}

.footer-logo-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.footer-col-brand p {
    color: var(--color-muted-foreground);
    font-size: var(--text-sm);
    margin-bottom: var(--space-6);
    max-width: 28rem;
}

.footer-badges {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.footer-col-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-foreground);
    margin-bottom: var(--space-4);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-links a {
    color: var(--color-muted-foreground);
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding: var(--space-4) 0;
}

.footer-bottom .container {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
}

.footer-bottom p {
    color: var(--color-muted-foreground);
    font-size: var(--text-sm);
    margin-bottom: 0;
}

.footer-bottom-links {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
}

.footer-bottom-links a {
    color: var(--color-muted-foreground);
    font-size: var(--text-sm);
}

.footer-bottom-links a:hover {
    color: var(--color-primary);
}

.footer-credit {
    white-space: nowrap;
}

.footer-credit a {
    color: var(--color-primary);
    font-weight: 500;
}

.footer-heart {
    color: #e25555;
}

/* 7e. FAQ */
.faq-item {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    border-left: 3px solid transparent;
    transition: border-color var(--transition-fast);
}

.faq-item[open] {
    border-left-color: var(--color-primary);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) var(--space-6);
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--text-lg);
    list-style: none;
    transition: color var(--transition-fast);
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    color: var(--color-primary);
}

.faq-chevron {
    transition: transform var(--transition-base);
    flex-shrink: 0;
    margin-left: var(--space-4);
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 var(--space-6) var(--space-5);
    color: var(--color-muted-foreground);
    line-height: 1.7;
}

.faq-answer p {
    margin-bottom: var(--space-3);
}

/* 7f. Tables */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.comparison-table thead {
    background: var(--color-primary);
    color: var(--color-primary-foreground);
}

.comparison-table th {
    padding: var(--space-4) var(--space-6);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--text-sm);
    text-align: left;
    white-space: nowrap;
}

.comparison-table td {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}

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

.comparison-table tbody tr:hover {
    background: rgba(26, 90, 138, 0.02);
}

.table-check {
    color: #15803d;
    font-weight: 600;
}

.table-cross {
    color: #b91c1c;
}

/* 7g. Code Blocks */
.code-block {
    background: #1e293b;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: var(--space-4) 0;
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-block-lang {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.code-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.code-copy-btn:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
}

.code-copy-btn.copied {
    color: var(--color-success);
}

.code-block pre {
    padding: var(--space-4);
    overflow-x: auto;
    margin: 0;
}

.code-block code {
    color: #e2e8f0;
    font-size: var(--text-sm);
    line-height: 1.7;
    background: none;
    padding: 0;
}

.code-inline {
    display: inline-block;
    background: #1e293b;
    color: #e2e8f0;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
}

/* 7h. Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 500;
    line-height: 1.5;
}

.badge-primary {
    background: rgba(26, 90, 138, 0.1);
    color: var(--color-primary);
}

.badge-accent {
    background: rgba(179, 77, 14, 0.1);
    color: #7c3a0a;
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
}

.badge-free {
    background: rgba(34, 197, 94, 0.15);
    color: #116932;
}

.badge-pro {
    background: rgba(179, 77, 14, 0.15);
    color: #7c3a0a;
}

.badge-enterprise {
    background: rgba(26, 90, 138, 0.15);
    color: #1a5a8a;
}

/* 7h-ii. Tool links */

.tool-link {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
    white-space: nowrap;
}

.tool-link:hover {
    border-bottom-color: var(--color-primary);
}

.tool-link svg {
    display: inline-block;
    vertical-align: middle;
    width: 14px;
    height: 14px;
    max-width: none;
    margin-right: 0.35em;
}

/* 7i. Tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--color-muted);
    margin-bottom: var(--space-8);
    gap: 0;
}

.tab-btn {
    padding: var(--space-3) var(--space-6);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-muted-foreground);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

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

.tab-content {
    display: none;
}

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

/* 7j. Steps */
.steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.step {
    display: flex;
    gap: var(--space-6);
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: var(--color-primary-foreground);
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-lg);
}

.step-title {
    margin-bottom: var(--space-2);
}

.step-description {
    color: var(--color-muted-foreground);
    font-size: var(--text-sm);
    line-height: 1.6;
}

/* 7k. Callouts */
.callout {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    margin: var(--space-4) 0;
    border: 1px solid;
}

.callout-info {
    background: rgba(26, 90, 138, 0.05);
    border-color: rgba(26, 90, 138, 0.2);
    color: var(--color-foreground);
}

.callout-info .callout-icon {
    color: var(--color-primary);
}

.callout-warning {
    background: rgba(245, 158, 11, 0.05);
    border-color: rgba(245, 158, 11, 0.2);
    color: var(--color-foreground);
}

.callout-warning .callout-icon {
    color: var(--color-warning);
}

.callout-icon {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.callout-content {
    font-size: var(--text-sm);
    line-height: 1.6;
}

/* 7l. API Endpoints */
.api-endpoint {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
}

.api-endpoint-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.api-method {
    display: inline-flex;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
}

.api-method-get {
    background: rgba(34, 197, 94, 0.15);
    color: #166534;
}

.api-method-post {
    background: rgba(26, 90, 138, 0.15);
    color: var(--color-primary);
}

.api-method-delete {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
}

.api-path {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 500;
    background: none;
    padding: 0;
}

.api-description {
    color: var(--color-muted-foreground);
    font-size: var(--text-sm);
}

.api-section {
    margin-top: var(--space-4);
}

.api-section strong {
    display: block;
    font-size: var(--text-sm);
    margin-bottom: var(--space-2);
}

/* ========================================
   8. SECTION PATTERNS
   ======================================== */
.section {
    padding: var(--space-20) 0;
}

.section-sm {
    padding: var(--space-12) 0;
}

.section-lg {
    padding: var(--space-24) 0;
}

.section-gray {
    background-color: var(--color-background);
}

.section-white {
    background-color: var(--color-card);
}

.section-header {
    text-align: center;
    max-width: 48rem;
    margin: 0 auto var(--space-12);
}

.section-header p {
    color: var(--color-muted-foreground);
    font-size: var(--text-lg);
    margin-top: var(--space-4);
}

.gradient-hero {
    background: linear-gradient(135deg, hsl(200 75% 30%) 0%, hsl(200 75% 40%) 100%);
    color: #ffffff;
    padding: 8rem 0 5rem;
}

.gradient-hero h1,
.gradient-hero h2,
.gradient-hero h3,
.gradient-hero p {
    color: #ffffff;
}

.gradient-hero .text-muted {
    color: rgba(255, 255, 255, 0.95);
}

.hero-subtitle {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.95);
    max-width: 40rem;
    margin: var(--space-6) auto 0;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    margin-top: var(--space-8);
    flex-wrap: wrap;
}


/* Breadcrumb - horizontal, scrollable */
nav[aria-label="breadcrumb"] {
    padding-top: calc(var(--header-height) + 0.5rem);
    background: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    font-size: var(--text-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.breadcrumb {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    padding: 0.5rem 0;
    list-style: none !important;
    margin: 0 !important;
    white-space: nowrap;
}

.breadcrumb-item {
    display: inline !important;
    flex-shrink: 0;
    color: var(--color-muted-foreground);
    white-space: nowrap;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    display: inline-block;
    padding: 0 0.4rem;
    color: var(--color-muted-foreground);
    opacity: 0.5;
}

.breadcrumb-item a {
    color: var(--color-muted-foreground);
    transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
    color: var(--color-primary);
}

.breadcrumb-item.active {
    color: var(--color-foreground);
    font-weight: 500;
}

/* Smaller hero for subpages */
.page-hero {
    background: linear-gradient(135deg, hsl(200 75% 30%) 0%, hsl(200 75% 40%) 100%);
    color: #ffffff;
    padding: 3rem 0;
    text-align: center;
}

.page-hero h1 {
    color: #ffffff;
    font-size: var(--text-5xl);
}

.page-hero p {
    color: rgba(255, 255, 255, 0.95);
    font-size: var(--text-lg);
    margin-top: var(--space-4);
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   9. PAGE-SPECIFIC STYLES
   ======================================== */

/* 9a. Homepage */
.home-architecture {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    overflow-x: auto;
}

.arch-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
    min-width: 600px;
}

.arch-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--text-sm);
    white-space: nowrap;
}

.arch-box-primary {
    background: var(--color-primary);
    color: var(--color-primary-foreground);
}

.arch-box-accent {
    background: var(--color-accent);
    color: #ffffff;
}

.arch-box-muted {
    background: var(--color-muted);
    color: var(--color-foreground);
}

.arch-connector {
    width: 2px;
    height: 1.5rem;
    background: var(--color-border);
}

.arch-workers {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    justify-content: center;
}

.arch-worker {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: 500;
}

.arch-branch-lines {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 1.5rem;
    gap: 0;
    width: 100%;
    max-width: 700px;
}

.arch-branch-line {
    flex: 1;
    height: 100%;
    border-bottom: 2px solid var(--color-border);
    position: relative;
}

.arch-branch-line::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 2px;
    height: 0.75rem;
    background: var(--color-border);
    transform: translateX(-50%);
}

/* 9b. Features Page */
.feature-detail {
    display: grid;
    gap: var(--space-8);
    align-items: start;
}

.feature-detail-content h3 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
}

.feature-detail-content p {
    color: var(--color-muted-foreground);
    line-height: 1.7;
}

.feature-detail-code {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
}

/* 9c. Documentation Page */
.docs-layout {
    display: grid;
    gap: var(--space-8);
    padding: var(--space-8) 0;
}

.docs-sidebar {
    display: none;
}

.docs-sidebar-nav {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.docs-sidebar-link {
    display: block;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-muted-foreground);
    border-radius: var(--radius-md);
    border-left: 2px solid transparent;
    transition: all var(--transition-fast);
}

.docs-sidebar-link:hover {
    color: var(--color-primary);
    background: rgba(26, 90, 138, 0.04);
}

.docs-sidebar-link-active {
    color: var(--color-primary);
    background: rgba(26, 90, 138, 0.06);
    border-left-color: var(--color-primary);
    font-weight: 500;
}

.docs-content {
    min-width: 0;
}

.docs-content h2 {
    padding-top: var(--space-8);
    margin-bottom: var(--space-6);
    font-size: var(--text-3xl);
}

.docs-content h2:first-child {
    padding-top: 0;
}

.docs-content h3 {
    margin-top: var(--space-6);
    margin-bottom: var(--space-4);
}

.docs-content p {
    color: var(--color-muted-foreground);
    line-height: 1.7;
    margin-bottom: var(--space-4);
}

.docs-content ul {
    list-style: disc;
    padding-left: var(--space-6);
    margin-bottom: var(--space-4);
}

.docs-content ul li {
    color: var(--color-muted-foreground);
    font-size: var(--text-sm);
    line-height: 1.7;
    margin-bottom: var(--space-2);
}

/* Config table */
.config-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
    margin: var(--space-4) 0;
}

.config-table th {
    padding: var(--space-3) var(--space-4);
    background: var(--color-muted);
    font-size: var(--text-sm);
    font-weight: 600;
    text-align: left;
}

.config-table td {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}

.config-table td code {
    font-size: var(--text-xs);
}

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

/* 9d. Pricing Page */
.pricing-grid {
    display: grid;
    gap: var(--space-8);
    max-width: 72rem;
    margin: 0 auto;
    align-items: stretch;
}

.pricing-card {
    background: var(--color-card);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pricing-features {
    flex: 1;
}

.pricing-card > .btn {
    margin-top: var(--space-8);
}

.pricing-card-featured {
    border-color: var(--color-primary);
    position: relative;
}

.pricing-card-featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: var(--color-primary-foreground);
    padding: 0.125rem 1rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
}

.pricing-price {
    font-family: var(--font-heading);
    font-size: var(--text-5xl);
    font-weight: 700;
    margin: var(--space-4) 0 var(--space-2);
}

.pricing-period {
    color: #374151;
    font-size: var(--text-sm);
    margin-bottom: var(--space-6);
}

.pricing-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    text-align: left;
    margin-bottom: var(--space-8);
    flex-grow: 1;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: #374151;
}

.pricing-features li .icon {
    color: var(--color-success);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.pricing-lifetime {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-3);
    text-align: center;
}

.pricing-price-suffix {
    font-size: var(--text-lg);
    font-weight: 500;
}

/* 9d-ii. Billing Toggle */
.billing-toggle-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-6);
}

.billing-toggle {
    display: inline-flex;
    background: var(--color-card);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: 0.25rem;
    gap: 0.25rem;
}

.billing-toggle-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-muted-foreground);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.billing-toggle-btn:hover {
    color: var(--color-text);
}

.billing-toggle-active {
    background: var(--color-primary-dark);
    color: var(--color-primary-foreground);
}

.billing-toggle-active:hover {
    color: var(--color-primary-foreground);
}

.billing-save {
    font-size: var(--text-xs);
    background: rgba(21, 128, 61, 0.15);
    color: #15703a;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.billing-toggle-active .billing-save {
    background: rgba(255, 255, 255, 0.9);
    color: #144a72;
}

/* 9d-iii. Platform Tabs (Pricing) */
.platform-tabs-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-8);
}

.platform-tabs {
    display: inline-flex;
    gap: 0.5rem;
}

.platform-tabs .tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

/* 9d-iv. Enterprise Tier Cards */
.enterprise-tier-card {
    display: flex;
    flex-direction: column;
}

.enterprise-tier-card .pricing-price {
    margin-bottom: var(--space-2);
}

.enterprise-tier-card .card-description {
    flex: 1;
}

/* 9d-v. Payment Trust Section */
.payment-trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
    max-width: 56rem;
    margin: 0 auto;
}

.payment-trust-item {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
}

.payment-trust-item > .icon {
    color: var(--color-primary);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.payment-trust-item strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: var(--text-base);
}

.payment-trust-item p {
    font-size: var(--text-sm);
    color: var(--color-muted-foreground);
    margin: 0;
}

/* 9d-vi. Checkout Success Page */
.checkout-success {
    text-align: center;
}

.checkout-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    background: var(--color-success);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-6);
}

.checkout-success-icon .icon {
    color: #fff;
}

.checkout-success-card {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
    background: var(--color-card);
    border: 2px solid var(--color-success);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-8);
}

.checkout-success-card > .icon {
    color: var(--color-success);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.checkout-success-card h2 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

.checkout-success-card p {
    color: var(--color-muted-foreground);
    margin: 0;
}

.checkout-next-steps {
    margin-bottom: var(--space-8);
}

.checkout-next-steps h3 {
    text-align: center;
    margin-bottom: var(--space-6);
}

.checkout-help {
    text-align: center;
    padding: var(--space-6);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.checkout-help p {
    margin: 0;
    color: var(--color-muted-foreground);
}

/* 9d-vii. Button spinner (loading state) */
.btn-spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* Changelog h3 subheadings */
.changelog-category h3 {
    font-size: var(--text-base);
    font-weight: 600;
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
    color: var(--color-text);
}

/* 9e. API Keys Page */
.guide-section {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    margin-bottom: var(--space-8);
}

.guide-section-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.guide-section-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 90, 138, 0.1);
    border-radius: var(--radius-lg);
    color: var(--color-primary);
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.guide-step {
    display: flex;
    gap: var(--space-4);
}

.guide-step-num {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-muted);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-foreground);
}

.guide-step-content {
    flex: 1;
}

.guide-step-content p {
    color: var(--color-muted-foreground);
    font-size: var(--text-sm);
    line-height: 1.6;
}

/* 9f. Changelog Page */
.changelog-entry {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    margin-bottom: var(--space-6);
}

.changelog-entry-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.changelog-version {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-2xl);
}

.changelog-date {
    color: var(--color-muted-foreground);
    font-size: var(--text-sm);
}

.changelog-category {
    margin-bottom: var(--space-6);
}

.changelog-category:last-child {
    margin-bottom: 0;
}

.changelog-category h2 {
    font-size: var(--text-base);
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.changelog-category ul {
    list-style: disc;
    padding-left: var(--space-6);
}

.changelog-category li {
    color: var(--color-muted-foreground);
    font-size: var(--text-sm);
    line-height: 1.6;
    margin-bottom: var(--space-2);
}

/* 9g. Feature list (features page) */
.feature-list {
    list-style: disc;
    padding-left: 1.5rem;
}

.feature-list li {
    margin-bottom: 0.5rem;
    color: var(--color-muted-foreground);
}

/* 9h. CTA section spacing */
.cta-section {
    padding: 5rem 0;
}

.cta-section-sm {
    padding: 4rem 0;
}

/* 9i. Overflow utility */
.overflow-x-auto {
    overflow-x: auto;
}

/* 9j. Text size utility */
.text-lg {
    font-size: var(--text-lg);
}

/* 9k. Navigation Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-4);
    font-family: var(--font-body);
}

.nav-dropdown-chevron {
    transition: transform var(--transition-fast);
}

.nav-dropdown-toggle[aria-expanded="true"] .nav-dropdown-chevron {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + var(--space-2));
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2);
    z-index: 60;
}

.nav-dropdown-menu.nav-dropdown-open {
    display: block;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-muted-foreground);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.nav-dropdown-item:hover,
.nav-dropdown-item-active {
    color: var(--color-primary);
    background: rgba(26, 90, 138, 0.06);
}

/* 9l. Mobile nav group */
.mobile-nav-group {
    padding-left: var(--space-4);
    border-left: 2px solid var(--color-border);
    margin-left: var(--space-4);
}

.mobile-nav-group-title {
    display: block;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-muted-foreground);
}

/* 9m. Platform cards */
.platform-card {
    text-decoration: none;
    color: inherit;
}

.platform-card:hover {
    color: inherit;
}

.platform-card:hover .card-link {
    gap: var(--space-3);
}

/* 9m-b. Feature cards (linked) */
a.card-feature {
    display: block;
    text-decoration: none;
    color: inherit;
}

a.card-feature:hover {
    color: inherit;
}

a.card-feature:hover .card-link {
    gap: var(--space-3);
}

/* 9n. Footer 4-column grid */
.footer-grid-4 {
    display: grid;
    gap: var(--space-8);
}

/* 9o. 404 Page */
.error-page {
    text-align: center;
    padding: var(--space-24) 0;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.error-code {
    font-family: var(--font-heading);
    font-size: clamp(6rem, 15vw, 12rem);
    font-weight: 700;
    color: var(--color-muted);
    line-height: 1;
}

/* 9m. Article / Explainer Sections */
.article h3 {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    margin-top: var(--space-10);
    margin-bottom: var(--space-4);
    color: var(--color-foreground);
}

.article h3:first-child {
    margin-top: 0;
}

.article p {
    font-size: var(--text-base);
    line-height: 1.75;
    color: #374151;
    margin-bottom: var(--space-4);
}

.article ol {
    padding-left: var(--space-6);
    margin-bottom: var(--space-4);
}

.article ol li {
    font-size: var(--text-base);
    line-height: 1.75;
    color: #374151;
    margin-bottom: var(--space-2);
}

.article a:not(.btn) {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article a:not(.btn):hover {
    color: var(--color-primary-dark);
}

.article-analogy-tile {
    display: flex;
    align-items: flex-start;
    gap: var(--space-6);
    background: linear-gradient(135deg, rgba(26, 90, 138, 0.08) 0%, rgba(26, 90, 138, 0.02) 100%);
    border: 1px solid rgba(26, 90, 138, 0.15);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    margin-bottom: var(--space-8);
    box-shadow: 0 4px 24px rgba(26, 90, 138, 0.08);
}

.article-analogy-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-lg);
    background: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(26, 90, 138, 0.3);
}

.article-analogy-content h3 {
    margin-top: 0;
    font-size: var(--text-xl);
    color: var(--color-primary);
}

.article-analogy-content p:last-child {
    margin-bottom: 0;
}

@media (max-width: 640px) {
    .article-analogy-tile {
        flex-direction: column;
        padding: var(--space-6);
    }
}

.article-highlight {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    background: linear-gradient(135deg, rgba(26, 90, 138, 0.06) 0%, rgba(26, 90, 138, 0.02) 100%);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin: var(--space-8) 0;
    font-size: var(--text-base);
    line-height: 1.75;
    color: #374151;
}

.article-highlight-icon {
    color: var(--color-primary);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.article-benefits {
    margin: var(--space-8) 0;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin: var(--space-6) 0;
}

.article-list-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    font-size: var(--text-base);
    line-height: 1.75;
    color: #374151;
}

.article-list-number {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-full);
    background: var(--color-primary);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-sm);
}

.article-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin: var(--space-6) 0;
}

.article-step {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    background: var(--color-background);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    font-size: var(--text-base);
    line-height: 1.75;
    color: #374151;
}

.article-step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    background: rgba(26, 90, 138, 0.1);
    color: var(--color-primary);
}

.article-cta {
    text-align: center;
    background: var(--color-background);
    border-radius: var(--radius-xl);
    padding: var(--space-10);
    margin-top: var(--space-10);
}

.article-cta h3 {
    margin-top: 0;
    font-size: var(--text-2xl);
}

.article-cta p {
    color: var(--color-muted-foreground);
    margin-bottom: var(--space-6);
}

.article-cta .hero-buttons {
    justify-content: center;
}

/* ========================================
   10. RESPONSIVE
   ======================================== */
@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }

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

    .footer-bottom .container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

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

    .feature-detail {
        grid-template-columns: 1fr 1fr;
    }

    .docs-layout {
        grid-template-columns: 250px 1fr;
    }

    .docs-sidebar {
        display: block;
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    .pricing-grid.grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .nav-desktop {
        display: flex;
    }

    .header-actions {
        display: flex;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .grid-3 { grid-template-columns: repeat(3, 1fr); }

    .gradient-hero {
        padding: 10rem 0 6rem;
    }

    .page-hero {
        padding: 3.5rem 0 4rem;
    }

    .hero-subtitle {
        font-size: var(--text-xl);
    }

    .footer-grid-4 {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

/* Small screens: force single column */
@media (max-width: 767px) {
    .container {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .section {
        padding: var(--space-12) 0;
    }

    .gradient-hero {
        padding: 6rem 0 3rem;
    }

    .page-hero {
        padding: 2rem 0;
    }

    .cta-section {
        padding: 3rem 0;
    }

    .cta-section-sm {
        padding: 2.5rem 0;
    }

    .comparison-table {
        display: block;
        overflow-x: auto;
    }

    .comparison-table th,
    .comparison-table td {
        padding: var(--space-3) var(--space-4);
        white-space: nowrap;
    }

    .comparison-table td:first-child {
        white-space: normal;
        min-width: 120px;
    }

    .config-table {
        display: block;
        overflow-x: auto;
    }

    .arch-diagram {
        min-width: 320px;
    }

    .arch-workers {
        gap: var(--space-2);
    }

    .arch-worker {
        font-size: 0.625rem;
        padding: var(--space-1) var(--space-2);
    }

    .feature-detail {
        grid-template-columns: 1fr;
    }

    .feature-detail-code {
        position: static;
    }

    .step {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .mobile-menu {
        max-height: calc(100vh - var(--header-height));
        max-height: calc(100dvh - var(--header-height));
        overflow-y: auto;
    }

    .footer-grid-4 {
        grid-template-columns: 1fr;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* Reduce card & guide padding on small screens */
    .guide-section {
        padding: var(--space-5);
    }

    .changelog-entry {
        padding: var(--space-5);
    }

    .pricing-card {
        padding: var(--space-6);
    }

    .api-endpoint {
        padding: var(--space-4);
    }

    /* Code blocks: ensure they don't overflow */
    .code-block {
        max-width: calc(100vw - 2 * var(--space-4));
    }

    /* Pricing price: smaller on mobile */
    .pricing-price {
        font-size: var(--text-4xl);
    }

    /* Payment trust: stack on mobile */
    .payment-trust {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    /* Billing toggle: full width on mobile */
    .billing-toggle {
        width: 100%;
        display: flex;
    }

    .billing-toggle-btn {
        flex: 1;
        justify-content: center;
        padding: 0.5rem 1rem;
    }

    /* Section header spacing */
    .section-header {
        margin-bottom: var(--space-8);
    }

    /* FAQ questions smaller on mobile */
    .faq-question {
        font-size: var(--text-base);
        padding: var(--space-4) var(--space-5);
    }

    .faq-answer {
        padding: 0 var(--space-5) var(--space-4);
    }
}

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

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    background: var(--color-primary);
    color: var(--color-primary-foreground);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    z-index: 100;
    font-size: var(--text-sm);
    font-weight: 500;
}

.skip-link:focus {
    top: var(--space-4);
    color: var(--color-primary-foreground);
}

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

    html {
        scroll-behavior: auto;
    }
}

/* Focus styles */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
