/* SI500 Documentation — shared sidebar layout */
:root {
    --docs-bg: #fafafa;
    --docs-surface: #ffffff;
    --docs-text: #111827;
    --docs-text-muted: #6b7280;
    --docs-border: #e5e7eb;
    --docs-accent: #10b981;
    --docs-sidebar-width: 200px;
    --docs-mono: 'IBM Plex Mono', 'JetBrains Mono', monospace;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--docs-bg);
    color: var(--docs-text);
    min-height: 100vh;
    line-height: 1.6;
}

a {
    color: var(--docs-accent);
}

/* Layout */
.docs-layout {
    display: flex;
    min-height: 100vh;
}

.docs-sidebar {
    width: var(--docs-sidebar-width);
    flex-shrink: 0;
    background: var(--docs-surface);
    border-right: 0.5px solid var(--docs-border);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
}

.docs-main {
    flex: 1;
    margin-left: var(--docs-sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.docs-content {
    flex: 1;
    padding: 32px 40px 48px;
    max-width: 960px;
}

@media (max-width: 768px) {
    .docs-sidebar {
        position: relative;
        width: 100%;
        border-right: none;
        border-bottom: 0.5px solid var(--docs-border);
    }

    .docs-layout {
        flex-direction: column;
    }

    .docs-main {
        margin-left: 0;
    }
}

/* Sidebar brand */
.docs-sidebar-brand {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 4px;
    padding: 0 16px 16px;
    text-decoration: none;
}

.docs-logo-si {
    font-family: var(--docs-mono);
    font-size: 18px;
    font-weight: 700;
    color: var(--docs-text);
    letter-spacing: -0.02em;
}

.docs-logo-500 {
    font-family: var(--docs-mono);
    font-size: 18px;
    font-weight: 700;
    color: var(--docs-accent);
    letter-spacing: -0.02em;
}

.docs-sidebar-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--docs-text-muted);
    margin-left: 4px;
}

.docs-sidebar-divider {
    border: none;
    border-top: 0.5px solid var(--docs-border);
    margin: 8px 0;
}

.docs-sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 4px 0;
}

.docs-sidebar-link {
    display: block;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--docs-text-muted);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.docs-sidebar-link:hover {
    color: var(--docs-text);
    background: rgba(16, 185, 129, 0.06);
}

.docs-sidebar-link.is-active {
    color: var(--docs-text);
    font-weight: 600;
    border-left-color: var(--docs-accent);
    background: rgba(16, 185, 129, 0.08);
}

.docs-sidebar-external {
    display: block;
    padding: 8px 16px;
    margin-top: auto;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--docs-text-muted);
    text-decoration: none;
}

.docs-sidebar-external:hover {
    color: var(--docs-accent);
}

#return-link {
    display: block;
    font-size: 11px;
    color: #6b7280;
    text-decoration: none;
    padding: 0 16px 8px;
}

#return-link:hover {
    color: var(--docs-accent);
}

/* Page headers */
.docs-page-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--docs-text-muted);
    font-weight: 700;
    margin-bottom: 8px;
}

.docs-page-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
    color: var(--docs-text);
}

.docs-page-intro {
    font-size: 0.95rem;
    color: var(--docs-text-muted);
    margin-bottom: 32px;
    max-width: 640px;
}

/* Home cards */
.docs-nav-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 640px) {
    .docs-nav-cards {
        grid-template-columns: 1fr;
    }
}

.docs-nav-card {
    display: block;
    background: var(--docs-surface);
    border: 0.5px solid var(--docs-border);
    border-radius: 8px;
    padding: 24px 28px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.docs-nav-card:hover {
    border-color: var(--docs-accent);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.docs-nav-card-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--docs-text);
    margin-bottom: 4px;
}

.docs-nav-card-sub {
    font-size: 0.8rem;
    color: var(--docs-text-muted);
}

/* Placeholder */
.docs-coming-soon {
    font-size: 0.95rem;
    color: var(--docs-text-muted);
    padding: 24px 28px;
    background: var(--docs-surface);
    border: 0.5px solid var(--docs-border);
    border-radius: 8px;
}

/* Footer */
.docs-footer {
    padding: 20px 40px;
    border-top: 0.5px solid var(--docs-border);
    font-size: 0.75rem;
    color: var(--docs-text-muted);
    font-family: var(--docs-mono);
    background: var(--docs-surface);
}

/* ==================== METHODOLOGY CONTENT ==================== */
.docs-content--wide {
    max-width: 1000px;
}

.version-bar {
    background: #111827;
    color: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.version-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.version-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9ca3af;
}

.version-number {
    font-size: 13px;
    font-weight: 700;
    font-family: var(--docs-mono);
    padding: 4px 10px;
    background: var(--docs-accent);
    border-radius: 4px;
}

.version-status {
    font-size: 12px;
    color: #9ca3af;
}

.content-section {
    margin-bottom: 48px;
}

.section-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--docs-text-muted);
    margin-bottom: 10px;
    font-weight: 700;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.section-desc {
    font-size: 15px;
    color: var(--docs-text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.criteria-box {
    background: var(--docs-surface);
    border: 0.5px solid var(--docs-border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 14px;
}

.criteria-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
}

.criteria-rule {
    font-family: var(--docs-mono);
    font-size: 13px;
    background: var(--docs-bg);
    border: 0.5px solid var(--docs-border);
    padding: 10px 14px;
    border-radius: 6px;
    margin: 8px 0;
}

.criteria-desc {
    font-size: 13px;
    color: var(--docs-text-muted);
    line-height: 1.6;
    margin-top: 8px;
}

.intelligence-box {
    background: #111827;
    color: #fff;
    border-radius: 8px;
    padding: 28px;
    margin: 28px 0;
}

.intelligence-box h3 {
    font-size: 18px;
    margin-bottom: 14px;
}

.intelligence-box p {
    font-size: 14px;
    color: #e5e7eb;
    line-height: 1.7;
    margin-bottom: 10px;
}

.intelligence-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 20px;
}

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

.intelligence-feature {
    background: rgba(255, 255, 255, 0.05);
    padding: 14px;
    border-radius: 6px;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
}

.feature-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
    margin-bottom: 6px;
}

.feature-value {
    font-size: 15px;
    font-weight: 600;
}

.comparison-table {
    background: var(--docs-surface);
    border: 0.5px solid var(--docs-border);
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 12px 16px;
    border-bottom: 0.5px solid var(--docs-border);
}

.table-row:last-child {
    border-bottom: none;
}

.table-row.header {
    background: #111827;
    color: #fff;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-cell {
    font-size: 14px;
}

.table-cell strong {
    font-weight: 600;
}

.code-block {
    background: #111827;
    color: var(--docs-accent);
    font-family: var(--docs-mono);
    font-size: 13px;
    padding: 18px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 14px 0;
    white-space: pre-wrap;
}

.code-comment {
    color: #6b7280;
}

.transparency-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .transparency-grid {
        grid-template-columns: 1fr;
    }
}

.transparency-card {
    background: var(--docs-surface);
    border: 0.5px solid var(--docs-border);
    border-radius: 8px;
    padding: 18px;
}

.trans-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--docs-text-muted);
    margin-bottom: 6px;
}

.trans-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--docs-accent);
    font-family: var(--docs-mono);
}

.trans-desc {
    font-size: 12px;
    color: var(--docs-text-muted);
    margin-top: 6px;
}
