/* tfplan2md Final Design - Light & Dark Mode Support */

/* ========================================
   CSS Layers for Style Isolation
   ======================================== */
/* 
 * Define cascade layers to prevent interference between website styles 
 * and rendered examples. See ADR-004 for rationale.
 * 
 * Layer order (earlier = lower priority):
 * 1. base - CSS resets and foundational styles
 * 2. website - All website UI styles
 * 3. examples - Rendered example styles (Azure DevOps approximation)
 */
@layer base, website, examples;

/* ========================================
   Website Styles
   ======================================== */
@layer website {

/* Light Mode (Variation 1: GitHub Colors) */
:root[data-theme="light"] {
    --color-bg: #ffffff;
    --color-surface: #f6f8fa;
    --color-text: #24292f;
    --color-text-secondary: #57606a;
    --color-border: #d0d7de;
    --color-primary: #844fba;
    --color-primary-hover: #6a3f96;
    --color-accent: #1f883d;
    --color-success: #1a7f37;
    --hero-bg: linear-gradient(180deg, #f6f8fa 0%, white 100%);
    --problem-bg: #f6f8fa;
    --solution-bg: white;
    --install-bg: linear-gradient(135deg, #844fba 0%, #6a3f96 100%);
    --features-bg: white;
    --cicd-bg: white;
    --footer-bg: #f6f8fa;
    --code-bg: #eaeef2;
    --code-header-bg: #d0d7de;
    --code-text: #24292f;
    /* Azure DevOps theme-aware border color (feature 031) */
    --palette-neutral-10: 240, 240, 240;
}

/* Dark Mode (Variation 2: Dark Theme) */
:root[data-theme="dark"] {
    --color-bg: #0d1117;
    --color-surface: #161b22;
    --color-text: #e6edf3;
    --color-text-secondary: #7d8590;
    --color-border: #30363d;
    --color-primary: #a371f7;
    --color-primary-hover: #d2a8ff;
    --color-accent: #a371f7;
    --color-success: #3fb950;
    --hero-bg: linear-gradient(180deg, #161b22 0%, #0d1117 100%);
    --problem-bg: #1c2128;
    --solution-bg: #0d1117;
    --install-bg: linear-gradient(135deg, #a371f7 0%, #844fba 100%);
    --features-bg: #161b22;
    --cicd-bg: #0d1117;
    --footer-bg: #1c2128;
    --code-bg: #1a202c;
    --code-header-bg: #2d3748;
    --code-text: #e2e8f0;
    /* Azure DevOps theme-aware border color (feature 031) */
    --palette-neutral-10: 50, 50, 50;
}

/* Shared variables */
:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 30px rgba(0, 0, 0, 0.2);
}

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

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    line-height: 1.6;
    background: var(--color-bg);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    background: var(--color-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 100;
    padding: 16px 8px 8px 8px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
}

.nav-brand img {
    height: 64px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .nav-brand img {
        /* On mobile, limit width to avoid overlapping hamburger menu */
        /* Assuming ~48px hamburger + margins, and 24px padding */
        max-width: calc(100vw - 120px); 
    }
}

.brand-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
}

/* Logo SVG adjustments for dark mode */
.brand-logo-full {
    display: block;
}

[data-theme="dark"] .brand-logo-full {
    /* Add subtle border to diff card and brighten tfplan text */
    filter: contrast(1.2);
}

.nav-menu {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-item {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}

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

.theme-toggle {
    background: transparent;
    border: 1px solid var(--color-border);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    position: relative;
}

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

.theme-icon {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* Invert icon colors in dark mode */
[data-theme="dark"] .theme-icon {
    filter: invert(1);
}

.nav-cta {
    padding: 8px 20px;
    background: var(--color-primary);
    color: white;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-cta:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Hero */
.hero {
    padding: 50px 0 35px;
    background: var(--hero-bg);
    transition: background 0.3s ease;
}

.hero-primary {
    background: var(--hero-bg);
}

.hero-secondary {
    background: var(--problem-bg);
    padding: 40px 0;
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero-content {
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.hero-badges {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 24px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--color-primary);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 24px;
    text-decoration: none;
    transition: all 0.2s;
}

.hero-badge:hover {
    background: var(--color-primary-hover);
    transform: scale(1.05);
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    color: var(--color-text);
    white-space: nowrap;
    max-width: none;
    width: max-content;
    margin-left: auto;
    margin-right: auto;
}

.hero-gradient {
    color: var(--color-primary);
}

.hero-subtitle {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 22px;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 32px;
}

.btn {
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 18px;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

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

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Copy button - follows feature-link pattern */
.copy-button {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px 12px;
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-button:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.copy-button.copied {
    background: var(--color-success);
    color: white;
    border-color: var(--color-success);
}

.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--color-text);
}

.stat-label {
    font-size: 14px;
    color: var(--color-text-secondary);
}

/* Section Container */
.section-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 24px;
}

.section-header {
    margin-bottom: 64px;
}

.section-header.centered {
    text-align: center;
}

.section-header.centered .section-description {
    margin: 0 auto;
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.section-description {
    font-size: 18px;
    color: var(--color-text-secondary);
    max-width: 800px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
    text-align: center;
}

/* Problem Section */
.problem-section {
    background: var(--problem-bg);
    padding: 32px 0;
    transition: background-color 0.3s ease;
}

/* Problem/Solution Layout */
.problem-solution-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
}

.problem-solution-layout > * {
    min-width: 0;
}

.screenshot-side {
    display: flex;
    flex-direction: column;
}

.screenshot-container {
    background: var(--color-bg);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    max-width: 100%;
}

.screenshot-header {
    background: var(--problem-bg);
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.screenshot-content {
    padding: 0;
    overflow: visible;
    background: var(--code-bg);
}

.screenshot-content pre {
    margin: 0;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.screenshot-content code {
    color: var(--code-text);
}

.list-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.problem-list,
.solution-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.problem-list li,
.solution-list li {
    display: flex;
    gap: 1rem;
    align-items: start;
}

.x-icon {
    color: #ef4444;
    font-weight: bold;
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.check-icon {
    color: #10b981;
    font-weight: bold;
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.problem-list li > div,
.solution-list li > div {
    flex: 1;
}

.problem-list strong,
.solution-list strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--color-text);
}

.problem-list p,
.solution-list p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
    margin: 0;
}

/* Keep old styles for potential backwards compatibility */
.problem-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .problem-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .problem-solution-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .screenshot-content {
        max-height: 300px;
    }
}

@media (max-width: 640px) {
    .problem-grid {
        grid-template-columns: 1fr;
    }
    
    .section-container {
        padding: 40px 16px;
    }
    
    .format-card {
        padding: 16px;
    }
    
    .code-block pre {
        padding: 16px;
        font-size: 13px;
    }
}

.problem-card {
    background: var(--color-bg);
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    border: 1px solid var(--color-border);
}

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

.problem-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.problem-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
}

.problem-card p {
    color: var(--color-text-secondary);
    font-size: 15px;
}

/* Solution Section */
.solution-section {
    background: var(--solution-bg);
    transition: background-color 0.3s ease;
}

.solution-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 64px;
    align-items: center;
}

.solution-visual {
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: center;
    margin-bottom: 48px;
}

.code-preview {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
}

.code-header {
    background: var(--code-header-bg);
    padding: 10px 16px;
    min-height: 42px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-title {
    color: var(--color-text);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-body {
    background: var(--code-bg);
    padding: 20px;
    overflow-x: auto;
}

.code-body pre {
    color: var(--code-text);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

.arrow {
    font-size: 32px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.solution-content {
    max-width: 1000px;
    margin: 0 auto;
}

.solution-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--color-text);
    text-align: center;
}

.solution-list {
    list-style: none;
    max-width: 700px;
    margin: 0 auto;
}

.solution-list li {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    font-size: 16px;
    color: var(--color-text);
}

.check-icon {
    color: var(--color-success);
    font-weight: 700;
    flex-shrink: 0;
}

/* Install Section */
.install-section {
    background: var(--install-bg);
    color: white;
}

.install-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 48px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.install-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.install-description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

.install-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.install-step {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.command-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(0, 0, 0, 0.3);
    padding: 16px 60px 16px 24px;
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 14px;
    position: relative;
}

.command-box code {
    flex: 1;
    color: white;
}

/* Features Section */
.features-section {
    background: var(--features-bg);
    transition: background-color 0.3s ease;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

/* Features Carousel */
.features-carousel {
    position: relative;
    overflow: hidden;
    padding: 0 60px;
}

.features-carousel-track {
    display: flex;
    gap: 24px;
    transition: transform 0.5s ease;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover:not(:disabled) {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-prev {
    left: 0;
}

.carousel-next {
    right: 0;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-border);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-dot.active {
    background: var(--color-primary);
    width: 24px;
    border-radius: 5px;
}

.carousel-dot:hover {
    background: var(--color-primary);
}

.feature-card {
    background: var(--color-surface);
    padding: 40px 32px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    transition: all 0.3s;
    flex: 0 0 calc(33.333% - 16px);
    min-width: 300px;
}

.feature-card.elevated {
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary);
}

.feature-header {
    margin-bottom: 24px;
}

.feature-icon-lg {
    font-size: 48px;
}

.feature-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
}

.feature-description {
    color: var(--color-text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.feature-link-btn {
    display: inline-block;
    color: var(--color-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* CI/CD Section */
.cicd-section {
    background: var(--cicd-bg);
    transition: background-color 0.3s ease;
}

.cicd-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.cicd-content > * {
    min-width: 0;
}

.cicd-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--color-text);
}

.cicd-description {
    font-size: 18px;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
}

.code-window {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
    max-width: 100%;
}

.code-tabs {
    display: flex;
    background: var(--code-header-bg);
    padding: 0;
}

.code-tab {
    padding: 12px 24px;
    color: var(--color-text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    background: transparent;
    border: none;
    border-right: 1px solid var(--color-border);
}

[data-theme="dark"] .code-tab {
    color: #a0aec0;
}

.code-tab.active {
    color: var(--color-text);
    background: var(--code-bg);
    border-bottom-color: var(--color-primary);
}

[data-theme="dark"] .code-tab.active {
    color: white;
}

.code-tab-content {
    display: none;
    background: var(--code-bg);
    padding: 24px;
    overflow-x: auto;
}

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

.code-tab-content pre {
    color: var(--code-text);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
    margin: 0;
}

.code-content {
    background: var(--code-bg);
    padding: 24px;
    overflow-x: auto;
}

.code-content pre {
    color: var(--code-text);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
    margin: 0;
}

/* Footer */
.footer,
.site-footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--color-border);
    padding: 64px 0 32px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-content,
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 48px;
}

.footer-heading {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    color: var(--color-text);
}

.footer-section,
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-text {
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a,
.footer-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

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

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.footer-bottom p {
    color: var(--color-text-secondary);
    font-size: 14px;
    margin: 0;
}

.footer-bottom a {
    color: var(--color-primary);
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

.footer-copyright {
    color: var(--color-text);
    font-size: 14px;
    margin-bottom: 8px;
}

.footer-note {
    color: var(--color-text-secondary);
    font-size: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
    .solution-grid,
    .cicd-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .solution-visual {
        flex-direction: column;
    }
    
    .arrow {
        transform: rotate(90deg);
    }
}

/* Getting Started Page Styles */
.section {
    padding: 30px 0 40px 0;
}

.install-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.method-card {
    background: var(--color-surface);
    padding: 40px;
    border-radius: 16px;
    border: 2px solid var(--color-border);
    transition: all 0.3s;
}

.method-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.method-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-text);
}

.method-description {
    color: var(--color-text-secondary);
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.7;
}

.method-note {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--color-bg);
    border-radius: 8px;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.code-block {
    background: var(--code-bg);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    max-width: 100%;
    min-width: 0;
    position: relative;
}

.code-block .code-header {
    background: var(--code-header-bg);
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-block pre {
    padding: 20px;
    margin: 0;
    overflow-x: auto;
    max-width: 100%;
    border-radius: 0 0 12px 12px;
}

.code-block code {
    color: var(--code-text);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
}

.quickstart-steps {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-bottom: 64px;
}

.step-card {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-text);
}

.usage-examples {
    margin-top: 48px;
}

.example-card {
    margin-bottom: 32px;
}

.example-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
}

.cicd-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--color-border);
}

.cicd-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--color-text-secondary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

.cicd-content-wrapper {
    position: relative;
}

.cicd-tab-content {
    display: none;
}

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

.cicd-section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-text);
}

.cicd-description {
    font-size: 16px;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
}

.cicd-note {
    margin-top: 16px;
    padding: 16px;
    background: var(--color-surface);
    border-left: 4px solid var(--color-primary);
    border-radius: 4px;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.cicd-note code {
    background: var(--color-bg);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 13px;
}

.next-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.next-step-card {
    background: var(--color-bg);
    padding: 32px;
    border-radius: 16px;
    border: 2px solid var(--color-border);
    text-decoration: none;
    transition: all 0.3s;
    display: block;
}

.next-step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.next-step-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.next-step-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
}

.next-step-description {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* Features Page Styles */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.features-grid-small {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

.feature-category-card {
    background: var(--color-bg);
    padding: 32px;
    border-radius: 16px;
    border: 2px solid var(--color-border);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.feature-card-small {
    padding: 20px;
    border-radius: 10px;
}

.feature-card-small .feature-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.feature-card-small .feature-category-title {
    font-size: 16px;
    margin-bottom: 8px;
}

.feature-card-small .feature-category-description {
    font-size: 13px;
    margin-bottom: 0;
    line-height: 1.5;
}

.feature-category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    display: block;
}

[data-theme="dark"] .feature-icon,
[data-theme="dark"] .feature-icon-lg,
[data-theme="dark"] .feature-icon-sm {
    filter: invert(1) hue-rotate(180deg);
}

/* Theme-aware screenshots */
[data-theme="light"] .screenshot-dark {
    display: none;
}

[data-theme="dark"] .screenshot-light {
    display: none;
}

.feature-icon-sm {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.feature-category-card.compact {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
}

.feature-compact-content {
    flex: 1;
}

.feature-category-title-sm {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}

.feature-category-description-sm {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
}

.features-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.feature-category-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
}

.feature-category-description {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
    flex-grow: 1;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--color-surface);
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.feature-link:hover {
    background: var(--color-primary);
    color: white;
    transform: translateX(4px);
}

.feature-link-icon {
    font-size: 16px;
    transition: transform 0.2s;
}

.feature-link:hover .feature-link-icon {
    transform: translateX(4px);
}

.feature-detail {
    margin: 0 auto;
}

.feature-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.feature-detail-title {
    font-size: 32px;
    font-weight: 600;
    color: var(--color-text);
}

.feature-badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--color-primary);
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-detail-description {
    font-size: 18px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.feature-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
    margin: 32px 0;
}

.comparison-column {
    display: flex;
    flex-direction: column;
}

.comparison-column .code-block {
    display: flex;
    flex-direction: column;
}

.comparison-column .code-block .example-content {
    overflow-y: auto;
}

.comparison-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-text);
}

.comparison-note {
    margin-top: 12px;
    padding: 12px;
    background: var(--color-surface);
    border-radius: 6px;
    font-size: 14px;
    color: var(--color-text-secondary);
    font-style: italic;
}

.feature-example {
    margin: 32px 0;
}

.example-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-text);
}

.feature-highlights {
    margin-top: 32px;
    padding: 24px;
    background: var(--color-surface);
    border-radius: 12px;
}

.highlights-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-text);
}

.highlights-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.highlights-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.highlights-list li::before {
    content: "✓";
    color: var(--color-primary);
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.highlights-list a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.highlights-list a:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.icon-card {
    background: var(--color-surface);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--color-border);
}

.icon-large {
    font-size: 48px;
    margin-bottom: 12px;
}

.icon-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.icon-example {
    font-size: 13px;
    color: var(--color-text-secondary);
    font-family: var(--font-mono);
}

.formatting-rules {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 32px 0;
}

.formatting-rule {
    padding: 24px;
    background: var(--color-surface);
    border-radius: 12px;
    border-left: 4px solid var(--color-primary);
}

.rule-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}

.rule-description {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

/* Architecture Page Styles */
.arch-diagram {
    margin: 48px 0;
}

.arch-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.arch-step {
    flex: 1;
    min-width: 200px;
    padding: 32px;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.arch-step-icon {
    font-size: 48px;
}

.arch-step-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.arch-step-desc {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0;
}

.arch-step-cmd {
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 8px 12px;
    background: var(--color-surface);
    border-radius: 6px;
}

.arch-arrow {
    font-size: 32px;
    color: var(--color-text-secondary);
    font-weight: bold;
}

.quality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.quality-card {
    padding: 32px;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-left-width: 6px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quality-1 { border-left-color: #ef4444; }
.quality-2 { border-left-color: #f59e0b; }
.quality-3 { border-left-color: #eab308; }
.quality-4 { border-left-color: #22c55e; }
.quality-5 { border-left-color: #3b82f6; }
.quality-6 { border-left-color: #8b5cf6; }

.quality-priority {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
}

.quality-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.quality-desc {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
}

.component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin: 40px 0;
}

.component-card {
    padding: 32px;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s;
}

.component-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.component-icon {
    font-size: 40px;
}

.component-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.component-desc {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
}

.component-files {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.component-files code {
    font-size: 12px;
    background: var(--color-surface);
    padding: 6px 10px;
    border-radius: 4px;
    font-family: var(--font-mono);
}

.tech-table {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 32px 0;
}

.tech-row {
    display: grid;
    grid-template-columns: 150px 200px 1fr;
    gap: 24px;
    padding: 20px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    align-items: center;
}

.tech-component {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
}

.tech-name {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.tech-purpose {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.pattern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.pattern-card {
    padding: 28px;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pattern-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.pattern-desc {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
}

.pattern-benefit {
    font-size: 13px;
    color: var(--color-primary);
    font-weight: 500;
}

/* Feature Highlights Grid */
.feature-highlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
    margin: 32px 0;
}

.feature-highlight-card {
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 32px;
    transition: all 0.3s;
}

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

.feature-highlight-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-highlight-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 16px;
}

.feature-highlight-desc {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.feature-highlight-arch {
    padding: 16px;
    background: var(--color-surface);
    border-left: 3px solid var(--color-primary);
    border-radius: 6px;
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.feature-highlight-arch strong {
    color: var(--color-text);
    display: block;
    margin-bottom: 8px;
}

/* Architecture Pattern Grid */
.arch-pattern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 32px;
    margin: 32px 0;
}

.arch-pattern-card {
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 32px;
    transition: all 0.3s;
}

.arch-pattern-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.arch-pattern-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 16px;
}

.arch-pattern-desc {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.arch-pattern-impl {
    padding: 16px;
    background: var(--color-surface);
    border-radius: 6px;
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.arch-pattern-impl strong {
    color: var(--color-text);
    display: block;
    margin-bottom: 8px;
}

.adr-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 32px 0;
}

.adr-card {
    padding: 28px;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-left-width: 6px;
    border-left-color: var(--color-primary);
    border-radius: 12px;
    text-decoration: none;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: all 0.3s;
}

.adr-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.adr-number {
    flex-shrink: 0;
    width: 80px;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-mono);
    text-align: center;
    background: var(--color-primary);
    color: white;
    border-radius: 6px;
}

.adr-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 8px 0;
}

.adr-desc {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Documentation Page Styles */
.doc-section {
    margin: 48px 0;
}

.doc-subtitle {
    font-size: 28px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 24px;
}

.doc-text {
    font-size: 16px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin: 16px 0;
}

.doc-list {
    font-size: 16px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin: 16px 0;
    padding-left: 24px;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 15px;
}

.doc-table th {
    background: var(--color-surface);
    color: var(--color-text);
    font-weight: 600;
    text-align: left;
    padding: 16px;
    border: 1px solid var(--color-border);
}

.doc-table td {
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.doc-table tr:hover {
    background: var(--color-surface);
}

.doc-table code {
    background: var(--code-bg);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: var(--font-mono);
}

/* Lists in sections */
.section ul,
.section ol {
    margin: 16px 0;
    padding-left: 32px;
}

.section li {
    margin: 8px 0;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.section li strong {
    color: var(--color-text);
}

/* Consistent spacing for headings in sections */
.section h3.doc-subtitle {
    margin-top: 48px;
    margin-bottom: 20px;
}

/* First heading after section title shouldn't have top margin */
.section .section-title + p + h3.doc-subtitle,
.section .section-title + h3.doc-subtitle {
    margin-top: 32px;
}

/* Spacing after paragraphs before headings */
.section p + h3.doc-subtitle {
    margin-top: 48px;
}

/* Spacing after lists before headings */
.section ul + h3.doc-subtitle,
.section ol + h3.doc-subtitle {
    margin-top: 48px;
}

/* Spacing after tables before headings */
.section table + h3.doc-subtitle,
.section .doc-table + h3.doc-subtitle {
    margin-top: 48px;
}

/* Spacing after code blocks before headings */
.section .code-block + h3.doc-subtitle {
    margin-top: 48px;
}

/* Spacing after headings to content */
.section h3.doc-subtitle + p,
.section h3.doc-subtitle + ul,
.section h3.doc-subtitle + ol,
.section h3.doc-subtitle + .code-block,
.section h3.doc-subtitle + .doc-table,
.section h3.doc-subtitle + table {
    margin-top: 16px;
}

.doc-list li {
    margin: 12px 0;
}

.doc-list code {
    background: var(--color-surface);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 14px;
}

.inline-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.inline-link:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

.options-table {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 24px 0;
}

.option-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    padding: 20px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.option-name {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.option-name code {
    background: transparent;
    padding: 0;
}

.option-desc {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.template-item {
    padding: 24px;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.template-item-title {
    font-size: 20px;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--color-text);
    margin: 0;
}

.template-item-desc {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
}

.template-usage {
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 8px 12px;
    background: var(--color-surface);
    border-radius: 6px;
    display: inline-block;
}

.format-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
    gap: 32px;
    margin: 32px 0;
}

.format-card {
    padding: 32px;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.format-title {
    font-size: 24px;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--color-text);
    margin: 0;
}

.format-desc {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin: 0;
}

.format-usage {
    font-family: var(--font-mono);
    font-size: 14px;
    padding: 10px 14px;
    background: var(--color-surface);
    border-radius: 6px;
    text-align: center;
}

.trouble-section {
    margin: 40px 0;
    padding: 32px;
    background: var(--color-bg);
    border-left: 4px solid var(--color-primary);
    border-radius: 8px;
}

.trouble-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 16px 0;
}

.trouble-desc {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin: 0 0 16px 0;
}

.trouble-solution {
    font-size: 15px;
    color: var(--color-text);
    font-weight: 600;
    margin: 16px 0 12px 0;
}

.quicklinks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.quicklink-card {
    padding: 32px;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.3s;
}

.quicklink-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.quicklink-icon {
    font-size: 40px;
}

.quicklink-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.quicklink-desc {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Examples Page Styles */
.template-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.template-card {
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.template-name {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.template-badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--color-text-secondary);
}

.template-description {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin: 0;
}

.template-usecases {
    padding: 20px;
    background: var(--color-surface);
    border-radius: 12px;
    font-size: 14px;
}

.template-usecases strong {
    display: block;
    margin-bottom: 12px;
    color: var(--color-text);
    font-weight: 600;
}

.template-usecases ul {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.template-usecases li {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.example-section {
    margin: 48px 0;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--color-border);
}

.example-section:last-child {
    border-bottom: none;
}

.example-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 16px;
    flex-wrap: wrap;
}

.example-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.example-link {
    font-size: 15px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.example-link:hover {
    color: var(--color-primary-dark);
}

.example-description {
    font-size: 16px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

.realworld-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.realworld-card {
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.3s;
}

.realworld-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.realworld-icon {
    font-size: 48px;
}

.realworld-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.realworld-description {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin: 0;
    flex-grow: 1;
}

.realworld-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.stat {
    display: inline-block;
    padding: 6px 12px;
    background: var(--color-surface);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.realworld-features {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.feature-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--color-primary);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.realworld-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.realworld-link {
    font-size: 14px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.realworld-link:hover {
    color: var(--color-primary-dark);
}

.cta-box {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: 16px;
    text-align: center;
}

.cta-title {
    font-size: 36px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 16px;
}

.cta-description {
    font-size: 18px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .nav-menu {
        gap: 12px;
    }
    
    .nav-item:not(.nav-cta):not(.theme-toggle) {
        font-size: 13px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }
    
    .section-container {
        padding: 48px 24px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .problem-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    /* Carousel mobile adjustments */
    .features-carousel {
        padding: 0 40px;
    }
    
    .feature-card {
        flex: 0 0 100%;
        min-width: 280px;
    }
    
    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .footer-content,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .install-methods {
        grid-template-columns: 1fr;
    }
    
    .cicd-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .next-steps-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-comparison {
        grid-template-columns: 1fr;
    }
    
    .icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .tech-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .arch-flow {
        flex-direction: column;
    }
    
    .arch-arrow {
        transform: rotate(90deg);
    }
    
    .option-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .format-comparison {
        grid-template-columns: 1fr;
    }
    
    .format-card {
        padding: 20px;
    }
    
    .quicklinks-grid {
        grid-template-columns: 1fr;
    }
    
    .template-comparison {
        grid-template-columns: 1fr;
    }
    
    .realworld-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-box {
        padding: 32px 24px;
    }
    
    .cta-title {
        font-size: 28px;
    }
    
    .cta-actions {
        flex-direction: column;
    }
    
    .cta-actions .btn {
        width: 100%;
    }
}

/* Mobile Menu Styles */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}

.hamburger-icon {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    position: relative;
    transition: all 0.3s;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: all 0.3s;
}

.hamburger-icon::before {
    top: -8px;
}

.hamburger-icon::after {
    top: 8px;
}

.mobile-menu-btn.active .hamburger-icon {
    background: transparent;
}

.mobile-menu-btn.active .hamburger-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.mobile-menu-btn.active .hamburger-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Button Styles */
.btn-white {
    background: white;
    color: var(--color-primary);
}

.btn-white:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-white {
    border: 1px solid white;
    color: white;
    background: transparent;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Install Section Styles */
.install-content {
    text-align: center;
}

.install-description {
    margin-bottom: 32px;
}

.install-row {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.install-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 0;
}

.command-box {
    margin: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--color-bg);
        flex-direction: column;
        padding: 24px;
        border-bottom: 1px solid var(--color-border);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        box-shadow: var(--shadow-lg);
        align-items: stretch;
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .nav-item {
        padding: 12px 0;
        border-bottom: 1px solid var(--color-border);
        text-align: center;
        font-size: 16px;
    }

    .nav-cta {
        margin-top: 16px;
        text-align: center;
    }

    .theme-toggle {
        margin: 16px auto 0;
    }

    .hero-title {
        font-size: 32px;
        white-space: normal;
        line-height: 1.2;
        width: auto;
        max-width: 100%;
    }

    .hero-subtitle {
        white-space: normal;
    }

    .hero-badges {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .hero-badge {
        margin-bottom: 0;
        font-size: 12px;
        padding: 4px 12px;
    }

    .problem-solution-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .screenshot-content {
        max-height: 300px;
    }

    .install-row {
        flex-direction: column;
        gap: 24px;
    }

    .install-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
        white-space: normal;
        box-sizing: border-box;
    }

    .install-actions .btn {
        width: auto;
        flex: 1;
        min-width: 140px;
    }

    .command-box {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .command-box code {
        margin-bottom: 8px;
        word-break: break-all;
    }
}

/* Interactive Examples */
.interactive-example {
    background: var(--code-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.interactive-example .code-header {
    background: var(--code-header-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
}

.example-toolbar {
    background: var(--code-header-bg);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 8px 16px;
    gap: 12px;
}

.example-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.view-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 0;
    line-height: 1;
}

.toggle-btn {
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1.1;
}

.toggle-btn.active {
    background: var(--color-primary);
    color: white;
}

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

.fullscreen-btn {
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    font-size: 14px;
    padding: 6px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

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

.example-content {
    position: relative;
    background: var(--code-bg);
    min-height: 200px;
    max-height: 900px;
    overflow: auto;
}

.view-pane {
    display: none;
    width: 100%;
    min-width: max-content;
}

.view-pane.active {
    display: block;
}

.source-view pre {
    margin: 0;
    padding: 20px;
}

} /* End @layer website */

/* ========================================
   Example Styles (Isolated Layer)
   ======================================== */
@layer examples {

/* Rendered View (Azure DevOps Style) */
.rendered-view {
    background: white;
    color: rgba(0, 0, 0, 0.9);
    padding: 24px;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Helvetica, Ubuntu, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

[data-theme="dark"] .rendered-view {
    background: rgb(32, 31, 30);
    color: rgba(255, 255, 255, 0.95);
}

.rendered-view h1, .rendered-view h2, .rendered-view h3, .rendered-view h4 {
    margin: 24px 0 8px 0;
    font-weight: 600;
    line-height: 1.25;
    color: rgba(0, 0, 0, 0.9);
}

[data-theme="dark"] .rendered-view h1,
[data-theme="dark"] .rendered-view h2,
[data-theme="dark"] .rendered-view h3,
[data-theme="dark"] .rendered-view h4 {
    color: rgba(255, 255, 255, 0.95);
}

.rendered-view h1 { font-size: 2em; border-bottom: 1px solid var(--color-border); padding-bottom: 0.3em; }
.rendered-view h2 { font-size: 1.5em; border-bottom: 1px solid var(--color-border); padding-bottom: 0.3em; }
.rendered-view h3 { font-size: 0.9375rem; }
.rendered-view h4 { font-size: 0.875rem; }

.rendered-view p {
    margin: 0 0 16px 0;
}

.rendered-view table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 16px;
    display: block;
}

.rendered-view th {
    padding: 13px 11px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: left;
    color: rgba(0, 0, 0, 0.55);
}

.rendered-view td {
    padding: 10px 13px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    text-align: left;
    min-width: 50px;
    max-width: 1000px;
}

[data-theme="dark"] .rendered-view th {
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.80);
}

[data-theme="dark"] .rendered-view td {
    border-color: rgba(255, 255, 255, 0.08);
}

.rendered-view code {
    padding: 2px 4px;
    margin: 0;
    font-size: 0.75rem;
    background-color: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.9);
    border-radius: 2px;
    font-family: Menlo, Consolas, "Courier New", monospace;
}

[data-theme="dark"] .rendered-view code {
    background-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
}

.rendered-view details {
    margin-bottom: 12px;
    border: 1px solid #f0f0f0;
    border-radius: 0;
    padding: 12px;
}

[data-theme="dark"] .rendered-view details {
    border-color: rgba(255, 255, 255, 0.08);
}

.rendered-view summary {
    cursor: pointer;
    font-weight: 400;
    font-size: 0.875rem;
    color: rgba(0, 0, 0, 0.9);
    margin: -12px;
    padding: 12px;
}

[data-theme="dark"] .rendered-view summary {
    color: rgba(255, 255, 255, 0.95);
}

/* Markdown Syntax Highlighting */
.md-comment { color: #6a737d; }
.md-heading { color: #0550ae; font-weight: bold; }
.md-bold { font-weight: bold; color: #24292f; }
.md-code { color: #0a3069; background-color: rgba(175, 184, 193, 0.2); border-radius: 3px; padding: 2px 4px; }
.md-link { color: #0969da; }
.md-list { color: #d73a49; font-weight: bold; }
.md-quote { color: #57606a; border-left: 4px solid #d0d7de; padding-left: 8px; }
.md-tag { color: #116329; }
.md-table-sep { color: #6a737d; }

[data-theme="dark"] .md-comment { color: #8b949e; }
[data-theme="dark"] .md-heading { color: #79c0ff; }
[data-theme="dark"] .md-bold { color: #e6edf3; }
[data-theme="dark"] .md-code { color: #a5d6ff; background-color: rgba(110, 118, 129, 0.4); }
[data-theme="dark"] .md-link { color: #58a6ff; }
[data-theme="dark"] .md-list { color: #ff7b72; }
[data-theme="dark"] .md-tag { color: #7ee787; }
[data-theme="dark"] .md-table-sep { color: #8b949e; }

} /* End @layer examples */

/* ========================================
   Website Interactive Features
   ======================================== */
@layer website {

/* Fullscreen Mode */
.code-block.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    margin: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

.code-block.fullscreen .example-content {
    flex: 1;
    overflow: auto;
    max-height: none;
}

.code-block.fullscreen .view-pane {
    height: 100%;
    overflow: auto;
    min-width: unset;
}

.code-block.fullscreen .rendered-view {
    border-radius: 0;
    min-height: 100%;
}

/* ========================================
   Documentation Sidebar
   ======================================== */

/* Mobile TOC Toggle Button */
.mobile-toc-toggle {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 90;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 12px 0;
}

.toc-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.toc-toggle-btn:hover {
    background: var(--color-bg);
    border-color: var(--color-primary);
}

.toc-icon {
    font-size: 20px;
}

.toc-label {
    flex: 1;
}

/* Documentation Layout */
.docs-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    gap: 48px;
    align-items: flex-start;
}

/* Sidebar */
.docs-sidebar {
    flex-shrink: 0;
    width: 260px;
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    padding-top: 58px;
    padding-right: 16px;
    align-self: flex-start;
}

.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-secondary);
}

.docs-nav {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 20px;
}

.docs-nav-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
    margin: 0 0 16px 0;
}

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

.docs-nav-list li {
    margin: 0;
}

.docs-nav-link {
    display: block;
    padding: 10px 12px;
    font-size: 15px;
    color: var(--color-text);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.docs-nav-link:hover {
    background: var(--color-bg);
    color: var(--color-primary);
}

.docs-nav-link.active {
    background: var(--color-primary-bg);
    color: var(--color-primary);
    border-left-color: var(--color-primary);
    font-weight: 500;
}

/* Nested sublist */
.docs-nav-sublist {
    list-style: none;
    padding: 0;
    margin: 4px 0 8px 0;
}

.docs-nav-sublink {
    display: block;
    padding: 8px 12px 8px 24px;
    font-size: 14px;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.docs-nav-sublink::before {
    content: "→";
    position: absolute;
    left: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.docs-nav-sublink:hover {
    background: var(--color-bg);
    color: var(--color-text);
    padding-left: 28px;
}

.docs-nav-sublink:hover::before {
    opacity: 0.5;
}

.docs-nav-sublink.active {
    background: var(--color-bg);
    color: var(--color-primary);
    font-weight: 500;
    padding-left: 28px;
}

.docs-nav-sublink.active::before {
    opacity: 1;
    color: var(--color-primary);
}

/* Main Content */
.docs-content {
    flex: 1;
    min-width: 0;
}

/* Responsive Behavior */
@media (max-width: 1024px) {
    .mobile-toc-toggle {
        display: block;
    }

    .hero {
        padding-top: 146px !important; /* Add space for fixed TOC toggle */
    }

    .docs-layout {
        padding: 0;
        gap: 0;
    }

    .docs-sidebar {
        position: fixed;
        top: 146px; /* 60px navbar + 86px mobile toggle (12px padding + 12px padding + 1px border + 49px button height + 12px padding) */
        left: 0;
        bottom: 0;
        width: 280px;
        max-height: none;
        background: var(--color-bg);
        border-right: 1px solid var(--color-border);
        padding: 24px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 80;
        overflow-y: auto;
    }

    .docs-sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .docs-nav {
        border: none;
        padding: 0;
    }

    .docs-content {
        padding: 0 24px;
    }
}

@media (max-width: 640px) {
    .docs-sidebar {
        width: 100%;
        max-width: 320px;
    }

    .docs-content {
        padding: 0 16px;
    }

    .toc-toggle-btn {
        padding: 10px 16px;
        font-size: 15px;
    }
}

/* ========================================
   Lightbox Modal
   ======================================== */

.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-content {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #ccc;
}

.screenshot-clickable {
    cursor: zoom-in;
    transition: opacity 0.3s ease;
}

.screenshot-clickable:hover {
    opacity: 0.9;
}

/* ========================================
   AI Workflow Page Styles
   ======================================== */

/* Content text styling */
.content-text {
    font-size: 18px;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 24px;
    max-width: 800px;
}

/* Workflow benefits grid */
.workflow-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.benefit-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.benefit-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.benefit-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
}

.benefit-card p {
    font-size: 16px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Diagram container */
.diagram-container {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 40px;
    margin: 40px 0;
    overflow-x: auto;
}

/* Improve Mermaid diagram visibility in dark mode */
:root[data-theme="dark"] .diagram-container .mermaid {
    filter: invert(0.85) hue-rotate(180deg) brightness(0.95) contrast(1.4);
}

.diagram-note {
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 14px;
    margin-top: 24px;
}

/* Agent grid */
.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.agent-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.agent-emoji {
    font-size: 40px;
    margin-bottom: 16px;
}

.agent-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}

.agent-card p {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Process steps */
.process-steps {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 40px;
}

.process-step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}

.step-content p {
    font-size: 16px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Execution modes */
.execution-modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.mode-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 32px;
}

.mode-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-text);
}

.mode-card ul {
    list-style: none;
    padding: 0;
}

.mode-card li {
    font-size: 16px;
    color: var(--color-text-secondary);
    line-height: 1.8;
    padding-left: 24px;
    position: relative;
    margin-bottom: 12px;
}

.mode-card li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: 700;
}

/* CTA buttons section */
.cta-buttons {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Section alternating backgrounds */
.section-alt {
    background: var(--color-surface);
}

/* Feature examples grid (for semantic-diffs and similar pages) */
.feature-examples {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    margin-top: 32px;
}

.feature-example-card {
    background: var(--color-surface);
    border-radius: 12px;
    padding: 32px;
    border: 1px solid var(--color-border);
}

.feature-example-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--color-text);
}

.feature-example-description {
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}

.feature-example-note {
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-top: 16px;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--color-bg);
    border-left: 3px solid var(--color-primary);
    border-radius: 4px;
}

.feature-screenshot {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.feature-detail-footer {
    margin-top: 64px;
    padding: 32px;
    background: var(--color-surface);
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.feature-detail-footer h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--color-text);
}

.feature-detail-footer p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .workflow-benefits {
        grid-template-columns: 1fr;
    }
    
    .agent-grid {
        grid-template-columns: 1fr;
    }
    
    .execution-modes {
        grid-template-columns: 1fr;
    }
    
    .process-step {
        flex-direction: column;
        gap: 16px;
    }
    
    .diagram-container {
        padding: 20px;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    .feature-example-card {
        padding: 24px;
    }
    
    .feature-examples {
        gap: 32px;
    }
}

} /* End @layer website */