/* ChipPulse - Dark Silicon Theme */
:root {
    --bg: #0a0e14;
    --bg-card: #121821;
    --bg-card-hover: #182231;
    --bg-surface: #0e131b;
    --border: #232d3d;
    --text: #b8c4d6;
    --text-muted: #6e7c93;
    --text-bright: #eef2f8;
    --accent: #29b6f6;
    --accent-glow: #29b6f625;
    --accent2: #00e5c7;
    --accent3: #7c8cf8;
    --gradient: linear-gradient(135deg, #29b6f6 0%, #00e5c7 50%, #7c8cf8 100%);
    --nav-bg: #060a10;
    --nav-text: #b8c4d6;
    --radius: 14px;
    --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    background: var(--bg);
    background-image:
        radial-gradient(circle at 15% 0%, rgba(41,182,246,0.08), transparent 40%),
        radial-gradient(circle at 85% 15%, rgba(0,229,199,0.06), transparent 40%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
}

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

img { max-width: 100%; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-bright);
    letter-spacing: -0.02em;
}

.logo-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 900;
    color: #04121a;
}

.logo span.accent { color: var(--accent); }

.nav-links {
    display: flex;
    gap: 4px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--nav-text);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.15s ease;
}

.nav-links a:hover, .nav-links a.active {
    background: var(--bg-card-hover);
    color: var(--text-bright);
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-bright);
    font-size: 18px;
    padding: 6px 10px;
    cursor: pointer;
}

/* Hero */
.hero {
    padding: 72px 0 56px;
    border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid rgba(41,182,246,0.3);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 900;
    color: var(--text-bright);
    letter-spacing: -0.03em;
    line-height: 1.1;
    max-width: 780px;
    margin-bottom: 18px;
}

.hero h1 .accent-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p.lead {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 620px;
    margin-bottom: 28px;
}

.hero-stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.hero-stat {
    display: flex;
    flex-direction: column;
}

.hero-stat .num {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-bright);
}

.hero-stat .label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Section headers */
.section {
    padding: 56px 0;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    gap: 20px;
    flex-wrap: wrap;
}

.section-head h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-bright);
    letter-spacing: -0.02em;
}

.section-head p {
    color: var(--text-muted);
    font-size: 15px;
    margin-top: 6px;
}

/* Cards / Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
    border-color: rgba(41,182,246,0.4);
    transform: translateY(-2px);
}

/* Article feed */
.article-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
    text-decoration: none;
    color: inherit;
}

.article-card:hover { border-color: rgba(41,182,246,0.4); text-decoration: none; }

.article-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.tag {
    background: var(--accent-glow);
    color: var(--accent);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tag.alt { background: rgba(0,229,199,0.12); color: var(--accent2); }
.tag.alt2 { background: rgba(124,140,248,0.14); color: var(--accent3); }

.article-card h3 {
    font-size: 19px;
    font-weight: 750;
    color: var(--text-bright);
    margin-bottom: 8px;
    line-height: 1.35;
}

.article-card p { color: var(--text); font-size: 15px; }

/* Topic cards */
.topic-card h3 {
    color: var(--text-bright);
    font-size: 19px;
    font-weight: 750;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topic-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.topic-card p { color: var(--text-muted); font-size: 14.5px; }

/* Company cards */
.company-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.company-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.company-name { font-size: 18px; font-weight: 750; color: var(--text-bright); }

.ticker {
    font-family: 'SF Mono', Menlo, monospace;
    font-size: 13px;
    font-weight: 800;
    color: var(--bg);
    background: var(--accent2);
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

.company-card p.desc { color: var(--text); font-size: 14.5px; }

.company-tag { font-size: 12.5px; color: var(--accent); font-weight: 650; }

/* Editorial / futures pages */
.editorial {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
}

.editorial h2 {
    color: var(--text-bright);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.editorial .article-meta { margin-bottom: 16px; }

.editorial p { margin-bottom: 16px; font-size: 15.5px; }
.editorial p:last-child { margin-bottom: 0; }

/* About page */
.prose h2 {
    color: var(--text-bright);
    font-size: 22px;
    font-weight: 800;
    margin: 28px 0 12px;
}

.prose h2:first-child { margin-top: 0; }

.prose p { margin-bottom: 16px; font-size: 16px; }

.callout {
    background: var(--accent-glow);
    border: 1px solid rgba(41,182,246,0.3);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 24px 0;
    color: var(--text-bright);
    font-size: 15.5px;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    margin-top: 40px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.footer-links a { color: var(--text-muted); font-size: 14px; }
.footer-links a:hover { color: var(--text-bright); }

.footer-note { color: var(--text-muted); font-size: 13px; }

/* Responsive */
@media (max-width: 780px) {
    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        border-bottom: 1px solid var(--border);
        padding: 12px;
        gap: 4px;
    }
    .nav-toggle { display: block; }
    .hero { padding: 48px 0 40px; }
    .hero-stats { gap: 20px; }
    .section { padding: 40px 0; }
}

/* Live quote rows */
:root { --pos: #34d399; --neg: #f87171; }

.stock-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    font-family: 'SF Mono', Menlo, monospace;
    margin: 10px 0 2px;
    min-height: 24px;
}

.stock-price { font-size: 16px; font-weight: 800; color: var(--text-bright); }
.stock-change { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.stock-change.is-up { color: var(--pos); }
.stock-change.is-down { color: var(--neg); }

.stock-row.is-loading .stock-price,
.stock-row.is-loading .stock-change { opacity: 0.45; }

.stock-row.is-dead .stock-price {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
}

.quote-stamp { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
