:root {
    --bg-color: #ffffff;
    --text-color: #1f2328;
    --header-bg: #ffffff;
    --card-bg: #ffffff;
    --border-color: #d0d7de;
    --link-color: #0969da;
    --link-hover-color: #0a69da;
    --shadow-subtle: 0 1px 0 rgba(31, 35, 40, 0.04);
    --dropdown-bg: #ffffff;
    --code-bg: #f6f8fa;
    --item-hover: #f3f4f6;
    --tag-bg: #eff1f3;
    --tag-text: #57606a;
    --meta-color: #636c76;
    --accent-color: #afb8c1;
}

.dark-mode {
    --bg-color: #0d1117;
    --text-color: #e6edf3;
    --header-bg: #0d1117;
    --card-bg: #161b22;
    --border-color: #30363d;
    --link-color: #2f81f7;
    --link-hover-color: #2f81f7;
    --shadow-subtle: none;
    --dropdown-bg: #161b22;
    --code-bg: #161b22;
    --item-hover: #21262d;
    --tag-bg: #21262d;
    --tag-text: #8b949e;
    --meta-color: #7d8590;
    --accent-color: #484f58;
}

.sepia-mode {
    --bg-color: #f4ecd8;
    --text-color: #5b4636;
    --header-bg: #f4ecd8;
    --card-bg: #fdf5e6;
    --border-color: #d8c3a5;
    --link-color: #8c5a2b;
    --link-hover-color: #704822;
    --shadow-subtle: 0 1px 0 rgba(91, 70, 54, 0.04);
    --dropdown-bg: #fdf5e6;
    --code-bg: #eae0c8;
    --item-hover: #eae0c8;
    --tag-bg: #e6d5b8;
    --tag-text: #705840;
    --meta-color: #8a735a;
    --accent-color: #c4a482;
}

.force-dark {
    --bg-color: #121212 !important;
    --text-color: #ffffff !important;
    --border-color: #333333 !important;
    --secondary-text: #aaaaaa !important;
    --link-color: #60a5fa !important;
    --tag-bg: #1e1e1e !important;
    --header-bg: rgba(18, 18, 18, 0.95) !important;
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
}

.force-dark .dark-mode-btn,
.force-dark .mobile-only-mode-switcher {
    display: none !important;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    overflow-x: clip;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s, color 0.3s;
    font-size: 21px;
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--link-hover-color);
    text-decoration: none;
}

/* Container */
.container {
    max-width: 1012px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
    /* Support absolute positioning for child elements */
}

.page-content-wrapper {
    background-color: var(--bg-color);
    padding: 34px;
    margin-top: 24px;
}

/* Header Styles */
.site-header {
    background-color: var(--header-bg);
    padding: 20px 0;
    /* Keeping spacing */
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: none;
    /* Removed border */
    box-shadow: none;
    /* Removed shadow */
    transition: background-color 0.3s;
}

.header-content {
    max-width: 1200px;
    width: 80%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.branding-area {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-only-mode-switcher {
    display: none;
}


.site-title {
    font-size: 34px;
    font-weight: 400;
    font-family: 'Roboto', sans-serif;
    margin: 0;
}

.site-title a,
.site-title a:hover {
    color: var(--text-color);
}

.terminal-symbol,
.site-title a:hover .terminal-symbol {
    color: var(--link-color);
    margin-right: 8px;
    font-family: var(--font-mono, monospace);
    opacity: 0.8;
}


/* Dropdown Button */
.dropdown-wrapper {
    position: relative;
    display: inline-block;
}

/* Dropdown Button - Exact Google AI Pill Shape */
.dropdown-btn {
    background-color: var(--item-hover);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    height: 32px;
    padding: 0 14px;
    border-radius: 16px;
    transition: all 0.2s ease;
    opacity: 0.8;
    line-height: 1;
}

.dropdown-btn:hover {
    background-color: var(--border-color);
    opacity: 1;
}

.dropdown-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.dropdown-btn.active .dropdown-icon {
    transform: rotate(180deg);
}

/* Dropdown Content */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--dropdown-bg);
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 0;
    top: 100%;
    /* Below button */
    left: 0;
    margin-top: 4px;
}

.dropdown-content.show {
    display: block;
    /* Toggled by JS */
}

.dropdown-content a {
    color: var(--text-color);
    padding: 10px 16px;
    display: block;
    font-size: 18px;
    font-weight: 400;
}

.dropdown-content a:hover {
    background-color: var(--item-hover);
    color: var(--link-color);
}

.dropdown-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 8px 0;
}

/* Right Nav Area */
.right-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

/* Navigation */
.navigation ul {
    list-style: none;
    display: flex;
    gap: 24px;
    align-items: center;
}

.navigation a {
    color: var(--text-color);
    font-size: 21px;
    padding: 6px 10px;
}

.navigation a:hover {
    color: var(--link-hover-color);
}

.navigation a.active {
    color: var(--link-color);
    font-weight: 600;
}

/* Dark Mode Button - Minimalistic like Feder */
.dark-mode-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    color: var(--text-color);
    transition: all 0.2s;
    opacity: 0.7;
}

.dark-mode-btn:hover {
    background-color: var(--item-hover);
    opacity: 1;
}

/* Main Content */
.content {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
    background-color: var(--bg-color);
}

/* Page Styles */
.page-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    text-align: center;
}

.page-header h1 {
    color: var(--text-color);
    font-size: 55px;
    font-weight: 600;
    margin-bottom: 8px;
}

.page-header p {
    font-size: 21px;
}

.page-description {
    color: var(--meta-color);
    font-size: 16px;
}

/* Post/List Styles */
.post-header {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.post-header h1 {
    color: var(--text-color);
    font-size: 55px;
    font-weight: 600;
    margin-bottom: 12px;
}

.post-meta {
    color: var(--meta-color);
}

.news-list,
.post-list,
.item-list {
    list-style: none;
}

/* Reduced News List (Homepage) */
.news-list.reduced {
    padding: 0;
    margin: 0;
}

.news-list.reduced .news-item {
    border-bottom: 1px solid var(--border-color);
    padding: 0;
}

.news-list.reduced .news-item:last-child {
    border-bottom: none;
}

.news-link {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    align-items: center;
    padding: 18px 0;
    text-decoration: none !important;
    color: var(--text-color) !important;
    transition: all 0.2s ease;
}

.news-link:hover {
    opacity: 0.7;
}

.news-title {
    font-size: 20px;
    font-weight: 500;
    font-family: inherit;
    /* Using site default font for titles, or Roboto if preferred */
}

.news-category {
    color: var(--meta-color);
    font-size: 16px;
}

.news-date-row {
    color: var(--meta-color);
    font-size: 16px;
    text-align: right;
}

.news-item,
.post-item,
.item-list li {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
}

.news-item:last-child,
.post-item:last-child,
.item-list li:last-child {
    border-bottom: none;
}

.news-item h3,
.post-item h3,
.item-list h3 {
    margin-bottom: 8px;
    font-size: 34px;
    font-weight: 400;
    color: var(--text-color);
}

.news-item p,
.post-item p,
.item-list p {
    font-size: 21px;
}

.news-date,
.post-date {
    color: var(--meta-color);
    font-size: 14px;
    margin-bottom: 8px;
}

.news-excerpt,
.post-excerpt,
.item-list p {
    color: var(--text-color);
    /* Updated to main text color or slightly lighter? Original was #586069. Let's make it readable in dark mode, meta-color might be too dim for main text */
    color: var(--meta-color);
    /* Let's check --meta-color definition. Light mode: #586069 (gray). Dark mode: #8b949e. This is good for secondary text. */
    font-size: 21px;
}

/* Content Sections */
.content-section {
    margin-bottom: 48px;
}

.content-section h2 {
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 24px;
}

/* Products Grid */
.products-grid {
    display: grid-line;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 32px;
}

.product-link {
    background-color: var(--tag-bg);
    color: var(--text-color) !important;
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 6px;
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.product-link:hover {
    background-color: var(--item-hover);
    border-color: var(--accent-color);
}

.header-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 13px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 500;
    background-color: var(--tag-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.action-btn:hover {
    background-color: var(--item-hover);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

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

.action-btn.primary:hover {
    opacity: 0.9;
}

/* Download Dropdown - Premium Split Design */
.download-dropdown {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    /* Ensure both buttons stretch to fill height */
    background-color: var(--tag-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    /* Slightly rounder */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.download-dropdown:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.download-btn-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    border: none;
    background: transparent;
    border-radius: 24px 0 0 24px;
    transition: background-color 0.2s;
}

.download-btn-main:hover {
    background-color: var(--item-hover);
    color: var(--link-color);
}

.download-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    background: transparent;
    border: none;
    border-left: 1px solid var(--border-color);
    /* Separator */
    cursor: pointer;
    color: var(--text-color);
    border-radius: 0 24px 24px 0;
    transition: all 0.2s;
}

.download-dropdown-toggle:hover {
    background-color: var(--item-hover);
    color: var(--link-color);
}

.download-dropdown-toggle.active {
    background-color: var(--item-hover);
    color: var(--link-color);
}

.download-dropdown-toggle svg {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.download-dropdown-toggle.active svg {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.download-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    /* consistent width */
    background-color: var(--dropdown-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: top right;
    animation: scaleIn 0.2s cubic-bezier(0.2, 0, 0.13, 1.5);
}

.download-dropdown-menu.show {
    display: flex;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.dropdown-header {
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--meta-color);
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.releases-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 4px;
    /* internal padding for item spacing */
}

.release-item {
    padding: 10px 12px;
    margin: 2px 0;
    display: flex;
    flex-direction: column;
    border-radius: 6px;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid transparent;
}

.release-item:hover {
    background-color: var(--item-hover);
    border-color: var(--border-color);
    transform: translateX(2px);
}

.release-item span {
    display: block;
}

.release-version {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
    display: flex !important;
    align-items: center;
    gap: 6px;
}

.release-version::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--link-color);
    opacity: 0.6;
}

.release-date {
    font-size: 12px;
    color: var(--meta-color);
    margin-left: 12px;
    /* align with text */
    margin-top: 2px;
}

.release-item.loading {
    text-align: center;
    color: var(--meta-color);
    padding: 24px;
    pointer-events: none;
}

.dropdown-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border-color);
    background-color: var(--code-bg);
    text-align: center;
}

.dropdown-footer a {
    font-size: 12px;
    font-weight: 600;
    color: var(--link-color);
    text-decoration: none;
    transition: opacity 0.2s;
}

.dropdown-footer a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.action-btn.secondary-btn {
    padding: 6px 12px;
    font-size: 13px;
    opacity: 0.8;
}

.action-btn.secondary-btn:hover {
    opacity: 1;
}

.top-right-action {
    position: absolute;
    top: 48px;
    right: 32px;
    z-index: 10;
}

/* Upgraded Product Card */
.product-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 21px;
    transition: all 0.271s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: inherit !important;
    margin-bottom: 13px;
}

.product-card:hover {
    border-color: var(--link-color);
    box-shadow: 0 12px 30px -10px rgba(9, 105, 218, 0.3);
    transform: translateY(-6px) scale(1.01);
}

.dark-mode .product-card:hover {
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
}

.sepia-mode .product-card:hover {
    box-shadow: 0 12px 30px -10px rgba(140, 90, 43, 0.3);
}

.product-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    /* Reserve space for the absolutely-positioned quick-link icons */
    padding-right: 56px;
}

.product-tagline {
    font-size: 18px;
    color: var(--meta-color);
    line-height: 1.5;
    margin: 0 0 8px 0;
}

.product-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    margin-bottom: 0 !important;
}

.product-card h3,
.product-card h1 {
    margin: 0;
    font-size: 21px;
    font-weight: 400;
}

.product-quick-links {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.product-card:hover .product-quick-links {
    opacity: 1;
}

.quick-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.quick-link-icon:hover {
    background-color: var(--link-color);
    color: #ffffff;
    border-color: var(--link-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}


/* Secondary Info (Parent Company) */
.secondary-info {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--meta-color);
    font-size: 14px;
}

.secondary-info a {
    color: var(--link-color);
    font-weight: 500;
}

.site-footer {
    background-color: var(--bg-color);
    /* Matches body now, cleaner */
    border-top: 1px solid var(--border-color);
    color: var(--meta-color);
    padding: 32px 0;
    margin-top: 64px;
    text-align: center;
}

.social-links a {
    color: var(--meta-color);
}

.social-links a:hover {
    color: var(--link-color);
}

/* Tags */
.post-tags {
    border-top: 1px solid var(--border-color);
    margin-top: 32px;
    padding-top: 24px;
}

.tag {
    background: var(--tag-bg);
    color: var(--link-color);
    border: 1px solid transparent;
    padding: 0 7px;
    border-radius: 2em;
    margin-right: 8px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    line-height: 18px;
}

/* Development Status */
.development-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.development-item h3 {
    color: var(--text-color);
}

/* Installation Section */
.installation-section {
    background: var(--code-bg);
    border: 1px solid var(--border-color);
}

.installation-section h3 {
    color: var(--text-color);
}

.installation-section code,
.installation-section pre {
    background: var(--card-bg);
    /* Contrast against code-bg */
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
}

.btn-primary {
    background-color: var(--link-color);
    color: white !important;
}

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

.btn-secondary {
    background-color: var(--meta-color);
    color: white !important;
}

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

/* About Section */
.about-section {
    background: var(--code-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 32px;
    border-radius: 8px;
}

.about-section h2 {
    color: var(--text-color);
}

/* GitHub-style Markdown */
.page-content {
    font-size: 16px;
    line-height: 1.5;
    word-wrap: break-word;
    color: var(--text-color);
}

.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
}

.page-content h1 {
    font-size: 2em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid var(--border-color);
}

.page-content h2 {
    font-size: 1.5em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid var(--border-color);
}

.page-content h3 {
    font-size: 1.25em;
}

.page-content h4 {
    font-size: 1em;
}

.page-content p,
.page-content blockquote,
.page-content ul,
.page-content ol,
.page-content dl,
.page-content table,
.page-content pre {
    margin-top: 0;
    margin-bottom: 16px;
}

.product-title {
    font-size: 34px;
}

.page-content p {
    font-size: 21px;
}

.page-content ul,
.page-content ol {
    padding-left: 2em;
}

.page-content li {
    margin-bottom: 0.25em;
}

.page-content blockquote {
    padding: 0 1em;
    color: var(--meta-color);
    border-left: 0.25em solid var(--accent-color);
}

.page-content code {
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    white-space: break-spaces;
    background-color: var(--tag-bg);
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
}

.page-content pre {
    padding: 16px;
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    background-color: var(--code-bg);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    position: relative;
    /* Ensure relative for copy button */
}

.page-content img {
    font-size: 10px;
    max-width: 100%;
    box-sizing: content-box;
}

.page-content .figurecaption {
    text-align: center;
    font-size: 14px;
    color: var(--meta-color);
    margin-top: 10px;
}

/* Copy Button Styling */
.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px;
    background-color: var(--card-bg);
    color: var(--meta-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0;
    z-index: 10;
}

.page-content pre:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    background-color: var(--item-hover);
    color: var(--link-color);
    border-color: var(--accent-color);
}

.copy-btn.copied {
    color: #2da44e;
    border-color: #2da44e;
}

.page-content pre code {
    padding: 0;
    margin: 0;
    background-color: transparent;
    border: 0;
    font-size: 100%;
    white-space: pre;
}

.page-content img {
    max-width: 100%;
    box-sizing: content-box;
    background-color: var(--bg-color);
}

.highlight .c {
    color: #8b949e;
    font-style: italic;
}

/* Comment */
.highlight .k {
    color: #ff7b72;
}

/* Keyword */
.highlight .s {
    color: #a5d6ff;
}

/* String */
.highlight .nb {
    color: #79c0ff;
}

/* Built-in */
.highlight .nf {
    color: #d2a8ff;
}

/* Function */
.highlight .no {
    color: #ffa657;
}

/* Constant */
.highlight .nv {
    color: #ffa657;
}

/* Variable */
.dark-mode .highlight .c,
.dark-mode .highlight .cm,
.dark-mode .highlight .c1 {
    color: #8b949e;
}

.dark-mode .highlight .k,
.dark-mode .highlight .kd,
.dark-mode .highlight .kn {
    color: #ff7b72;
}

.dark-mode .highlight .s,
.dark-mode .highlight .s1,
.dark-mode .highlight .s2 {
    color: #a5d6ff;
}

.dark-mode .highlight .nf {
    color: #d2a8ff;
}

.dark-mode .highlight .no {
    color: #ffa657;
}

.dark-mode .highlight .nv {
    color: #ffa657;
}

/* Responsive */


/* Desktop Download Styles */
.desktop-download-dropdown {
    position: relative;
    display: inline-block;
}

.desktop-download-group {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    background-color: var(--tag-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.desktop-download-group:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.desktop-download-btn-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    border: none;
    background: transparent;
    border-radius: 24px;
    transition: background-color 0.2s;
}

.desktop-download-btn-main:hover {
    background-color: var(--item-hover);
    color: var(--link-color);
}

/* When toggle is present (injected by JS), adjust main button radius */
.desktop-download-group .download-dropdown-toggle {
    border-radius: 0 24px 24px 0;
}

.desktop-download-btn-main:not(:only-child) {
    border-radius: 24px 0 0 24px;
}

.desktop-download-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    background-color: var(--dropdown-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: top right;
    animation: scaleIn 0.2s cubic-bezier(0.2, 0, 0.13, 1.5);
}

.desktop-download-menu.show {
    display: flex;
}

.version-badge {
    font-size: 11px;
    opacity: 0.8;
    margin-left: 6px;
    font-family: var(--font-mono, monospace);
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 1px 6px;
    border-radius: 10px;
    color: var(--text-color);
}

.installers-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 4px;
}

#logo-text.scrolled span.logo-v {
    margin-left: -5px;
}

#logo-text span.logo-i {
    max-width: 225px;
}

#logo-text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    font-weight: 600;
    font-size: 34px;
}

@media (max-width: 868px) {
    .header-content {
        width: 100%;
        padding: 0 20px;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        min-height: 44px;
        position: relative;
    }

    .branding-area {
        position: absolute;
        left: 20px;
        transform: translateX(0);
        z-index: 10;
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        white-space: nowrap;
    }

    .header-content.scrolled .branding-area {
        left: 20px;
        transform: translateX(0);
    }

    .header-content.scrolled .branding-area .site-title .logo-v {
        margin-left: -50px;
    }

    #logo-text .scrolled {
        font-weight: 400;
    }

    .hamburger-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 11;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only-mode-switcher {
        display: flex;
        width: 100%;
        justify-content: center;
        align-items: center;
        padding-bottom: 16px;
        margin-bottom: 16px;
        border-bottom: 1px solid var(--border-color);
    }

    .right-nav {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 16px);
        right: 20px;
        background-color: var(--dropdown-bg);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 24px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        width: 260px;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .right-nav.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .right-nav .navigation ul {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        width: 100%;
    }

    .page-header h1 {
        font-size: clamp(36px, 10vw, 50px);
        word-break: break-word;
    }

    .container {
        padding: 0 16px;
    }

    .page-content-wrapper {
        padding: 24px 16px;
    }

    .product-card h3,
    .product-card h1,
    .product-card h2,
    .product-card-title,
    .research-card-title {
        font-size: 18px !important;
        font-weight: 400;
        line-height: 1.3;
    }

    .product-card p,
    .research-card-description {
        font-size: 14px !important;
    }

    /* On mobile, the title wrapper should not reserve space for absolute icons */
    .research-card-title-row {
        padding-right: 0;
    }
}

/* ────────────────────────────────────────────────
   Product card: shared title reset
   (fixes the mysterious title "padding" caused
    by inline padding-right on the wrapper div)
──────────────────────────────────────────────── */
.product-card-title {
    margin: 0;
    font-size: 21px;
    font-weight: 400;
    font-family: 'Roboto', sans-serif;
    line-height: 1.3;
}

/* Data card uses .product-card styles — just add badge utility */
.product-badge {
    background-color: var(--tag-bg);
    color: var(--tag-text);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid var(--border-color);
    letter-spacing: 0.5px;
}

.product-badges {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ────────────────────────────────────────────────
   Research Card
──────────────────────────────────────────────── */
.research-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;               /* clip the cover image */
    transition: all 0.271s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: inherit !important;
    margin-bottom: 13px;
}

.research-card:hover {
    border-color: var(--link-color);
    box-shadow: 0 12px 30px -10px rgba(9, 105, 218, 0.3);
    transform: translateY(-6px) scale(1.01);
}

.dark-mode .research-card:hover {
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
}

.sepia-mode .research-card:hover {
    box-shadow: 0 12px 30px -10px rgba(140, 90, 43, 0.3);
}

/* Optional cover image */
.research-card-image {
    width: 100%;
    max-height: 180px;
    overflow: hidden;
    flex-shrink: 0;
}

.research-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Body padding below the image (or at top if no image) */
.research-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 21px;
}

/* Header row: title block + icons */
.research-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

/* Title + optional logo side by side */
.research-card-title-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 0;                   /* allow text wrapping */
}

.research-card-logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.research-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.research-card-title {
    margin: 0;
    font-size: 20px;
    font-weight: 400;
    font-family: 'Roboto', sans-serif;
    line-height: 1.3;
    color: var(--text-color);
    word-break: break-word;
}

/* Quick links — inline (not absolute) so title never needs padding-right */
.research-quick-links {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: flex-start;
    padding-top: 2px;
}

/* Description */
.research-card-description {
    font-size: 15px;
    color: var(--meta-color);
    line-height: 1.55;
    margin: 0 0 12px 0;
    flex: 1;
}

/* Footer: date chip + badges */
.research-card-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.research-card-date {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    color: var(--meta-color);
    font-weight: 500;
}

.research-card-stage {
    /* Accent chip — matches site link / active color, tinted bg */
    display: inline-block;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background-color: rgba(47, 129, 247, 0.12);
    color: var(--link-color);
    border: 1px solid rgba(47, 129, 247, 0.35);
}

.dark-mode .research-card-stage {
    background-color: rgba(47, 129, 247, 0.15);
    border-color: rgba(47, 129, 247, 0.4);
}

.sepia-mode .research-card-stage {
    background-color: rgba(140, 90, 43, 0.12);
    border-color: rgba(140, 90, 43, 0.35);
}

.research-card-tag {
    /* Neutral metadata chip — subtle, lower visual weight than stage */
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    text-transform: lowercase;
    letter-spacing: 0.2px;
    background-color: var(--tag-bg);
    color: var(--meta-color);
    border: 1px solid var(--border-color);
}