:root {
    --primary-purple: #667eea;
    --primary-violet: #764ba2;
    --dark-gray: #1a1f2e;
    --light-gray: #f8f9fa;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --text-dark: #1a1f2e;
    --text-medium: #4a5568;
    --text-light: #718096;
    --transition: all 0.2s ease;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.15);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Skip to content - accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-purple);
    color: white;
    padding: 8px 16px;
    z-index: 1000;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 8px 0;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
    -webkit-text-size-adjust: 100%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Global overflow safety for common content elements */
pre, code, table {
    max-width: 100%;
}

pre {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

img {
    max-width: 100%;
    height: auto;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-medium);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--primary-purple);
}

.nav-links a.active {
    color: var(--primary-purple);
    position: relative;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-purple);
    border-radius: 1px;
}

/* Mobile hamburger menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    z-index: 101;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.hero, .header-banner {
    max-width: 100%;
    margin: 0 auto;
    padding: 5rem 1.5rem;
    text-align: center;
    color: white;
}

.hero h1, .header-banner h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
    line-height: 1.15;
    color: white;
}

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.7;
    opacity: 0.95;
    max-width: 550px;
    margin: 0 auto 1.5rem;
    color: rgba(255,255,255,0.9);
}

.tagline {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    font-weight: 600;
}

.use-cases-bar {
    max-width: 900px;
    margin: 2.5rem auto 0;
    padding: 1.25rem 2rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.use-cases-label {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.use-cases-list {
    color: var(--text-medium);
    font-size: 0.95rem;
}

.origin-note {
    max-width: 700px;
    margin: 0 auto 3rem;
    padding: 1.5rem 2rem;
    background: var(--white);
    border-radius: 12px;
    border-left: 4px solid var(--primary-purple);
    box-shadow: var(--shadow-sm);
}

.origin-note p {
    color: var(--text-medium);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.origin-note strong {
    color: var(--text-dark);
}

.origin-note a {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 500;
}

.origin-note a:hover {
    text-decoration: underline;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 3rem 0 1.5rem;
    padding: 0 1.5rem;
}

.best-for {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    font-style: italic;
}

.container, .main-container {
    max-width: 1200px;
    margin: 2rem auto 4rem;
    padding: 0 1.5rem;
}

.container {
    max-width: 900px;
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    overflow: hidden;
}

.container h2 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.container h3 {
    color: var(--text-dark);
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.container p, .container ul {
    color: var(--text-medium);
    line-height: 1.7;
}

.container code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--primary-purple);
    font-weight: 500;
}

.disclaimer-box {
    background: #fff5f5;
    border-left: 4px solid #f56565;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin-top: 1rem;
    color: #742a2a;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    min-width: 0;
}

.dashboard-grid > * {
    min-width: 0;
}

.features {
    max-width: 1200px;
    margin: 2rem auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 0 2rem;
}

.features > * {
    min-width: 0;
}

.pricing {
    max-width: 1200px;
    margin: 4rem auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 0 1.5rem;
}

.card, .pricing-card, .feature-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f0f0f0;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.feature-card:hover,
.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Fade-in animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }

.feature-card h3 {
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--text-medium);
    line-height: 1.6;
}

.pricing-card, .card {
    flex: 1 1 300px;
    max-width: 380px;
    text-align: center;
}

.pricing-card h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.cta-button {
    display: inline-block;
    background: white;
    color: var(--primary-purple);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    border: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transition: all 0.2s;
    font-size: 1rem;
}

.pricing-card .cta-button {
    width: 100%;
    margin-top: 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

.cta-button:focus {
    outline: 3px solid rgba(102, 126, 234, 0.4);
    outline-offset: 2px;
}

.cta-button:active {
    transform: translateY(0);
}

/* Button loading state */
.cta-button.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.cta-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.cta-button.loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    border-radius: inherit;
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.code-example {
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, #1a1f2e 0%, #2d3748 100%);
    border-radius: 20px;
    padding: 3rem 2rem;
}

.code-block {
    background: #0d1117;
    color: #e6edf3;
    padding: 1.5rem;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    text-align: left;
    margin-top: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.9rem;
    line-height: 1.6;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    max-width: 100%;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
    padding-bottom: 0;
    justify-content: center;
    border: none;
}

.tab-btn, .tab-link {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.6rem 1.4rem;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.code-example .tab-btn {
    color: rgba(255,255,255,0.8);
}

.card .tab-link {
    color: var(--text-medium);
    background: var(--light-gray);
    border: 1px solid var(--border-color);
}

.tab-btn.active, .tab-link.active {
    background: white;
    color: var(--primary-purple);
    border-color: white;
}

.tab-btn:hover, .tab-link:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
}

.card .tab-link.active {
    background: var(--primary-purple);
    color: white;
    border-color: var(--primary-purple);
}

.stat-val {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-purple);
    margin: 0.5rem 0;
}

.progress-container {
    background: #e8edf2;
    height: 10px;
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #667eea, #764ba2);
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
}

.key-box {
    background: #0d1117;
    color: #a78bfa;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.95rem;
    overflow: hidden;
}

.key-box span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
}

.modal-content {
    background: white;
    max-width: 400px;
    margin: 15% auto;
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    overflow: hidden;
    width: calc(100% - 2rem);
}

.modal-content h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

input {
    width: 100%;
    padding: 0.9rem;
    margin: 1.2rem 0;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--primary-purple);
}

/* Footer */
footer {
    background: var(--dark-gray);
    color: rgba(255,255,255,0.7);
    padding: 3rem 1.5rem 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.footer-container > * {
    min-width: 0;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-section a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: #a78bfa;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.85rem;
}

/* Focus states for accessibility */
a:focus,
button:focus,
input:focus {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
}

.tab-btn:focus,
.tab-link:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .features { grid-template-columns: 1fr; }
    .main-container { padding: 0 1rem; }
    .container { padding: 2rem 1.5rem; }
    .docs-container { padding: 0 1rem; }
    .endpoint-card { padding: 1.5rem; }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-container {
        flex-direction: row;
        position: relative;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        box-shadow: -4px 0 20px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        gap: 0;
        z-index: 100;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links li {
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links a {
        display: block;
        padding: 1rem 0;
        font-size: 1.1rem;
    }

    .nav-links a.active::after {
        display: none;
    }

    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 99;
    }

    .nav-overlay.open {
        display: block;
    }

    .hero h1, .header-banner h1 { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .use-cases-bar { 
        flex-direction: column; 
        text-align: center;
        padding: 1rem 1.5rem;
    }
    .origin-note { 
        margin: 0 1rem 2rem; 
        padding: 1.25rem 1.5rem;
    }
    .pricing-card { flex: 1 1 100%; }
    .code-example { padding: 2rem 1rem; }

    /* Dashboard mobile fixes */
    .key-box {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        word-break: break-all;
    }

    .key-box button {
        width: 100%;
    }

    .code-block {
        padding: 1rem;
        font-size: 0.75rem;
    }

    .card {
        padding: 1.5rem;
    }

    .stat-val {
        font-size: 2rem;
    }

    select {
        width: 100%;
        margin-top: 0.5rem;
    }

    footer {
        text-align: center;
    }

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-gray: #0d1117;
        --white: #161b22;
        --border-color: #30363d;
        --text-dark: #e6edf3;
        --text-medium: #8b949e;
        --text-light: #6e7681;
    }

    body {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: var(--text-dark);
    }

    nav {
        background: rgba(22, 27, 34, 0.95);
        border-bottom-color: var(--border-color);
    }

    .card, .pricing-card, .feature-card, .container {
        background: var(--white);
        border-color: var(--border-color);
    }

    .hamburger span {
        background: var(--text-dark);
    }

    .nav-links {
        background: var(--white);
    }

    .nav-links li {
        border-bottom-color: var(--border-color);
    }

    .modal-content {
        background: var(--white);
    }

    .modal-content h3 {
        color: var(--text-dark);
    }

    input {
        background: var(--light-gray);
        border-color: var(--border-color);
        color: var(--text-dark);
    }

    .container code {
        background: #21262d;
    }

    .progress-container {
        background: #21262d;
    }

    select {
        background-color: var(--light-gray);
        border-color: var(--border-color);
        color: var(--text-dark);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e6edf3' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    }

    .disclaimer-box {
        background: #3d1f1f;
        border-left-color: #f87171;
        color: #fecaca;
    }
}

/* ========== DOCS-SPECIFIC STYLES ========== */

/* Table of contents grid */
.toc {
    margin: 2rem 0;
}

.toc h2 {
    margin-bottom: 1rem;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
}

.toc-grid a {
    display: block;
    padding: 0.6rem 1rem;
    background: var(--light-gray);
    border-radius: 8px;
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.toc-grid a:hover {
    background: var(--primary-purple);
    color: white;
}

/* Endpoint cards */
.endpoint-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    overflow: hidden;
}

.endpoint-card h2 {
    margin-top: 0;
}

.endpoint-card h3 {
    margin-top: 1.5rem;
}

/* Method badges */
.method {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    font-family: 'Courier New', monospace;
}

.method.get {
    background: #c6f6d5;
    color: #22543d;
}

.method.post {
    background: #bee3f8;
    color: #2c5282;
}

.method.delete {
    background: #fed7d7;
    color: #742a2a;
}

/* Tier badges */
.tier-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    margin-left: 0.5rem;
}

.tier-badge.free {
    background: #c6f6d5;
    color: #22543d;
}

.tier-badge.starter {
    background: #bee3f8;
    color: #2c5282;
}

.tier-badge.pro {
    background: #e9d8fd;
    color: #553c9a;
}

/* Parameter tables - scrollable wrapper via site.js, fallback display:block */
.param-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.table-scroll-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
}

.table-scroll-wrap .param-table {
    margin: 0;
}

.param-table th {
    background: var(--light-gray);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
}

.param-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-medium);
}

.param-table code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--primary-purple);
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.required {
    background: #fed7d7;
    color: #c53030;
}

/* Docs container - wider than default .container */
.docs-container {
    max-width: 1000px;
    margin: 2rem auto 4rem;
    padding: 0 1.5rem;
    overflow: hidden;
}

/* ========== CHANGELOG-SPECIFIC STYLES ========== */

.version-block {
    border-left: 4px solid var(--border-color);
    padding-left: 1.5rem;
    margin-bottom: 2rem;
}

.version-block.latest {
    border-left-color: var(--primary-purple);
}

.version-block h3 {
    color: var(--text-dark);
    margin-top: 0;
}

.version-block p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.version-block ul {
    margin-top: 1rem;
    padding-left: 1rem;
}

.version-block li {
    color: var(--text-medium);
    margin-bottom: 0.4rem;
    line-height: 1.5;
}

.latest-badge {
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-violet));
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    vertical-align: middle;
    margin-left: 0.5rem;
}

/* ========== PRICING-SPECIFIC STYLES (Homepage) ========== */

.pricing-header {
    text-align: center;
    margin-bottom: 2rem;
    width: 100%;
}

.pricing-header h2 {
    font-size: 2.2rem;
    color: white;
}

.pricing-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    width: 100%;
}

.price {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-purple);
    margin-bottom: 0.25rem;
}

.price-period {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.pricing-features {
    list-style: none;
    margin: 1.5rem 0;
    padding: 0;
}

.pricing-features li {
    padding: 0.6rem 0;
    color: var(--text-medium);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.pricing-button {
    display: block;
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-violet));
    color: white;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: opacity 0.2s;
}

.pricing-button:hover {
    opacity: 0.9;
}

.pricing-card.popular {
    border: 3px solid var(--primary-purple);
    transform: scale(1.03);
}

/* ========== CODE EXAMPLE TABS (Homepage) ========== */

.endpoint-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.endpoint-tabs .tab {
    padding: 0.6rem 1.4rem;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.endpoint-tabs .tab:hover,
.endpoint-tabs .tab.active {
    background: white;
    color: var(--primary-purple);
    border-color: white;
}

.tab-content {
    display: none;
}

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

/* Icon styling for feature cards */
.icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

/* ========== RESPONSIVE OVERRIDES ========== */

@media (max-width: 768px) {
    .toc-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .param-table {
        font-size: 0.8rem;
    }

    .param-table th,
    .param-table td {
        padding: 0.5rem 0.4rem;
    }

    .endpoint-card {
        padding: 1.25rem;
    }

    .docs-container {
        padding: 0 0.75rem;
    }

    .pricing-card.popular {
        transform: scale(1);
    }

    .endpoint-tabs {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .param-table th,
    .param-table td {
        padding: 0.4rem 0.3rem;
        font-size: 0.75rem;
    }

    .param-table code {
        font-size: 0.7em;
        word-break: break-all;
    }

    .endpoint-card {
        padding: 1rem;
    }

    .container {
        padding: 1.5rem 1rem;
    }

    .code-block {
        padding: 0.75rem;
        font-size: 0.72rem;
    }
}

@media (prefers-color-scheme: dark) {
    .endpoint-card {
        background: var(--white);
        border-color: var(--border-color);
    }

    .toc-grid a {
        background: #21262d;
    }

    .toc-grid a:hover {
        background: var(--primary-purple);
    }

    .param-table th {
        background: #21262d;
    }

    .param-table code {
        background: #21262d;
    }

    .method.get {
        background: #1a3a2a;
        color: #68d391;
    }

    .tier-badge.free {
        background: #1a3a2a;
        color: #68d391;
    }

    .tier-badge.starter {
        background: #1a2e4a;
        color: #63b3ed;
    }

    .tier-badge.pro {
        background: #2d1f4e;
        color: #b794f4;
    }

    .badge.required {
        background: #3d1f1f;
        color: #fc8181;
    }
}

/* ============================================================
   HOMEPAGE v2 STYLES
   ============================================================ */

/* ---------- Hero ---------- */
.hp-hero {
    padding: 4rem 1.5rem 3rem;
    color: white;
}

.hp-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hp-hero-inner > * {
    min-width: 0;
}

.hp-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hp-hero-sub {
    font-size: 1.12rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.9);
    max-width: 480px;
    margin-bottom: 1.5rem;
}

.hp-hero-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.hp-hero-proof {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.65);
}

/* Buttons */
.hp-btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.hp-btn-primary {
    background: white;
    color: var(--primary-purple);
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.hp-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}

.hp-btn-secondary {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.hp-btn-secondary:hover {
    background: rgba(255,255,255,0.25);
}

.hp-btn-full {
    display: block;
    width: 100%;
    text-align: center;
}

/* ---------- Terminal ---------- */
.hp-term {
    background: #0d1117;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.35);
    border: 1px solid #30363d;
}

.hp-term-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #161b22;
    border-bottom: 1px solid #21262d;
}

.hp-term-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.hp-term-title {
    margin-left: 8px;
    font-size: 0.75rem;
    color: #8b949e;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.hp-term-body {
    padding: 1rem 1.25rem;
    min-height: 220px;
}

.hp-term-req {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.hp-term-method {
    background: #238636;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.hp-term-url {
    color: #58a6ff;
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    word-break: break-all;
}

.hp-term-loader {
    display: none;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-purple), var(--primary-violet), var(--primary-purple));
    background-size: 200% 100%;
    animation: hp-loader 1s linear infinite;
    border-radius: 2px;
    margin-bottom: 0.75rem;
}

@keyframes hp-loader {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.hp-term-meta {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 1.2em;
}

.hp-term-status {
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.hp-term-ok { color: #3fb950; }
.hp-term-fail { color: #f85149; }
.hp-term-time { color: #8b949e; }
.hp-term-err { color: #f0883e; font-size: 0.8rem; }

.hp-term-output {
    position: relative;
}

.hp-term-output pre, #demo-json {
    color: #e6edf3;
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

.hp-term-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 14px;
    background: #161b22;
    border-top: 1px solid #21262d;
    flex-wrap: wrap;
}

.hp-preset {
    padding: 4px 12px;
    background: #21262d;
    color: #8b949e;
    border: 1px solid #30363d;
    border-radius: 6px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s;
}

.hp-preset:hover {
    background: #30363d;
    color: #e6edf3;
}

.hp-term-form {
    flex: 1;
    min-width: 120px;
}

.hp-term-form input {
    width: 100%;
    padding: 4px 10px;
    background: #0d1117;
    color: #e6edf3;
    border: 1px solid #30363d;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
    margin: 0;
    outline: none;
}

.hp-term-form input:focus {
    border-color: var(--primary-purple);
}

.hp-term-form input::placeholder {
    color: #484f58;
}

/* Copy buttons */
.hp-copy-btn {
    padding: 3px 10px;
    background: #21262d;
    color: #8b949e;
    border: 1px solid #30363d;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.hp-copy-btn:hover {
    background: #30363d;
    color: #e6edf3;
}

.hp-copy-json {
    position: absolute;
    top: 0;
    right: 0;
}

/* ---------- Trust Strip ---------- */
.hp-trust {
    padding: 2rem 1.5rem;
    background: rgba(255,255,255,0.06);
}

.hp-trust-inner {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.hp-trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.85);
    font-size: 0.88rem;
    font-weight: 600;
}

.hp-trust-icon {
    font-size: 1rem;
    opacity: 0.7;
}

/* ---------- Before / After ---------- */
.hp-compare {
    padding: 4rem 1.5rem;
}

.hp-compare-inner {
    max-width: 900px;
    margin: 0 auto;
}

.hp-compare h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hp-compare-lead {
    color: rgba(255,255,255,0.75);
    font-size: 1rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.hp-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.hp-compare-grid > * {
    min-width: 0;
}

.hp-compare-card {
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    min-width: 0;
}

.hp-compare-label {
    padding: 0.75rem 1.25rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hp-compare-tag {
    background: var(--light-gray);
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.hp-code-block {
    padding: 1rem 1.25rem;
    background: #0d1117;
    position: relative;
}

.hp-code-block pre {
    color: #e6edf3;
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    line-height: 1.55;
    margin: 0;
    white-space: pre-wrap;
}

.hp-code-block .hp-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
}

.hp-compare-note {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin-top: 1.25rem;
    text-align: center;
}

/* ---------- How It Works ---------- */
.hp-steps {
    padding: 4rem 1.5rem;
    background: rgba(255,255,255,0.04);
}

.hp-steps-inner {
    max-width: 900px;
    margin: 0 auto;
}

.hp-steps h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.hp-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.hp-steps-grid > *,
.hp-pricing-grid > *,
.hp-trust-inner > * {
    min-width: 0;
}

.hp-step {
    background: var(--white);
    border-radius: 14px;
    padding: 2rem 1.5rem;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.hp-step-num {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-violet));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.hp-step h3 {
    color: var(--text-dark);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.hp-step p {
    color: var(--text-medium);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* ---------- Pricing ---------- */
.hp-pricing {
    padding: 4rem 1.5rem;
}

.hp-pricing-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.hp-pricing h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.hp-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.hp-pricing-card {
    background: var(--white);
    border-radius: 14px;
    padding: 2.5rem 2rem;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.hp-pricing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.14);
}

.hp-pricing-card h3 {
    color: var(--text-dark);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.hp-price {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--primary-purple);
}

.hp-price-period {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.hp-pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.hp-pricing-card li {
    padding: 0.5rem 0;
    color: var(--text-medium);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

.hp-pricing-card li:last-child {
    border-bottom: none;
}

/* ---------- FAQ ---------- */
.hp-faq {
    padding: 4rem 1.5rem 2.5rem;
}

.hp-faq-inner {
    max-width: 700px;
    margin: 0 auto;
}

.hp-faq h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.hp-faq-list details {
    background: var(--white);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

.hp-faq-list summary {
    padding: 1rem 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    font-size: 0.95rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hp-faq-list summary::-webkit-details-marker {
    display: none;
}

.hp-faq-list summary::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 400;
    flex-shrink: 0;
    margin-left: 1rem;
}

.hp-faq-list details[open] summary::after {
    content: '\2212';
}

.hp-faq-list details p {
    padding: 0 1.25rem 1rem;
    color: var(--text-medium);
    font-size: 0.9rem;
    line-height: 1.6;
}

.hp-faq-list details code {
    background: #f3f4f6;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.85em;
    color: var(--primary-purple);
}

.hp-faq-list details a {
    color: var(--primary-purple);
    text-decoration: none;
}

.hp-faq-list details a:hover {
    text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hp-hero-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hp-hero h1 { font-size: 2.2rem; }

    .hp-compare-grid {
        grid-template-columns: 1fr;
    }

    .hp-steps-grid {
        grid-template-columns: 1fr;
    }

    .hp-pricing-grid {
        grid-template-columns: 1fr;
        max-width: 380px;
        margin: 0 auto;
    }

    .hp-trust-inner {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .hp-hero { padding: 2.5rem 1.25rem 2rem; }
    .hp-hero h1 { font-size: 1.85rem; }
    .hp-hero-sub { font-size: 1rem; }

    .hp-trust-inner {
        grid-template-columns: 1fr 1fr;
    }

    .hp-trust-item {
        font-size: 0.78rem;
    }

    .hp-compare, .hp-steps, .hp-pricing, .hp-faq {
        padding: 2.5rem 1.25rem;
    }

    .hp-compare h2, .hp-steps h2, .hp-pricing h2, .hp-faq h2 {
        font-size: 1.5rem;
    }

    .hp-term-body {
        padding: 0.75rem 1rem;
        min-height: 180px;
    }

    .hp-term-output pre, #demo-json {
        font-size: 0.72rem;
    }

    .hp-preset {
        font-size: 0.72rem;
        padding: 3px 8px;
    }
}

/* ---------- Page Hero (non-home pages) ---------- */
.hp-page-hero {
    padding: 3.5rem 1.5rem 2.5rem;
    text-align: center;
    color: white;
}

.hp-page-hero-inner {
    max-width: 960px;
    margin: 0 auto;
}

.hp-page-hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hp-page-hero p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .hp-page-hero { padding: 2.5rem 1.25rem 2rem; }
    .hp-page-hero h1 { font-size: 1.8rem; }
    .hp-page-hero p { font-size: 0.95rem; }
}

@media (max-width: 480px) {
    .hp-page-hero h1 { font-size: 1.55rem; }
}

/* ---------- TOC heading ---------- */
.toc h2 {
    color: white;
}

/* ---------- Dashboard toast ---------- */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--dark-gray);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1001;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-violet));
}

/* ---------- Dashboard copy button ---------- */
.btn-copy {
    background: #4a5568;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.15s;
}

.btn-copy:hover {
    background: #2d3748;
}

/* ---------- Dark mode overrides for homepage ---------- */
@media (prefers-color-scheme: dark) {
    .hp-compare-card {
        background: var(--white);
        border-color: var(--border-color);
    }

    .hp-compare-label {
        border-bottom-color: var(--border-color);
    }

    .hp-compare-tag {
        background: #21262d;
    }

    .hp-step, .hp-pricing-card, .hp-faq-list details {
        background: var(--white);
        border-color: var(--border-color);
    }

    .hp-pricing-card li {
        border-bottom-color: var(--border-color);
    }

    .hp-faq-list details code {
        background: #21262d;
    }
}

/* ========== CHANGELOG ADDITIONS ========== */

/* Mini TOC */
.changelog-toc {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.changelog-toc-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-medium);
}

.changelog-toc a {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    background: var(--light-gray);
    border-radius: 6px;
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

.changelog-toc a:hover {
    background: var(--primary-purple);
    color: white;
}

/* Year headings */
.changelog-year {
    color: var(--text-dark);
    font-size: 1.4rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.changelog-year:first-of-type {
    margin-top: 0;
}

/* Stability line in latest block */
.changelog-stability {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

/* Learn-more links row */
.changelog-links {
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.changelog-links a {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
}

.changelog-links a:hover {
    text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
    .changelog-toc a {
        background: #21262d;
    }

    .changelog-toc a:hover {
        background: var(--primary-purple);
    }

    .changelog-year {
        border-bottom-color: var(--border-color);
    }
}
