:root {
    color-scheme: dark;
    --background: #0b0b0b;
    --text-primary: #ffffff;
    --text-secondary: #9a9a9a;
    --accent: #ff4d4d;
    --max-width: 1100px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    background-image: linear-gradient(135deg, rgba(255, 77, 77, 0.08), rgba(11, 11, 11, 0.2));
    opacity: 0.5;
    pointer-events: none;
    z-index: -1;
}

.container {
    width: min(100%, var(--max-width));
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    background: rgba(11, 11, 11, 0.95);
    backdrop-filter: blur(8px);
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.wordmark {
    font-weight: 700;
    letter-spacing: 0.08em;
}

.header-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hero {
    padding: 6rem 0 4rem;
}

.eyebrow {
    font-size: 0.85rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin: 1rem 0 1.5rem;
    line-height: 1.1;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 32rem;
}

.cta-row {
    margin-top: 2rem;
}

.live-stats {
    margin-top: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-primary {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.stat-label {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.stat-value {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
}

.stat-secondary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-subvalue {
    font-size: 1.4rem;
    font-weight: 500;
}

.stat-feed {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 2.8rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.85rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.primary-btn:hover {
    background: var(--accent);
    color: var(--background);
}

.section {
    padding: 4rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.section-label {
    font-size: 0.75rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin: 0 0 1.5rem;
}

.bullet-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bullet-list li {
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.ledger-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.2rem;
    gap: 0.75rem;
    display: flex;
    flex-direction: column;
}

.ledger-list li {
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.ledger-id {
    color: var(--text-primary);
    font-weight: 600;
}

.note {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stress {
    background: linear-gradient(135deg, rgba(255, 77, 77, 0.08), rgba(11, 11, 11, 0.9));
}

.stress-indicator {
    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: 0.08em;
    margin: 1.5rem 0 0.8rem;
}

.stress-indicator span {
    color: var(--accent);
}

.secondary {
    color: var(--text-secondary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
}

.metric-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.metric-label {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 600;
}

.metric-footnote {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: auto;
}

.pressure-bar {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.pressure-fill {
    height: 100%;
    width: 0;
    background: var(--accent);
    transition: width 0.4s ease;
}

.flow-bar {
    width: 100%;
    height: 26px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    position: relative;
    overflow: hidden;
}

.flow-bar span {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: rgba(255, 77, 77, 0.6);
    transition: width 0.4s ease;
}

.ticker-card {
    grid-column: span 2;
}

.ticker-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.narrative-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.narrative-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.01);
    min-height: 210px;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.narrative-card h3 {
    margin-top: 0;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
}

.narrative-card p {
    color: var(--text-secondary);
}

.narrative-card.active {
    border-color: var(--accent);
    transform: translateY(-6px);
}

.philosophy blockquote {
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-style: normal;
    border-left: 4px solid var(--accent);
    padding-left: 1.5rem;
    color: var(--text-primary);
}

.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem 0 3rem;
}

.site-footer .container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent);
}

@media (min-width: 768px) {
    .hero {
        padding: 8rem 0 6rem;
    }

    .ticker-card {
        grid-column: span 1;
    }

    .site-footer .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}
