/* ========================================
   TrueAsync — Static Site Styles
   Design based on php.net/releases/8.5
   ======================================== */

:root {
    --color-primary: #6B58FF;
    --color-primary-dark: #5A47E6;
    --color-navbar: #EEEAFF;
    --color-navbar-link-hover: #6B58FF;
    --color-text: #1F2937;
    --color-text-secondary: #4B5563;
    --color-text-muted: #6B7280;
    --color-bg: #ffffff;
    --color-bg-subtle: #F9FAFB;
    --color-border: #E5E7EB;
    --color-card-border: rgba(0, 0, 0, 0.05);
    --color-code-bg: #F3F4F6;
    --font-sans: 'Fira Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Fira Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-3xl: 1.5rem;
    --radius-4xl: 2rem;
    --radius-full: 9999px;
}

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

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

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
    list-style: none;
}

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

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-text);
}

/* ---- Navbar ---- */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--color-navbar);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    height: 3.5rem;
}

.navbar-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    height: 100%;
    gap: 1.5rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text);
    font-weight: 600;
    font-size: 1.125rem;
    flex-shrink: 0;
    text-decoration: none;
}

.navbar-brand img {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-md);
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 0.25rem;
    margin-left: auto;
}

.navbar-toggle svg {
    width: 24px;
    height: 24px;
}

.navbar-menu {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 1.5rem;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0;
}

.navbar-link {
    display: block;
    padding: 0.75rem 0.75rem;
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    transition: color 0.15s ease, background-color 0.15s ease;
    border-radius: var(--radius-md);
    white-space: nowrap;
}

.navbar-link:hover {
    color: var(--color-navbar-link-hover);
    background: rgba(107, 88, 255, 0.08);
}

.navbar-link.active {
    color: var(--color-navbar-link-hover);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.navbar-lang {
    display: flex;
    gap: 0.125rem;
    background: rgba(107, 88, 255, 0.1);
    border-radius: var(--radius-full);
    padding: 0.125rem;
}

.lang-link {
    display: block;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    border-radius: var(--radius-full);
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

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

.lang-link.active {
    background: rgba(107, 88, 255, 0.15);
    color: var(--color-primary);
}

/* Language Dropdown (multi-language) */

.lang-dropdown {
    position: relative;
}

.lang-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.625rem;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    background: rgba(107, 88, 255, 0.1);
    border: 1px solid rgba(107, 88, 255, 0.15);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.lang-dropdown-toggle:hover {
    background: rgba(107, 88, 255, 0.18);
    color: var(--color-text);
}

.lang-dropdown-toggle svg {
    width: 12px;
    height: 12px;
    opacity: 0.7;
    transition: transform 0.15s ease;
}

.lang-dropdown.open .lang-dropdown-toggle svg {
    transform: rotate(180deg);
}

.lang-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.375rem);
    right: 0;
    min-width: 10rem;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 0.25rem;
    z-index: 200;
}

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

.lang-option {
    display: block;
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: all 0.1s ease;
    white-space: nowrap;
}

.lang-option:hover {
    background: var(--color-bg-subtle);
    color: var(--color-text);
}

.lang-option.active {
    color: var(--color-primary);
    font-weight: 600;
    background: rgba(107, 88, 255, 0.06);
}

.github-link {
    display: flex;
    align-items: center;
    color: var(--color-text);
    opacity: 0.85;
    transition: opacity 0.15s ease;
}

.github-link:hover {
    opacity: 1;
}

.github-link svg {
    width: 22px;
    height: 22px;
}

/* ---- Hero ---- */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5.5rem 1rem 2.5rem;
    overflow: hidden;
    background: var(--color-bg);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 25% 55%, rgba(107, 88, 255, 0.13), transparent),
        radial-gradient(ellipse 50% 70% at 75% 25%, rgba(133, 109, 255, 0.09), transparent),
        radial-gradient(ellipse 60% 50% at 55% 85%, rgba(210, 203, 255, 0.18), transparent);
    z-index: 0;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(31, 41, 55, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 56rem;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.875rem;
    background: rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.hero-badge svg {
    width: 16px;
    height: 16px;
    color: #14b8a6;
    display: inline-block;
}

.hero-logo {
    width: auto;
    max-width: 280px;
    height: auto;
    margin: 0 auto 1.5rem;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 0.75rem;
    text-wrap: balance;
}

.hero-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    max-width: 42rem;
    margin: 0 auto 1.5rem;
    text-wrap: balance;
}

.hero-description strong {
    color: var(--color-text);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* ---- Buttons ---- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.5rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

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

.btn-secondary {
    background: #fff;
    color: var(--color-text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

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

.btn-lg {
    min-height: 2.75rem;
    padding: 0.625rem 1.75rem;
    font-size: 0.9375rem;
}

/* ---- Features ---- */

.features {
    position: relative;
    z-index: 10;
    padding: 3rem 1rem 4rem;
}

.features-header {
    text-align: center;
    max-width: 80rem;
    margin: 0 auto 2rem;
}

.features-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.features-grid {
    display: grid;
    gap: 1rem;
    max-width: 80rem;
    margin: 0 auto;
    grid-template-columns: 1fr;
}

.feature-card {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.01);
    border-radius: var(--radius-xl);
    outline: 1px solid var(--color-card-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(4px);
    transition: background-color 0.15s ease;
}

.feature-card:hover {
    background: rgba(0, 0, 0, 0.025);
}

a.feature-card--link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.feature-card--link:hover {
    outline-color: var(--color-primary);
}

.feature-icon {
    width: 1.75rem;
    height: 1.75rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.feature-card code {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
}

/* ---- Code Blocks ---- */

.code-block {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-3xl);
    padding: 1.25rem;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.code-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.badge-new {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    background: #dcfce7;
    color: #166534;
    margin-left: 0.5rem;
}

pre {
    background: var(--color-code-bg);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.65;
    tab-size: 4;
}

pre code {
    background: none;
    padding: 0;
    font-size: inherit;
}

/* ---- Syntax Highlighting (Rouge) ---- */

.highlight .c, .highlight .c1, .highlight .cm, .highlight .cs { color: #6B7280; font-style: italic; } /* comments */
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kp,
.highlight .kr, .highlight .kt { color: #8250DF; font-weight: 500; } /* keywords */
.highlight .o, .highlight .ow { color: #8250DF; } /* operators */
.highlight .n { color: #1F2937; } /* names */
.highlight .na { color: #6639BA; } /* name.attribute */
.highlight .nb { color: #6639BA; } /* name.builtin */
.highlight .nc { color: #6639BA; font-weight: 600; } /* name.class */
.highlight .nf, .highlight .fm { color: #6639BA; } /* name.function */
.highlight .ni { color: #1F2937; } /* name.entity */
.highlight .no { color: #CF222E; } /* name.constant */
.highlight .nv, .highlight .vi, .highlight .vg, .highlight .vc { color: #0550AE; } /* variables */
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb,
.highlight .sc, .highlight .sh, .highlight .sx { color: #0A3069; } /* strings */
.highlight .sd { color: #0A3069; font-style: italic; } /* string.doc */
.highlight .se { color: #CF222E; } /* string.escape */
.highlight .si { color: #0550AE; } /* string.interpol */
.highlight .sr { color: #0550AE; } /* string.regex */
.highlight .m, .highlight .mi, .highlight .mf, .highlight .mh,
.highlight .mo, .highlight .il { color: #0550AE; } /* numbers */
.highlight .p { color: #1F2937; } /* punctuation */
.highlight .cp { color: #CF222E; font-weight: 500; } /* comment.preproc (<?php) */
.highlight .err { color: #CF222E; } /* error */

/* ---- CTA Section ---- */

.cta-section {
    position: relative;
    z-index: 10;
    padding: 5rem 1rem;
    text-align: center;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-subtle);
}

.cta-content {
    max-width: 42rem;
    margin: 0 auto;
}

.cta-icon {
    width: 4rem;
    height: 4rem;
    color: var(--color-text);
    margin: 0 auto 2rem;
}

.cta-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-wrap: balance;
}

.cta-section p {
    font-size: 1rem;
    line-height: 1.625;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* ---- Page Header ---- */

.page-header {
    padding: 5rem 1rem 2rem;
    background: var(--color-bg-subtle);
    border-bottom: 1px solid var(--color-border);
}

.page-header-inner {
    max-width: 80rem;
    margin: 0 auto;
}

.page-header-inner--narrow {
    max-width: 52rem;
    padding: 0 2.5rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.page-header p {
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

/* ---- Docs Layout ---- */

.docs-layout {
    display: flex;
    max-width: 80rem;
    margin: 0 auto;
    min-height: calc(100vh - 3.5rem - 200px);
}

.docs-sidebar {
    width: 16rem;
    flex-shrink: 0;
    padding: 1.5rem 1rem;
    border-right: 1px solid var(--color-border);
    position: sticky;
    top: 3.5rem;
    height: calc(100vh - 3.5rem);
    overflow-y: auto;
}

.docs-nav-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    padding: 0.5rem 0.75rem;
}

.docs-nav a {
    display: block;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: all 0.1s ease;
    margin-bottom: 0.125rem;
}

.docs-nav a:hover {
    color: var(--color-text);
    background: var(--color-bg-subtle);
}

.docs-nav a.active {
    color: var(--color-primary);
    background: rgba(107, 88, 255, 0.06);
    font-weight: 500;
}

.docs-content {
    flex: 1;
    min-width: 0;
    padding: 2rem 2.5rem 4rem;
}

.docs-content h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

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

.docs-content h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.docs-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.docs-content pre {
    margin-bottom: 1.5rem;
}

.docs-content ul, .docs-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.docs-content ul {
    list-style: disc;
}

.docs-content ol {
    list-style: decimal;
}

.docs-content li {
    margin-bottom: 0.375rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.docs-content code {
    background: var(--color-code-bg);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
}

.docs-content pre code {
    background: none;
    padding: 0;
}

.docs-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: rgba(107, 88, 255, 0.3);
    text-underline-offset: 2px;
}

.docs-content a:hover {
    text-decoration-color: var(--color-primary);
}

.docs-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.6;
}

.docs-content thead th {
    background: var(--color-bg-subtle);
    font-weight: 600;
    color: var(--color-text);
    text-align: left;
    padding: 0.625rem 0.875rem;
    border-bottom: 2px solid var(--color-border);
}

.docs-content tbody td {
    padding: 0.5rem 0.875rem;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
}

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

.docs-content tbody tr:hover {
    background: rgba(107, 88, 255, 0.03);
}

.docs-content table code {
    font-size: 0.8125rem;
}

@media (max-width: 767px) {
    .docs-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ---- Page Content (standalone pages like RFC, Motivation) ---- */
.page-content {
    max-width: 52rem;
    margin: 0 auto;
    padding: 2rem 2.5rem 4rem;
}
.page-content h2 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--color-border); }
.page-content h2:first-child { margin-top: 0; }
.page-content h3 { font-size: 1.25rem; margin-top: 2rem; margin-bottom: 0.75rem; }
.page-content h4 { font-size: 1.05rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.page-content p { margin-bottom: 1rem; line-height: 1.7; color: var(--color-text-secondary); }
.page-content pre { margin-bottom: 1.5rem; }
.page-content ul, .page-content ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.page-content ul { list-style: disc; }
.page-content ol { list-style: decimal; }
.page-content li { margin-bottom: 0.375rem; line-height: 1.7; color: var(--color-text-secondary); }
.page-content code { background: var(--color-code-bg); padding: 0.125rem 0.375rem; border-radius: var(--radius-md); font-size: 0.8125rem; }
.page-content pre code { background: none; padding: 0; }
.page-content a { color: var(--color-primary); text-decoration: underline; text-decoration-color: rgba(107, 88, 255, 0.3); text-underline-offset: 2px; }
.page-content a:hover { text-decoration-color: var(--color-primary); }
.page-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: 0.875rem; line-height: 1.6; }
.page-content thead th { background: var(--color-bg-subtle); font-weight: 600; color: var(--color-text); text-align: left; padding: 0.625rem 0.875rem; border-bottom: 2px solid var(--color-border); }
.page-content tbody td { padding: 0.5rem 0.875rem; color: var(--color-text-secondary); border-bottom: 1px solid var(--color-border); }
.page-content tbody tr:last-child td { border-bottom: none; }
.page-content tbody tr:hover { background: rgba(107, 88, 255, 0.03); }
.page-content blockquote { border-left: 3px solid var(--color-primary); padding: 0.75rem 1.25rem; margin: 1.5rem 0; background: var(--color-bg-subtle); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.page-content blockquote p { margin-bottom: 0; color: var(--color-text-secondary); }
.page-content .rfc-card { background: var(--color-bg-subtle); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: 1.5rem 2rem; margin-bottom: 1.5rem; transition: border-color 0.2s; }
.page-content .rfc-card:hover { border-color: var(--color-primary); }
.page-content .rfc-card h3 { margin-top: 0; }
.page-content .rfc-card .rfc-meta { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 0.75rem; display: flex; flex-wrap: wrap; gap: 1rem; }
.page-content .rfc-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; }
.page-content .rfc-badge.draft { background: rgba(234, 88, 12, 0.12); color: #EA580C; }
.page-content .rfc-badge.discussion { background: rgba(37, 99, 235, 0.12); color: #2563EB; }

/* ---- Download Section ---- */

/* Download page layout with sidebar */
.download-page {
    display: flex;
    max-width: 80rem;
    margin: 0 auto;
}

.download-main {
    flex: 1;
    min-width: 0;
}

.download-sidebar {
    width: 15rem;
    flex-shrink: 0;
    padding: 1.5rem 1rem;
    border-left: 1px solid var(--color-border);
    position: sticky;
    top: 3.5rem;
    height: calc(100vh - 3.5rem);
    overflow-y: auto;
}

.download-layout {
    max-width: 56rem;
    margin: 0 auto;
    padding: 2.5rem 1rem 4rem;
}

.download-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    margin-bottom: 1.5rem;
    background: var(--color-bg);
}

.download-card h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.download-card p {
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.download-card pre {
    margin-bottom: 1rem;
}

.download-card ul {
    padding-left: 1.25rem;
    list-style: disc;
}

.download-card li {
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 0.25rem;
}

.download-card code {
    background: var(--color-code-bg);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
}

.download-card pre code {
    background: none;
    padding: 0;
}

.download-card a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: rgba(107, 88, 255, 0.3);
    text-underline-offset: 2px;
}

.download-card a:hover {
    text-decoration-color: var(--color-primary);
}

.download-card .btn {
    text-decoration: none;
}

.version-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(107, 88, 255, 0.08);
    color: var(--color-primary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.version-badge--old {
    background: rgba(75, 85, 99, 0.08);
    color: var(--color-text-secondary);
}

/* Release header */
.release-header {
    margin-bottom: 0.5rem;
}

.release-header h2 {
    display: inline;
    margin-bottom: 0;
}

.release-header h2 a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: rgba(107, 88, 255, 0.3);
    text-underline-offset: 2px;
}

.release-header h2 a:hover {
    text-decoration-color: var(--color-primary);
}

.release-meta {
    display: block;
    margin-top: 0.375rem;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.release-note {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    padding: 0.625rem 1rem;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--color-primary);
}

/* Platform sections */
.release-platform {
    margin-bottom: 1.25rem;
}

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

.release-platform h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.release-platform h3 svg {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}

/* File entries */
.release-file {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.release-file:last-child {
    border-bottom: none;
}

.release-file-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.6;
}

.release-file-name {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: rgba(107, 88, 255, 0.3);
    text-underline-offset: 2px;
}

.release-file-name:hover {
    text-decoration-color: var(--color-primary);
}

.release-file-sig {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.release-file-sig a {
    color: var(--color-text-muted) !important;
    text-decoration: underline !important;
    text-decoration-color: rgba(107, 136, 255, 0.3) !important;
}

.release-file-sig a:hover {
    color: var(--color-primary) !important;
}

.release-file-size {
    color: var(--color-text-muted);
    font-size: 0.8125rem;
}

.release-file-hash {
    display: block;
    width: 100%;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    word-break: break-all;
    padding-left: 0;
    margin-top: 0.125rem;
}

.release-file-hash span {
    font-family: var(--font-sans);
    font-weight: 500;
    color: var(--color-text-secondary);
}

/* Resources list */
.release-resources {
    list-style: none;
    padding-left: 0;
}

.release-resources li {
    margin-bottom: 0.5rem;
}

.release-resources li::before {
    content: "\2192";
    margin-right: 0.5rem;
    color: var(--color-primary);
}

/* GPG key block */
.gpg-key-block {
    background: var(--color-code-bg);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre;
    color: var(--color-text-secondary);
}

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

@media (max-width: 640px) {
    .release-file-row {
        flex-direction: column;
        gap: 0.125rem;
    }
    .release-file-hash {
        font-size: 0.625rem;
    }
}

/* ---- Footer ---- */

.footer {
    position: relative;
    z-index: 10;
    border-top: 1px solid var(--color-card-border);
    background: var(--color-bg);
}

.footer-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 3.5rem 1rem 2rem;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-brand img {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-md);
}

.footer-brand span {
    font-weight: 600;
    font-size: 1rem;
}

.footer-about p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.625;
    max-width: 20rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-social a {
    color: var(--color-text-secondary);
    transition: color 0.15s ease;
}

.footer-social a:hover {
    color: var(--color-text);
}

.footer-social svg {
    width: 20px;
    height: 20px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.footer-col h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    transition: color 0.15s ease;
}

.footer-col a:hover {
    color: var(--color-text);
}

.footer-credits {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    text-wrap: balance;
}

/* ---- Responsive ---- */

@media (min-width: 640px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-logo {
        max-width: 360px;
    }

    .hero-actions,
    .cta-actions {
        flex-direction: row;
        justify-content: center;
    }

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

    .cta-section h2 {
        font-size: 2.25rem;
    }

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

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

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

    .features-header h2 {
        font-size: 2rem;
    }

    .feature-card {
        padding: 2.5rem;
    }

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

@media (max-width: 767px) {
    .navbar-toggle {
        display: block;
    }

    .navbar-menu {
        display: none;
        position: fixed;
        inset: 0;
        top: 3.5rem;
        background: var(--color-navbar);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        z-index: 99;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        overflow-y: auto;
    }

    .navbar-menu.open {
        display: flex;
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
    }

    .navbar-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .navbar-actions {
        margin-left: 0;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(107, 88, 255, 0.15);
        width: 100%;
        justify-content: center;
    }

    .docs-sidebar {
        display: none;
    }

    .docs-content {
        padding: 1.5rem 1rem 3rem;
    }

    .hero {
        padding: 5rem 1rem 2rem;
    }

    .lang-dropdown-menu {
        right: auto;
        left: 0;
    }
}

/* ---- Mobile Sidebar Toggle ---- */

.docs-sidebar-toggle {
    display: none;
    padding: 0.75rem 1rem;
    background: var(--color-bg-subtle);
    border-bottom: 1px solid var(--color-border);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    width: 100%;
    text-align: left;
    border: none;
    font-family: var(--font-sans);
}

@media (max-width: 767px) {
    .docs-sidebar-toggle {
        display: block;
    }

    .docs-sidebar.open {
        display: block;
        position: fixed;
        top: 3.5rem;
        left: 0;
        bottom: 0;
        width: 16rem;
        background: var(--color-bg);
        z-index: 50;
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.1);
    }
}

/* ---- Special Card Corners (like PHP 8.5) ---- */

@media (min-width: 1024px) {
    .feature-card:nth-child(1) {
        border-top-left-radius: var(--radius-4xl);
    }
    .feature-card:nth-child(3) {
        border-top-right-radius: var(--radius-4xl);
    }
    .feature-card:nth-child(4) {
        border-bottom-left-radius: var(--radius-4xl);
    }
    .feature-card:nth-child(6) {
        border-bottom-right-radius: var(--radius-4xl);
    }
}

/* ---- Interactive Demo ---- */

.interactive-demo * {
    box-sizing: border-box;
}
