:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --text-primary: #e5e5e5;
    --text-secondary: #a0a0a0;
    --text-muted: #6a6a6a;
    --border: #2a2a2a;
    --accent: #3a3a3a;
    --accent-light: #4a4a4a;
    --success: #2d5a3d;
    --warning: #5a4a2d;
    --danger: #5a2d2d;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    left: 0;
    top: 0;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.navigation {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    transition: all 0.15s ease;
    display: block;
}

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

/* Main Content */
.content {
    margin-left: 280px;
    flex: 1;
    padding: 3rem 4rem;
    max-width: 900px;
}

.section {
    margin-bottom: 4rem;
    scroll-margin-top: 3rem;
}

.section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.section h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section h4 {
    font-size: 1.05rem;
    font-weight: 500;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.section p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.section ul,
.section ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.section li {
    margin-bottom: 0.5rem;
}

.section em {
    font-style: italic;
}

.section strong {
    font-weight: 600;
    color: var(--text-primary);
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
}

.card h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.card p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Process Steps */
.process-step {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.step-number {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.step-content ul {
    margin-left: 1rem;
    margin-bottom: 0;
}

.example {
    display: block;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-primary);
    border-left: 3px solid var(--accent);
    font-size: 0.9rem;
}

/* Levels */
.levels {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.level {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.level h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.level p {
    margin: 0;
}

.level-status {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Insight Box */
.insight-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--accent);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.insight-box p {
    margin-bottom: 0.75rem;
}

.insight-box p:last-child {
    margin-bottom: 0;
}

/* Warning Box */
.warning-box {
    background: rgba(90, 45, 45, 0.1);
    border: 1px solid rgba(90, 45, 45, 0.3);
    border-left: 4px solid var(--danger);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.warning-box h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
}

.warning-box p {
    margin-bottom: 1rem;
}

.warning-box p:last-child {
    margin-bottom: 0;
}

.warning-box ul {
    margin-bottom: 1rem;
}

.utility-score {
    display: inline-block;
    background: var(--danger);
    color: var(--text-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Distinction */
.distinction {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.distinction p {
    margin-bottom: 1rem;
}

/* Channel Options */
.channel-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.channel {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
}

.channel h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
}

.channel p {
    margin: 0;
    font-size: 0.9rem;
}

.channel em {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
}

/* Final Point */
.final-point {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

/* Decision Table */
.decision-table {
    margin: 1.5rem 0;
}

.decision-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-tertiary);
    border-radius: 8px;
    overflow: hidden;
}

.decision-table th,
.decision-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.decision-table th {
    background: var(--accent);
    font-weight: 500;
    color: var(--text-primary);
}

.decision-table td {
    color: var(--text-secondary);
}

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

/* Decision Tree */
.decision-tree {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.decision-tree ol {
    margin-left: 1.5rem;
    margin-bottom: 0;
}

.decision-tree li {
    margin-bottom: 0.75rem;
}

.decision-tree li:last-child {
    margin-bottom: 0;
}

.decision-tree strong {
    color: var(--text-primary);
}

/* Core Reminder */
.core-reminder {
    background: var(--bg-tertiary);
    border: 2px solid var(--accent);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
}

.core-reminder p {
    margin-bottom: 1rem;
}

.core-reminder p:last-child {
    margin-bottom: 0;
}

/* Note */
.note {
    display: block;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent);
}

/* Footer */
.footer {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 900px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1.5rem;
    }

    .content {
        margin-left: 0;
        padding: 2rem 1.5rem;
    }

    .card-grid,
    .channel-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .content {
        padding: 1.5rem 1rem;
    }

    .section h2 {
        font-size: 1.5rem;
    }

    .process-step {
        flex-direction: column;
        gap: 1rem;
    }

    .step-number {
        width: 2rem;
        height: 2rem;
    }
}
