/* stylesheet — no hardcoded content, all copy lives in content.json */

:root {
    --bg: #e0d5bc;
    --text: #1a1a1a;
    --accent: #2a2a2a;
    --border: rgba(26, 26, 26, 0.12);
    --hover: rgba(26, 26, 26, 0.06);
    --control-border: #1a1a1a;
    --muted: rgba(26, 26, 26, 0.6);
}

body.dark-mode {
    --bg: #181818;
    --text: #e0d5bc;
    --accent: #e0d5bc;
    --border: rgba(224, 213, 188, 0.12);
    --hover: rgba(224, 213, 188, 0.06);
    --control-border: #e0d5bc;
    --muted: rgba(224, 213, 188, 0.6);
}

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

html {
    font-size: 16px;
}

body {
    font-family: ui-monospace, 'Cascadia Code', Menlo, Monaco, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', monospace;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header */
#site-header {
    margin-bottom: 3rem;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.header-controls {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    padding-top: 0.25rem;
}

.control-btn {
    border: 1px solid var(--control-border);
    background: transparent;
    color: var(--text);
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.4;
    transition: opacity 0.2s ease;
}

.control-btn:hover {
    opacity: 0.6;
}

.brand {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.tagline {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.25rem;
    line-height: 1.4;
}

.accent-line {
    border: none;
    border-bottom: 2px solid var(--accent);
    margin-top: 1rem;
}

/* Main */
#site-main {
    margin-top: 1rem;
}

.section {
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
}

.section-label {
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    line-height: 1.2;
}

.toggle-indicator {
    font-family: ui-monospace, 'Cascadia Code', Menlo, Monaco, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', monospace;
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.6;
}

.section-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.3s ease;
    padding-top: 0;
}

.section-content.open {
    max-height: 3000px;
    opacity: 1;
    padding-top: 1.25rem;
}

.section-content p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1em;
    max-width: 640px;
}

.section-content p:last-child {
    margin-bottom: 0;
}

/* Chart */
.chart-figure {
    margin-top: 1.5rem;
    max-width: 100%;
}

.chart-figure img {
    display: block;
    width: 100%;
    max-width: 640px;
    height: auto;
    border: 1px solid var(--border);
}

.chart-caption {
    font-family: ui-monospace, 'Cascadia Code', Menlo, Monaco, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', monospace;
    font-size: 0.7rem;
    opacity: 0.55;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Channels */
.channels-block {
    margin-top: 1.5rem;
    font-family: ui-monospace, 'Cascadia Code', Menlo, Monaco, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
}

.channel-line {
    white-space: pre;
}

/* Filter list */
.filter-list {
    margin-top: 1.5rem;
    padding-left: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.7;
}

.filter-list li {
    margin-bottom: 0.35rem;
}

/* Disclaimer */
.disclaimer {
    margin-top: 1.5rem;
    font-family: ui-monospace, 'Cascadia Code', Menlo, Monaco, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', monospace;
    font-size: 0.85rem;
    color: var(--muted);
    font-style: italic;
}

/* Footer */
#site-footer {
    border-top: 2px solid var(--accent);
    padding-top: 1.5rem;
    margin-top: 4rem;
    font-size: 0.7rem;
    line-height: 1.8;
    color: var(--muted);
}

.footer-tag {
    margin-top: 2rem;
    font-size: 0.65rem;
    opacity: 0.45;
}

/* Error state */
.error-state {
    padding: 2rem 0;
}

.error-code {
    color: var(--muted);
    margin-top: 0.5rem;
}

/* Mobile */
@media (max-width: 600px) {
    body {
        padding: 1.5rem;
        font-size: 15px;
    }

    .brand {
        font-size: 1.4rem;
    }

    .section-content p {
        font-size: 0.92rem;
    }

    .header-top {
        flex-wrap: wrap;
    }

    .header-controls {
        padding-top: 0;
    }
}
