/* ===================================
   OpenGrammar Documentation Styles
   Paper Texture & 256-bit Color Theme
   =================================== */

:root {
    /* Paper Theme Colors */
    --paper-bg: #FDFBF7;
    --paper-bg-secondary: #F8F6F0;
    --paper-border: #E8E4D9;
    --paper-text: #2D2A26;
    --paper-text-muted: #6B665C;
    
    /* 256-bit Rich Colors */
    --primary-50: #EEF4FF;
    --primary-100: #DCE6FF;
    --primary-200: #BACEFF;
    --primary-300: #96A9FF;
    --primary-400: #6B85FF;
    --primary-500: #4F66F0;
    --primary-600: #3D4FDE;
    --primary-700: #303EC4;
    --primary-800: #2834A3;
    --primary-900: #242F85;
    
    /* Accent Colors */
    --amber-50: #FFFBEB;
    --amber-100: #FEF3C7;
    --amber-200: #FDE68A;
    --amber-300: #FCD34D;
    --amber-400: #FBBF24;
    --amber-500: #F59E0B;
    --amber-600: #D97706;
    
    --red-50: #FEF2F2;
    --red-100: #FEE2E2;
    --red-200: #FECACA;
    --red-300: #FCA5A5;
    --red-400: #F87171;
    --red-500: #EF4444;
    --red-600: #DC2626;
    
    --green-50: #F0FDF4;
    --green-100: #DCFCE7;
    --green-200: #BBF7D0;
    --green-300: #86EFAC;
    --green-400: #4ADE80;
    --green-500: #22C55E;
    --green-600: #16A34A;
    
    --blue-50: #EFF6FF;
    --blue-100: #DBEAFE;
    --blue-200: #BFDBFE;
    --blue-300: #93C5FD;
    --blue-400: #60A5FA;
    --blue-500: #3B82F6;
    --blue-600: #2563EB;
    
    --purple-50: #F5F3FF;
    --purple-100: #EDE9FE;
    --purple-200: #DDD6FE;
    --purple-300: #C4B5FD;
    --purple-400: #A78BFA;
    --purple-500: #8B5CF6;
    --purple-600: #7C3AED;
    
    /* Dark Mode Colors */
    --dark-bg: #0F1115;
    --dark-bg-secondary: #16181D;
    --dark-border: #2A2D35;
    --dark-text: #E8E6E3;
    --dark-text-muted: #9CA3AF;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --sidebar-width: 280px;
    --header-height: 64px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Dark Mode */
.dark {
    --paper-bg: #0F1115;
    --paper-bg-secondary: #16181D;
    --paper-border: #2A2D35;
    --paper-text: #E8E6E3;
    --paper-text-muted: #9CA3AF;
    
    /* Semantic Colors Overrides for Dark Mode */
    --primary-50: rgba(79, 102, 240, 0.1);
    --primary-100: rgba(79, 102, 240, 0.2);
    --amber-50: rgba(245, 158, 11, 0.1);
    --amber-100: rgba(245, 158, 11, 0.2);
    --red-50: rgba(239, 68, 68, 0.1);
    --red-100: rgba(239, 68, 68, 0.2);
    --green-50: rgba(34, 197, 94, 0.1);
    --green-100: rgba(34, 197, 94, 0.2);
    --blue-50: rgba(59, 130, 246, 0.1);
    --blue-100: rgba(59, 130, 246, 0.2);
    --purple-50: rgba(139, 92, 246, 0.1);
    --purple-100: rgba(139, 92, 246, 0.2);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.icon-inline {
    display: inline-block;
    vertical-align: middle;
    width: 1.25em;
    height: 1.25em;
    margin-top: -0.2em;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--paper-text);
    background-color: var(--paper-bg);
    overflow-x: hidden;
}

/* Paper Texture Overlay */
.paper-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.4;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--paper-bg) 0%, var(--paper-bg-secondary) 100%);
    border-right: 1px solid var(--paper-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow: hidden;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--paper-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--purple-600) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.version-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--primary-100) 0%, var(--purple-100) 100%);
    color: var(--primary-700);
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-align: center;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--paper-text-muted);
    padding: 8px 12px;
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--paper-text-muted);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.nav-link:hover {
    background: var(--paper-bg-secondary);
    color: var(--paper-text);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--purple-50) 100%);
    color: var(--primary-700);
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--paper-border);
}

.github-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: var(--paper-bg-secondary);
    border: 1px solid var(--paper-border);
    border-radius: 8px;
    color: var(--paper-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.github-link:hover {
    background: var(--paper-bg);
    border-color: var(--primary-300);
}

.github-icon {
    width: 20px;
    height: 20px;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Content Header */
.content-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-height);
    background: rgba(253, 251, 247, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--paper-border);
    display: flex;
    align-items: center;
    padding: 0 32px;
    gap: 24px;
}

.dark .content-header {
    background: rgba(15, 17, 21, 0.9);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: var(--paper-text);
}

.menu-toggle:hover {
    background: var(--paper-bg-secondary);
}

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

/* Search Box */
.search-box {
    flex: 1;
    max-width: 480px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--paper-text-muted);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    background: var(--paper-bg-secondary);
    border: 1px solid var(--paper-border);
    border-radius: 10px;
    font-size: 14px;
    color: var(--paper-text);
    outline: none;
    transition: all 0.2s ease;
}

.search-box input:focus {
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.search-box kbd {
    position: absolute;
    right: 12px;
    padding: 4px 8px;
    background: var(--paper-bg);
    border: 1px solid var(--paper-border);
    border-radius: 6px;
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--paper-text-muted);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.theme-toggle {
    background: var(--paper-bg-secondary);
    border: 1px solid var(--paper-border);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--paper-text);
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--paper-bg);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.theme-toggle .moon-icon {
    display: none;
}

.dark .theme-toggle .sun-icon {
    display: none;
}

.dark .theme-toggle .moon-icon {
    display: block;
}

.github-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--paper-text);
    color: var(--paper-bg);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.github-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.github-btn svg {
    width: 20px;
    height: 20px;
}

/* Content Wrapper */
.content-wrapper {
    padding: 48px 64px;
    max-width: 1200px;
}

/* Content Section */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Section Header */
.section-header {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--paper-border);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--paper-text-muted);
    margin-bottom: 16px;
}

.breadcrumb a {
    color: var(--primary-600);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-sep {
    color: var(--paper-text-muted);
}

.breadcrumb .current {
    color: var(--paper-text);
}

.section-header h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--paper-text) 0%, var(--paper-text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: 18px;
    color: var(--paper-text-muted);
    max-width: 700px;
}

/* Content Body */
.content-body {
    font-size: 17px;
    line-height: 1.8;
}

.content-body h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 48px 0 20px;
    color: var(--paper-text);
}

.content-body h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 36px 0 16px;
    color: var(--paper-text);
}

.content-body h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 28px 0 12px;
    color: var(--paper-text);
}

.content-body p {
    margin-bottom: 20px;
    color: var(--paper-text);
}

.content-body ul,
.content-body ol {
    margin: 20px 0 20px 28px;
}

.content-body li {
    margin-bottom: 10px;
}

.content-body a {
    color: var(--primary-600);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.content-body a:hover {
    border-bottom-color: var(--primary-600);
}

.content-body code {
    font-family: var(--font-mono);
    font-size: 14px;
    padding: 3px 8px;
    background: var(--paper-bg-secondary);
    border: 1px solid var(--paper-border);
    border-radius: 6px;
    color: var(--paper-text);
}

.content-body pre {
    margin: 20px 0;
    overflow-x: auto;
}

/* Callouts */
.callout {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: 12px;
    margin: 24px 0;
    border-left: 4px solid;
}

.callout-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.callout-content strong {
    display: block;
    margin-bottom: 4px;
}

.callout-primary {
    background: var(--primary-50);
    border-color: var(--primary-500);
}

.callout-success {
    background: var(--green-50);
    border-color: var(--green-500);
}

.callout-warning {
    background: var(--amber-50);
    border-color: var(--amber-500);
}

.callout-info {
    background: var(--blue-50);
    border-color: var(--blue-500);
}

/* Code Block */
.code-block {
    margin: 24px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--paper-border);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--paper-bg-secondary);
    border-bottom: 1px solid var(--paper-border);
}

.code-lang {
    font-size: 12px;
    font-weight: 600;
    color: var(--paper-text-muted);
    text-transform: uppercase;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--paper-border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--paper-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: var(--paper-bg);
    color: var(--paper-text);
}

.copy-btn svg {
    width: 16px;
    height: 16px;
}

.code-block pre {
    margin: 0;
    padding: 20px;
    background: var(--paper-bg-secondary);
    overflow-x: auto;
}

.code-block small pre {
    padding: 12px;
}

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

/* Step List */
.step-list {
    counter-reset: step;
    list-style: none;
    margin: 24px 0;
    padding: 0;
}

.step-list li {
    position: relative;
    padding-left: 48px;
    margin-bottom: 16px;
}

.step-list li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--purple-500) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

/* Tabs */
.tabs {
    margin: 24px 0;
}

.tab-buttons {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--paper-bg-secondary);
    border: 1px solid var(--paper-border);
    border-radius: 10px;
    margin-bottom: 16px;
}

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--paper-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.tab-btn.active {
    background: var(--paper-bg);
    color: var(--primary-600);
    box-shadow: var(--shadow-sm);
}

.tab-content {
    background: var(--paper-bg);
    border: 1px solid var(--paper-border);
    border-radius: 10px;
    padding: 24px;
}

.tab-pane {
    display: none;
}

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

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin: 24px 0;
    border-radius: 12px;
    border: 1px solid var(--paper-border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--paper-border);
}

.data-table th {
    background: var(--paper-bg-secondary);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--paper-text-muted);
}

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

.data-table tr:hover {
    background: var(--paper-bg-secondary);
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.success {
    background: var(--green-100);
    color: var(--green-700);
}

.status-badge.warning {
    background: var(--amber-100);
    color: var(--amber-700);
}

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

.feature-card {
    padding: 24px;
    background: var(--paper-bg-secondary);
    border: 1px solid var(--paper-border);
    border-radius: 12px;
}

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

.feature-card h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

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

.link-list li {
    margin-bottom: 8px;
}

.link-list a {
    color: var(--primary-600);
    text-decoration: none;
}

.link-list a:hover {
    text-decoration: underline;
}

/* Provider Cards */
.provider-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.provider-card {
    padding: 20px;
    background: var(--paper-bg-secondary);
    border: 1px solid var(--paper-border);
    border-radius: 12px;
    text-align: center;
}

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

.provider-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.provider-card p {
    font-size: 14px;
    color: var(--paper-text-muted);
    margin-bottom: 8px;
}

.provider-card code {
    font-size: 12px;
}

/* Color Guide */
.color-guide {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

.color-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid var(--paper-border);
    box-shadow: var(--shadow-sm);
}

.color-swatch.red {
    background: linear-gradient(135deg, var(--red-400) 0%, var(--red-500) 100%);
}

.color-swatch.amber {
    background: linear-gradient(135deg, var(--amber-400) 0%, var(--amber-500) 100%);
}

.color-swatch.blue {
    background: linear-gradient(135deg, var(--blue-400) 0%, var(--blue-500) 100%);
}

.color-info {
    display: flex;
    flex-direction: column;
}

.color-info strong {
    font-size: 16px;
    margin-bottom: 2px;
}

.color-info span {
    font-size: 14px;
    color: var(--paper-text-muted);
}

/* Tone Grid */
.tone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.tone-card {
    padding: 20px;
    background: var(--paper-bg-secondary);
    border: 1px solid var(--paper-border);
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s ease;
}

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

.tone-emoji {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.tone-card h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.tone-card p {
    font-size: 13px;
    color: var(--paper-text-muted);
    margin: 0;
}

/* Tone Detail Grid */
.tone-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.tone-detail-card {
    padding: 24px;
    background: var(--paper-bg-secondary);
    border: 1px solid var(--paper-border);
    border-radius: 12px;
}

.tone-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.tone-detail-icon {
    font-size: 28px;
}

.tone-detail-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.tone-detail-use {
    font-size: 14px;
    color: var(--paper-text-muted);
    margin-bottom: 16px;
}

.tone-detail-example {
    background: var(--paper-bg);
    border-radius: 8px;
    padding: 16px;
}

.example-input,
.example-output {
    margin-bottom: 12px;
}

.example-input:last-child,
.example-output:last-child {
    margin-bottom: 0;
}

.example-input .label,
.example-output .label {
    font-size: 12px;
    font-weight: 600;
    color: var(--paper-text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
    display: block;
}

.example-output code {
    background: var(--green-50);
    border-color: var(--green-200);
    color: var(--green-700);
}

/* Metric Card */
.metric-card {
    background: var(--paper-bg-secondary);
    border: 1px solid var(--paper-border);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
}

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

.metric-header h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.metric-badge {
    padding: 4px 10px;
    background: var(--primary-100);
    color: var(--primary-700);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.metric-scale {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scale-item {
    display: flex;
    gap: 12px;
    font-size: 14px;
}

.scale-item .range {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--primary-600);
    min-width: 80px;
}

.scale-item .label {
    color: var(--paper-text-muted);
}

/* FAQ List */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--paper-bg-secondary);
    border: 1px solid var(--paper-border);
    border-radius: 12px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.faq-question:hover {
    background: var(--paper-bg);
}

.faq-question h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
}

.faq-question svg {
    width: 20px;
    height: 20px;
    color: var(--paper-text-muted);
    transition: transform 0.2s ease;
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 24px 20px;
    max-height: 500px;
}

/* Troubleshoot Card */
.troubleshoot-card {
    background: var(--paper-bg-secondary);
    border: 1px solid var(--paper-border);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
}

.troubleshoot-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 12px;
}

.troubleshoot-card h4:first-child {
    margin-top: 0;
}

.troubleshoot-card ul,
.troubleshoot-card ol {
    margin: 12px 0 12px 24px;
}

/* Provider Comparison */
.provider-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.provider-card-large {
    background: var(--paper-bg-secondary);
    border: 1px solid var(--paper-border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s ease;
}

.provider-card-large:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.provider-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.provider-icon {
    font-size: 32px;
}

.provider-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.provider-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.provider-stats .stat {
    font-size: 14px;
    color: var(--paper-text-muted);
}

.provider-desc {
    font-size: 14px;
    color: var(--paper-text);
    margin: 0;
}

/* Feature Grid 2 */
.feature-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.feature-box {
    padding: 24px;
    background: var(--paper-bg-secondary);
    border: 1px solid var(--paper-border);
    border-radius: 12px;
}

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

.feature-box h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-box p {
    font-size: 15px;
    color: var(--paper-text-muted);
    margin: 0;
}

/* Feature List */
.feature-list {
    list-style: none;
    margin: 24px 0;
    padding: 0;
}

.feature-list li {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding-left: 0;
}

.feature-list li::before {
    content: none;
}

.feature-list li svg {
    width: 20px;
    height: 20px;
    color: var(--green-500);
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-list li ul {
    margin: 8px 0 0 32px;
}

/* Hero Card */
.hero-card {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--purple-50) 100%);
    border: 1px solid var(--primary-200);
    border-radius: 16px;
    padding: 32px;
    margin: 24px 0;
}

.hero-card-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
}

.hero-card-content p {
    font-size: 16px;
    color: var(--paper-text-muted);
    margin: 0;
}

/* Section Nav */
.section-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--paper-border);
}

.prev-link,
.next-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--paper-bg-secondary);
    border: 1px solid var(--paper-border);
    border-radius: 10px;
    color: var(--paper-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.prev-link:hover,
.next-link:hover {
    background: var(--paper-bg);
    border-color: var(--primary-300);
}

.prev-link svg,
.next-link svg {
    width: 18px;
    height: 18px;
}

/* API Endpoint */
.api-endpoint {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.api-method {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-mono);
}

.api-method.get {
    background: var(--blue-100);
    color: var(--blue-700);
}

.api-method.post {
    background: var(--green-100);
    color: var(--green-700);
}

.api-path {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 600;
}

/* Highlight */
.highlight-red {
    color: var(--red-600);
    font-weight: 600;
}

/* Kbd */
kbd {
    display: inline-block;
    padding: 4px 8px;
    background: var(--paper-bg-secondary);
    border: 1px solid var(--paper-border);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--paper-text);
}

/* Footer */
.content-footer {
    padding: 48px 64px;
    border-top: 1px solid var(--paper-border);
    margin-top: 64px;
}

.footer-content {
    max-width: 1200px;
    text-align: center;
    color: var(--paper-text-muted);
    font-size: 14px;
}

.footer-content p {
    margin-bottom: 8px;
}

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

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

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 0;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .menu-toggle {
        display: block;
    }
    
    .content-wrapper {
        padding: 32px 24px;
    }
    
    .content-header {
        padding: 0 24px;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .section-header h1 {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .header-actions {
        gap: 8px;
    }
    
    .github-btn span {
        display: none;
    }
    
    .content-wrapper {
        padding: 24px 16px;
    }
    
    .content-footer {
        padding: 32px 16px;
    }
    
    .provider-cards,
    .provider-comparison,
    .feature-grid,
    .feature-grid-2,
    .tone-grid,
    .tone-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .tab-buttons {
        flex-wrap: wrap;
    }
    
    .section-nav {
        flex-direction: column;
        gap: 12px;
    }
    
    .prev-link,
    .next-link {
        width: 100%;
        justify-content: center;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--paper-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--paper-border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--paper-text-muted);
}

/* Selection */
::selection {
    background: var(--primary-200);
    color: var(--primary-900);
}
