:root {
    /* Colors - improved contrast */
    --color-bg: #000;
    --color-text: #fff;
    --color-text-muted: #999;
    --color-text-secondary: #d0d0d0;
    --color-accent: #6af;
    --color-accent-hover: #8cf;
    --color-border: #333;
    --color-surface: rgba(255, 255, 255, 0.05);
    --color-surface-hover: rgba(255, 255, 255, 0.08);

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: 4rem;

    /* Typography */
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.75rem;
    --font-size-2xl: 2.5rem;
    --font-size-3xl: 3rem;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

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

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(102, 170, 255, 0.15);
}

/* Light theme */
html[data-theme="light"],
:root[data-theme="light"] {
    --color-bg: #fff;
    --color-text: #111;
    --color-text-muted: #666;
    --color-text-secondary: #444;
    --color-accent: #0066cc;
    --color-accent-hover: #0052a3;
    --color-border: #ddd;
    --color-surface: rgba(0, 0, 0, 0.03);
    --color-surface-hover: rgba(0, 0, 0, 0.06);

    /* Shadows - lighter for light mode */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(0, 102, 204, 0.1);
}

/* Light theme element overrides */
[data-theme="light"] header .logo img {
    filter: invert(1);
}

[data-theme="light"] header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .prose h2,
[data-theme="light"] .prose h3,
[data-theme="light"] .prose strong {
    color: var(--color-text);
}

[data-theme="light"] .prose p,
[data-theme="light"] .prose ul,
[data-theme="light"] .prose ol,
[data-theme="light"] .prose li {
    color: var(--color-text-secondary);
}

[data-theme="light"] .prose a:hover {
    color: var(--color-accent-hover);
}

[data-theme="light"] .prose code {
    color: #d14;
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .btn-primary:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
}

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

/* Better focus visibility */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Inter (variable, 400–700), self-hosted from Google Fonts v20 */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/inter-v20-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: 400 700;
    font-display: swap;
    src: url('/fonts/inter-v20-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

html {
    height: 100%;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    min-height: 100%;
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background-color: var(--color-bg);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-base), background-color var(--transition-base);
}

header.scrolled {
    border-bottom-color: var(--color-border);
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
}

#content {
    padding-top: 5rem;
}

.skip-link {
    position: absolute;
    top: -3rem;
    left: var(--space-md);
    z-index: 1001;
    padding: 0.5rem 1rem;
    background: var(--color-accent);
    color: #000;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus-visible {
    top: var(--space-sm);
}

header .logo img {
    height: 2rem;
    display: block;
    transition: opacity var(--transition-fast);
}

header .logo:hover img {
    opacity: 0.8;
}

header nav {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

header nav a {
    color: var(--color-text);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    position: relative;
    padding: var(--space-xs) 0;
    transition: color var(--transition-fast);
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition-fast);
}

header nav a:hover,
header nav a.active {
    color: var(--color-accent);
}

header nav a:hover::after,
header nav a.active::after {
    width: 100%;
}

/* Get Cogitae as accent button in nav */
header nav a.nav-cta {
    background: var(--color-accent);
    color: var(--color-bg);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

header nav a.nav-cta::after {
    display: none;
}

header nav a.nav-cta:hover {
    background: var(--color-accent-hover);
    color: var(--color-bg);
}

/* Theme toggles */
.theme-toggles {
    display: flex;
    gap: var(--space-xs);
    align-items: center;
}

.theme-toggle-btn {
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-text-muted);
}

/* Mobile hamburger menu - hidden on desktop */
.mobile-menu-toggle {
    display: none !important;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--space-xs);
    line-height: 1;
}

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

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block !important;
    }

    header nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        padding: var(--space-md);
        gap: var(--space-sm);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform var(--transition-base), opacity var(--transition-base), visibility var(--transition-base);
    }

    header nav.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    header nav a {
        padding: var(--space-sm);
        font-size: var(--font-size-base);
        text-align: center;
    }

    header nav a.nav-cta {
        width: 100%;
        text-align: center;
        padding: var(--space-sm);
    }

    .theme-toggles {
        justify-content: center;
        padding-top: var(--space-sm);
        border-top: 1px solid var(--color-border);
        margin-top: var(--space-xs);
    }
}

footer {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    padding: var(--space-lg) var(--space-md);
    margin-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.footer-company {
    flex: 1;
    min-width: 200px;
}

.footer-company h3 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.footer-company p {
    color: var(--color-text-muted);
    line-height: 1.6;
}

.footer-contact {
    text-align: right;
    min-width: 200px;
}

.footer-contact a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.footer-contact p {
    margin-bottom: var(--space-xs);
}

.footer-links {
    max-width: 1200px;
    margin: var(--space-md) auto 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-links a {
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    max-width: 1200px;
    margin: var(--space-md) auto 0;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

footer a {
    color: var(--color-text-muted);
}

/* Title Banner */
.title {
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    padding: var(--space-sm) var(--space-md) 0;
    max-width: 1200px;
    margin: 0 auto;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.subtitle {
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    padding: 0 var(--space-md) var(--space-sm);
    max-width: 1200px;
    margin: 0 auto;
    letter-spacing: 0.05em;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.footer-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-md);
    margin-top: var(--space-sm);
}

.product-hunt-badge,
.alternativeto-badge {
    display: inline-block;
    line-height: 0;
}

.product-hunt-badge img,
.alternativeto-badge img {
    height: 40px;
    width: auto;
}

/* Homepage */
.hero {
    text-align: center;
    padding: var(--space-xl) var(--space-md) var(--space-lg);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-logo {
    height: 5rem;
    margin-bottom: var(--space-sm);
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.1));
}

.tagline {
    font-size: var(--font-size-xl);
    color: var(--color-text-secondary);
    font-weight: 300;
    letter-spacing: 0.02em;
    margin-bottom: var(--space-xs);
}

.tagline-sub {
    font-size: var(--font-size-base);
    color: var(--color-text-muted);
    font-weight: 400;
}

.btn {
    display: inline-block;
    background: var(--color-text);
    color: var(--color-bg);
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--font-size-sm);
    letter-spacing: 0.01em;
    transition: all var(--transition-fast);
    border: 2px solid var(--color-text);
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background: transparent;
    color: var(--color-text);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-border);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--color-surface);
    border-color: var(--color-text-muted);
    transform: translateY(-2px);
}

/* Documentation layout */
.doc-layout {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.doc-toc {
    width: 250px;
    flex-shrink: 0;
    padding: var(--space-md) 0 var(--space-md) var(--space-md);
}

.doc-toc nav {
    position: sticky;
    top: 5rem;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    padding-right: var(--space-sm);
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

.doc-toc nav::-webkit-scrollbar {
    width: 4px;
}

.doc-toc nav::-webkit-scrollbar-track {
    background: transparent;
}

.doc-toc nav::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 2px;
}

.doc-toc h2 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--color-border);
}

.doc-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.doc-toc li {
    margin-bottom: 0.35rem;
}

.doc-toc a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: var(--font-size-sm);
    display: block;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    border-left: 2px solid transparent;
    transition: all var(--transition-fast);
}

.doc-toc a:hover {
    color: var(--color-text);
    background: var(--color-surface);
    border-left-color: var(--color-text-muted);
}

.doc-toc a.active {
    color: var(--color-accent);
    background: var(--color-surface);
    border-left-color: var(--color-accent);
    font-weight: 500;
}

.doc-toc ul ul {
    padding-left: 0.75rem;
    margin-top: 0.25rem;
    border-left: 1px solid var(--color-border);
    margin-left: 0.75rem;
}

.doc-toc ul ul a {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

/* Prose/Article styles */
.prose {
    flex: 1;
    min-width: 0;
    max-width: 720px;
    padding: 2rem;
    line-height: 1.8;
    overflow: hidden;
}

@media (max-width: 900px) {
    .doc-layout {
        flex-direction: column;
    }

    .doc-toc {
        width: 100%;
        padding: 1rem 2rem;
    }

    .doc-toc nav {
        position: static;
        max-height: none;
    }
}

.prose h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.prose h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.prose h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #ddd;
}

.prose p {
    margin-bottom: 1.25rem;
    color: #ccc;
}

.prose strong {
    color: #fff;
    font-weight: 600;
}

.prose ul, .prose ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
    color: #ccc;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.prose a:hover {
    text-decoration: underline;
    color: #8cf;
}

.prose img {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
    margin: var(--space-md) 0;
    box-sizing: border-box;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    cursor: zoom-in;
}

.prose img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.prose hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-border), transparent);
    margin: var(--space-lg) 0;
}

/* Prose tables */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-md) 0;
    font-size: var(--font-size-sm);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.prose thead {
    background: rgba(255, 255, 255, 0.08);
}

.prose th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.prose td {
    padding: 0.75rem 1rem;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}

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

.prose tbody tr {
    transition: background var(--transition-fast);
}

.prose tbody tr:hover {
    background: var(--color-surface-hover);
}

/* Prose code (inline) */
.prose code {
    background: var(--color-surface);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    color: #e6db74;
    border: 1px solid var(--color-border);
}

/* Prose code blocks */
.prose pre {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    overflow-x: auto;
    margin: var(--space-md) 0;
}

.prose pre code {
    background: none;
    padding: 0;
    border: none;
    color: var(--color-text-secondary);
}

/* Document meta (last updated) */
.doc-meta {
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    font-style: italic;
}

/* Reading progress indicator */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, var(--color-accent), #8cf);
    z-index: 1001;
    transition: width 0.1s linear;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: var(--space-md);
    right: var(--space-md);
    width: 44px;
    height: 44px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 100;
}

.back-to-top:hover {
    background: var(--color-surface-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .hero {
        padding: var(--space-lg) var(--space-sm) var(--space-md);
    }

    .hero-logo {
        height: 4rem;
    }

    .tagline {
        font-size: var(--font-size-lg);
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-md);
    }

    .footer-contact {
        text-align: center;
    }

    header nav {
        gap: var(--space-sm);
    }
}

/* Get Cogitae Page */
.get-cogitae-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
}

.get-cogitae-hero {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.get-cogitae-hero h1 {
    font-size: var(--font-size-3xl);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.get-cogitae-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
}

.get-cogitae-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.price {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--color-text);
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: var(--font-size-base);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(102, 170, 255, 0.2);
}

.form-group input:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.form-group input::placeholder {
    color: var(--color-text-muted);
}

/* Verification code input - separate boxes */
.code-inputs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.code-inputs input {
    flex: 1;
    min-width: 0;
    max-width: 3rem;
    height: 3.5rem;
    text-align: center;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    caret-color: var(--color-accent);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.code-inputs input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(102, 170, 255, 0.2);
}

.code-inputs input:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.code-inputs input:not(:placeholder-shown) {
    border-color: var(--color-text-muted);
}

.form-hint {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

.form-hint a {
    color: var(--color-accent);
}

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

.btn-primary:hover {
    background: #8cf;
    border-color: #8cf;
    color: var(--color-bg);
}

.btn-large {
    width: 100%;
    padding: 1rem 2rem;
    font-size: var(--font-size-lg);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    background: rgba(255, 100, 100, 0.1);
    border: 1px solid rgba(255, 100, 100, 0.3);
    color: #f88;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    margin-top: var(--space-md);
    font-size: var(--font-size-sm);
}

.success-message {
    background: rgba(100, 255, 100, 0.1);
    border: 1px solid rgba(100, 255, 100, 0.3);
    color: #6f6;
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    margin-top: var(--space-md);
    font-size: var(--font-size-sm);
    text-align: center;
    line-height: 1.6;
}

.success-message .btn {
    margin-top: var(--space-sm);
}

.success-message .setup-video-link {
    display: flex;
    width: fit-content;
}

.get-cogitae-faq {
    margin-top: var(--space-xl);
}

.get-cogitae-faq h2 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.faq-item {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.faq-item p {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.faq-item a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.faq-item a:hover {
    text-decoration: underline;
    color: var(--color-accent-hover);
}

/* Message Pages (Success/Cancel) */
.message-page {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
    text-align: center;
}

.message-icon {
    font-size: 4rem;
    margin-bottom: var(--space-md);
    line-height: 1;
}

.success-page .message-icon {
    color: #6f6;
}

.cancel-page .message-icon {
    color: #f66;
}

.message-page h1 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.message-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.message-content {
    text-align: left;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
}

.message-content h2 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.message-content ol {
    padding-left: 1.5rem;
    margin: 0;
    color: var(--color-text-secondary);
}

.message-content li {
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.message-content p {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.message-note {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-md);
}

.message-note a {
    color: var(--color-accent);
    text-decoration: none;
}

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

.message-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* Success Page Download Section */
.success-download-section {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.success-download-card {
    text-align: center;
    padding: var(--space-md) 0;
}

.success-download-card .download-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--font-size-lg);
}

.success-download-card .download-icon-svg {
    flex-shrink: 0;
}

.download-meta-info {
    margin-top: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.download-meta-info .meta-separator {
    margin: 0 var(--space-xs);
}

.success-next-steps {
    margin-top: var(--space-md);
}

@media (max-width: 768px) {
    .get-cogitae-page {
        padding: var(--space-md) var(--space-sm);
    }

    .get-cogitae-hero h1 {
        font-size: var(--font-size-2xl);
    }

    .get-cogitae-card {
        padding: var(--space-md);
    }

    .price {
        font-size: var(--font-size-2xl);
    }

    .message-page {
        padding: var(--space-lg) var(--space-sm);
    }

    .message-actions {
        flex-direction: column;
    }

    .message-actions .btn {
        width: 100%;
    }
}

/* Download Page */
.download-page {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
}

.download-hero {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.download-hero h1 {
    font-size: var(--font-size-3xl);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.download-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
}

.download-main {
    margin-bottom: var(--space-xl);
}

.download-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    margin-bottom: var(--space-lg);
}

.download-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.version-badge {
    background: var(--color-accent);
    color: var(--color-bg);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.meta-separator {
    color: var(--color-border);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: auto;
    min-width: 240px;
    max-width: 320px;
    font-size: var(--font-size-lg);
    padding: 1rem 2rem;
}

.download-icon-svg {
    width: 22px;
    height: 22px;
    min-width: 22px;
    max-width: 22px;
    flex-shrink: 0;
}

.eula-container {
    margin-bottom: var(--space-lg);
    text-align: left;
}

.eula-container h3 {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.eula-text {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    color: var(--color-text-secondary);
    background: var(--color-bg);
}

.eula-text h1, .eula-text h2, .eula-text h3, .eula-text h4 {
    color: var(--color-text);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.eula-text h1 { font-size: var(--font-size-lg); }
.eula-text h2 { font-size: var(--font-size-base); }
.eula-text h3, .eula-text h4 { font-size: var(--font-size-sm); }

.eula-text p { margin-bottom: 0.75em; }

.eula-text ul, .eula-text ol {
    margin-bottom: 0.75em;
    padding-left: 1.5em;
}

.eula-text li { margin-bottom: 0.25em; }

.eula-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
    cursor: pointer;
    font-size: var(--font-size-sm);
}

.eula-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-accent);
    cursor: pointer;
    flex-shrink: 0;
}

.download-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.download-details {
    margin-top: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.download-details span:not(:empty) {
    margin-right: var(--space-xs);
}

.setup-video-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-lg);
    color: var(--color-accent);
    font-size: var(--font-size-sm);
    text-decoration: none;
}

.setup-video-link:hover {
    background: var(--color-accent);
    color: var(--color-bg);
}

.download-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.download-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
}

.download-section h2 {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

.changelog-link {
    text-align: center;
    margin-top: var(--space-md);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.changelog-link a {
    color: var(--color-accent);
}

.requirements-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.requirements-list li {
    padding: var(--space-xs) 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.requirements-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #6f6;
    font-weight: bold;
}

.release-notes {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

.release-notes h3 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text);
    margin-top: var(--space-sm);
    margin-bottom: var(--space-xs);
}

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

.release-notes h4 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text);
    margin-top: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.release-notes p {
    margin-bottom: var(--space-sm);
}

.release-notes p:last-child {
    margin-bottom: 0;
}

.release-notes ul {
    padding-left: 1.25rem;
    margin-bottom: var(--space-sm);
}

.release-notes li {
    margin-bottom: var(--space-xs);
}

.error-text {
    color: #f66;
}

.download-cta {
    text-align: center;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.download-cta p {
    color: var(--color-text-muted);
    margin: 0;
}

.download-cta .btn-secondary {
    background: var(--color-surface-hover);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.download-cta .btn-secondary:hover {
    background: var(--color-accent);
    color: var(--color-bg);
}

@media (max-width: 768px) {
    .download-page {
        padding: var(--space-lg) var(--space-sm);
    }

    .download-hero h1 {
        font-size: var(--font-size-2xl);
    }

    .download-card {
        padding: var(--space-lg) var(--space-md);
    }

    .download-btn {
        width: 100%;
        max-width: none;
    }

    .download-grid {
        grid-template-columns: 1fr;
    }

    .download-cta {
        flex-direction: column;
        gap: var(--space-sm);
    }
}

/* Skeleton Loaders */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-surface) 25%,
        var(--color-surface-hover) 50%,
        var(--color-surface) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 1em;
    width: 80%;
    display: inline-block;
}

.skeleton-text-sm {
    height: 0.875em;
    width: 60%;
    display: inline-block;
}

.skeleton-price {
    height: 2.5rem;
    width: 5rem;
    display: inline-block;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Form Step Transitions */
.verification-step {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity var(--transition-base), transform var(--transition-base);
}

.verification-step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Button micro-interactions */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.btn:hover::after {
    transform: translateX(100%);
}

.btn:active {
    transform: scale(0.98);
}

/* Card hover effects with gradient border */
.get-cogitae-card,
.download-card,
.download-section {
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.get-cogitae-card:hover,
.download-card:hover,
.download-section:hover {
    border-color: var(--color-text-muted);
    box-shadow: var(--shadow-glow);
}

/* Social links in footer */
.footer-social {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    margin-bottom: var(--space-sm);
}

.footer-social a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 1.25rem;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.footer-social a:hover {
    color: var(--color-accent);
    transform: translateY(-2px);
}

/* Documentation search */
.doc-search {
    margin-bottom: var(--space-sm);
}

.doc-search input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    padding-left: 2rem;
    font-size: var(--font-size-sm);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.doc-search input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(102, 170, 255, 0.2);
}

.doc-search input:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

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

.doc-search-wrapper {
    position: relative;
}

.doc-search-wrapper::before {
    content: "⌕";
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    pointer-events: none;
}

/* Read time indicator */
.read-time {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.read-time::before {
    content: "⏱";
}

/* Step indicator improvements */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.step-indicator .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    opacity: 0.5;
    transition: opacity var(--transition-base);
}

.step-indicator .step.active,
.step-indicator .step.completed {
    opacity: 1;
}

.step-indicator .step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--font-size-sm);
    transition: all var(--transition-base);
}

.step-indicator .step.active .step-dot {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-bg);
}

.step-indicator .step.completed .step-dot {
    background: #6f6;
    border-color: #6f6;
    color: var(--color-bg);
}

.step-indicator .step.completed .step-dot::after {
    content: "✓";
}

.step-indicator .step-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.step-indicator .step.active .step-label {
    color: var(--color-text);
}

.step-indicator .step-line {
    flex: 1;
    height: 2px;
    background: var(--color-border);
    margin: 0 var(--space-sm);
    max-width: 60px;
    transition: background var(--transition-base);
}

.step-indicator .step-line.completed {
    background: #6f6;
}

/* Trial Summary */
.trial-summary {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    text-align: center;
}

.trial-summary p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

.trial-summary p:last-child {
    margin-bottom: 0;
}

.trial-note {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted) !important;
}

/* License Key Display */
.license-key-display {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin: var(--space-md) 0;
    text-align: center;
}

.license-key-label {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.license-key {
    display: block;
    font-size: var(--font-size-lg);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    color: var(--color-accent);
    background: none;
    border: none;
    padding: var(--space-sm) 0;
    letter-spacing: 0.05em;
    word-break: break-all;
}

.btn-copy {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-top: var(--space-xs);
}

.btn-copy:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-text-muted);
}

.license-key-note {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-sm);
    margin-bottom: 0;
}

/* Flow Selector (Trial/Purchase options) */
.flow-selector {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.flow-upgrade-link {
    margin: calc(-1 * var(--space-sm)) 0 var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.flow-option {
    display: block;
    cursor: pointer;
}

.flow-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.flow-option-content {
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: all var(--transition-fast);
}

.flow-option input[type="radio"]:checked + .flow-option-content {
    border-color: var(--color-accent);
    background: rgba(102, 170, 255, 0.05);
}

.flow-option:hover .flow-option-content {
    border-color: var(--color-text-muted);
}

.flow-option input[type="radio"]:checked + .flow-option-content:hover {
    border-color: var(--color-accent);
}

.flow-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
}

.flow-option-title {
    font-weight: 600;
    font-size: var(--font-size-base);
    color: var(--color-text);
}

.flow-option-price {
    font-weight: 700;
    font-size: var(--font-size-lg);
    color: var(--color-accent);
}

.flow-option-price s {
    color: var(--color-text-muted);
    font-weight: 500;
}

.flow-option-desc {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin: 0;
}

.flow-option-field .form-group {
    margin: 0.75rem 0 0;
}

.flow-option-field .form-group label {
    font-size: var(--font-size-sm);
}

.flow-option-field input[type="email"],
.flow-option-field input[type="text"] {
    font-size: var(--font-size-sm);
}

/* Verified Email Display */
.verified-email {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.verified-label {
    font-size: var(--font-size-sm);
    color: #6f6;
    font-weight: 500;
}

.verified-value {
    font-size: var(--font-size-base);
    color: var(--color-text);
}

/* Purchase Summary */
.purchase-summary {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.purchase-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
}

.purchase-note {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin: 0;
}

/* Resend Section */
.resend-section {
    text-align: center;
    margin-top: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* Link Buttons */
.btn-link {
    background: none;
    border: none;
    color: var(--color-accent);
    font-size: var(--font-size-sm);
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.btn-link:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

.back-link {
    display: block;
    margin-top: var(--space-md);
    text-align: center;
}

/* Step Content */
/* Headings take focus when a step appears, for screen readers; no ring needed */
.step-content h2:focus {
    outline: none;
}

.step-content h2 {
    text-align: center;
    margin-bottom: var(--space-md);
    font-size: var(--font-size-xl);
    font-weight: 600;
}

.verification-info {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

/* License Loading State */
.license-loading {
    text-align: center;
    padding: var(--space-lg) var(--space-md);
}

.license-loading p {
    color: var(--color-text-muted);
    margin-top: var(--space-md);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

.license-display {
    text-align: center;
}

/* Recover License Card (Support Page) */
.recover-license-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin: var(--space-md) 0;
    max-width: 500px;
}

.recover-step {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity var(--transition-base), transform var(--transition-base);
}

.recover-step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
    animation: slideIn 0.3s ease-out;
}

/* Plugins Page */
.plugins-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
}

.plugins-hero {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.plugins-hero h1 {
    font-size: var(--font-size-3xl);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.plugins-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
}

.plugins-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-xl);
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.plugins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.plugin-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.plugin-card:hover {
    border-color: var(--color-text-muted);
    box-shadow: var(--shadow-glow);
}

.plugin-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.plugin-meta {
    flex: 1;
    min-width: 0;
}

.plugin-meta h2 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin: 0 0 var(--space-xs);
    color: var(--color-text);
}

.plugin-domain {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    color: var(--color-text-muted);
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.plugin-description {
    flex: 1;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.plugins-cta {
    text-align: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.plugins-cta h2 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.plugins-cta p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .plugins-page {
        padding: var(--space-md) var(--space-sm);
    }

    .plugins-hero h1 {
        font-size: var(--font-size-2xl);
    }

    .plugins-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Homepage Additions
   ========================================================= */

/* Feature Pills */
.feature-pills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    max-width: 900px;
    margin: 0 auto var(--space-lg);
    padding: 0 var(--space-md);
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.feature-pill {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.feature-pill:hover {
    border-color: var(--color-text-muted);
    box-shadow: var(--shadow-glow);
}

.feature-pill strong {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.2rem;
}

.feature-pill p {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.4;
    margin: 0;
}

.feature-pill a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.feature-pill a:hover {
    text-decoration: underline;
    color: var(--color-accent-hover);
}

@media (max-width: 640px) {
    .feature-pills {
        grid-template-columns: 1fr;
    }
}

/* Homepage Screenshot */
.homepage-screenshot {
    text-align: center;
    margin: var(--space-xl) auto;
}

.homepage-screenshot-img {
    width: 903px;
    height: 483px;
    max-width: 100%;
    height: auto;
}

/* Homepage CTA Footer */
.homepage-cta {
    text-align: center;
    max-width: 600px;
    margin: var(--space-xl) auto;
    padding: var(--space-xl) var(--space-md);
    border-top: 1px solid var(--color-border);
}

.homepage-cta h2 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.homepage-cta p {
    color: var(--color-text-muted);
    font-size: var(--font-size-base);
}

/* ── Differentiators Section ─────────────────────────────────────────── */
.differentiators {
    max-width: 1100px;
    margin: 4rem auto 3rem;
    padding: 0 1.5rem;
    text-align: center;
}

.differentiators-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.differentiators-sub {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
}

.differentiators-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    text-align: left;
}

@media (max-width: 900px) {
    .differentiator-card {
        flex: 0 1 calc(50% - 0.75rem);
    }
}

@media (max-width: 580px) {
    .differentiator-card {
        flex: 1 1 100%;
    }
}

.differentiator-card {
    background: var(--color-surface, rgba(128,128,128,0.07));
    border: 1px solid var(--color-border, rgba(128,128,128,0.15));
    border-radius: 14px;
    padding: 1.5rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex: 0 1 calc(33.333% - 1rem);
    box-sizing: border-box;
}

.differentiator-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.differentiator-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.differentiator-card p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0;
}

.differentiator-card a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.differentiator-card a:hover {
    text-decoration: underline;
    color: var(--color-accent-hover);
}

.feature-section {
    max-width: 1100px;
    margin: 4rem auto 3rem;
    padding: 0 1.5rem;
    text-align: center;
}

.feature-section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.feature-section-sub {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
}

.feature-section-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    text-align: left;
}

.feature-section-card {
    background: var(--color-surface, rgba(128,128,128,0.07));
    border: 1px solid var(--color-border, rgba(128,128,128,0.15));
    border-radius: 14px;
    padding: 1.5rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex: 0 1 calc(33.333% - 1rem);
    box-sizing: border-box;
}

.feature-section-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.feature-section-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.feature-section-card p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 900px) {
    .feature-section-card {
        flex: 0 1 calc(50% - 0.75rem);
    }
}

@media (max-width: 580px) {
    .feature-section-card {
        flex: 1 1 100%;
    }
}

/* ── Toolbox ──────────────────────────────────────────────────────────── */
.toolbox {
    max-width: 1100px;
    margin: 4rem auto 3rem;
    padding: 0 1.5rem;
    text-align: center;
}

.toolbox-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.toolbox-sub {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
}

.toolbox-categories {
    columns: 2;
    column-gap: 1.5rem;
}

@media (max-width: 768px) {
    .toolbox-categories {
        columns: 1;
    }
}

.toolbox-category {
    break-inside: avoid;
    background: var(--color-surface, rgba(128,128,128,0.07));
    border: 1px solid var(--color-border, rgba(128,128,128,0.15));
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.toolbox-category h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-accent);
}

.toolbox-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toolbox-category li {
    font-size: 0.82rem;
    line-height: 1.5;
    padding: 0.2rem 0;
    color: var(--color-text-muted);
}

.toolbox-category li strong {
    color: var(--color-text);
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 0.78rem;
    margin-right: 0.4rem;
}

.tool-badge-plugin,
.tool-badge-premium {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 0.3rem;
    letter-spacing: 0.02em;
    position: relative;
    top: -1px;
}

.tool-badge-plugin::before {
    content: "\1F9E9";
    margin-right: 0.2rem;
    font-size: 0.7rem;
}

.tool-badge-plugin {
    color: var(--color-text-muted);
    border: 1px solid var(--color-border, rgba(128,128,128,0.25));
    background: transparent;
}

.tool-badge-premium {
    color: #f0c040;
    border: 1px solid rgba(240, 192, 64, 0.35);
    background: rgba(240, 192, 64, 0.08);
}

.toolbox-more {
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.toolbox-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.toolbox-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* ── Blog ─────────────────────────────────────────────────────────────── */
.blog-container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-lg) 1.5rem;
}

.doc-layout > .blog-container {
    max-width: none;
    flex: 1;
    min-width: 0;
    margin: 0;
}

.blog-container > h1 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-sm);
}

.blog-disclaimer {
    margin-bottom: var(--space-lg);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
    font-style: italic;
    color: var(--color-text-muted);
    border-left: 3px solid var(--color-accent);
    background: var(--color-surface);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.blog-intro {
    margin-bottom: var(--space-lg);
    color: var(--color-text-muted);
}

.blog-posts {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.blog-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.blog-card a {
    display: block;
    padding: var(--space-md);
    text-decoration: none;
    color: inherit;
}

.blog-card h2 {
    font-size: var(--font-size-xl);
    margin: var(--space-xs) 0;
    color: var(--color-text);
}

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

.blog-excerpt {
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: var(--space-xs) 0;
    max-height: 4.8em;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
}

.blog-excerpt p {
    margin: 0;
}

.blog-read-more {
    color: var(--color-accent);
    font-size: var(--font-size-sm);
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.6rem;
}

.blog-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted, #999);
    text-decoration: none;
    transition: border-color 0.2s;
}

a.blog-tag:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.blog-post .blog-tags {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.blog-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.blog-back {
    color: var(--color-accent);
    text-decoration: none;
    font-size: var(--font-size-sm);
}

.blog-back:hover {
    text-decoration: underline;
}

/* Mobile Page */
.mobile-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
}

.mobile-intro {
    max-width: 700px;
    margin: 0 auto var(--space-lg);
    text-align: center;
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.mobile-intro a {
    color: var(--color-accent);
}

.app-store-badge {
    display: inline-block;
    margin-top: 0.75rem;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.app-store-badge:hover {
    opacity: 1;
}

.mobile-iphone-screenshot {
    display: block;
    margin: var(--space-lg) auto 0;
    width: 302px;
    height: auto;
    max-width: 100%;
}

.mobile-free-period {
    background: rgba(102, 170, 255, 0.05);
    border: 1px solid rgba(102, 170, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    text-align: center;
}

.mobile-free-period h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--color-accent);
}

.mobile-free-period p {
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
}

.mobile-free-notice {
    background: rgba(102, 170, 255, 0.05);
    border: 1px solid rgba(102, 170, 255, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    text-align: center;
}

.mobile-free-notice p {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 768px) {
    .mobile-page {
        padding: var(--space-md) var(--space-sm);
    }

    .mobile-intro {
        font-size: var(--font-size-base);
    }
}

.success-eula {
    justify-content: center;
    margin: 0 0 var(--space-md);
}

.success-eula a {
    color: var(--color-accent);
}

/* Section screenshots on the homepage */
.section-screenshot {
    max-width: 1000px;
    margin: 0 auto 2.5rem;
}

.section-screenshot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.section-screenshot figcaption {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
