:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-code: #0f172a;
    --border: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #475569;
    --accent: #60a5fa;
    --accent-hover: #3b82f6;
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    --container-max: 800px;
    --transition: 0.2s ease;
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --bg-code: #f1f5f9;
    --border: #cbd5e1;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg-primary: #ffffff;
        --bg-secondary: #f1f5f9;
        --bg-tertiary: #e2e8f0;
        --bg-code: #f1f5f9;
        --border: #cbd5e1;
        --text-primary: #0f172a;
        --text-secondary: #334155;
        --text-muted: #64748b;
        --text-dim: #94a3b8;
        --accent: #2563eb;
        --accent-hover: #1d4ed8;
        --shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-secondary);
    min-height: 100vh;
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.container--narrow { max-width: 600px; }
.container--wide { max-width: 1000px; }

h1 { font-size: 1.8rem; color: var(--text-primary); margin-bottom: 0.5rem; }
h2 { font-size: 1.1rem; color: var(--text-primary); margin-bottom: 1rem; }
h3 { font-size: 1rem; color: var(--text-primary); margin: 1rem 0 0.5rem; }

.subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; }

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    transition: background var(--transition), border-color var(--transition);
}

.card--sm { padding: 1.5rem; }
.card--compact { padding: 1rem 1.5rem; }

table { width: 100%; border-collapse: collapse; }
td { padding: 0.5rem 0; font-size: 0.9rem; }
td:first-child { color: var(--text-muted); }

table.bordered td { border-bottom: 1px solid var(--border); }

code {
    background: var(--bg-tertiary);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

pre {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    overflow-x: auto;
    margin: 0.75rem 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

pre code { background: none; padding: 0; }

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); text-decoration: underline; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}
.btn:hover { background: var(--border); text-decoration: none; }
.btn--accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--accent:hover { background: var(--accent-hover); }

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}
.badge--success { background: var(--success); color: #fff; }
.badge--error { background: var(--error); color: #fff; }
.badge--warning { background: var(--warning); color: #fff; }

.back { color: var(--accent); font-size: 0.875rem; display: inline-block; margin-bottom: 1.5rem; }
.back:hover { text-decoration: underline; }

.footer { text-align: center; color: var(--text-dim); font-size: 0.8rem; margin-top: 1.5rem; }

.links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

ul, ol { padding-left: 1.5rem; margin: 0.5rem 0; }
li { margin-bottom: 0.3rem; color: var(--text-secondary); font-size: 0.9rem; }

.header { margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }

.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    z-index: 1000;
    transition: all var(--transition);
    box-shadow: var(--shadow);
}
.theme-toggle:hover { background: var(--bg-tertiary); }

.status-row td:first-child { width: 40%; }

.doc-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.5rem;
    transition: border-color var(--transition);
}
.doc-card:hover { border-color: var(--accent); }
.doc-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.1rem;
    color: var(--accent);
    flex-shrink: 0;
}
.doc-card h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.doc-card h3 a { color: var(--text-primary); }
.doc-card h3 a:hover { color: var(--accent); }
.doc-card p { color: var(--text-muted); font-size: 0.875rem; line-height: 1.5; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.check-icon {
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700; flex-shrink: 0;
}
.check-icon--ok { background: var(--success); color: #fff; }
.check-icon--warn { background: var(--warning); color: #fff; }
.check-icon--err { background: var(--error); color: #fff; }

@media (max-width: 640px) {
    body { display: block; }
    .container { padding: 1rem; }
    h1 { font-size: 1.4rem; }
    .card { padding: 1.25rem; }
    .links { flex-direction: column; }
    .btn { justify-content: center; }
}
