/* Hopper — Dark Blue Theme */

:root {
    --bg: #0d1117;
    --bg-card: #161b22;
    --bg-nav: #010409;
    --text: #e6edf3;
    --text-dim: #8b949e;
    --accent: #58a6ff;
    --accent-hover: #79c0ff;
    --accent-dim: #1f6feb;
    --border: #30363d;
    --max-w: 800px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Nav */
nav {
    background: var(--bg-nav);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}
nav .logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent);
    text-decoration: none;
}
nav a { color: var(--text-dim); text-decoration: none; }
nav a:hover { color: var(--text); }
.search-form { margin-left: auto; display: flex; gap: 0.25rem; }
.search-form input[type="search"] {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    width: 180px;
}
.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--accent);
}

/* Main */
main {
    flex: 1;
    max-width: var(--max-w);
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* Hero */
.hero {
    text-align: center;
    padding: 3rem 1rem 2rem;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 0.5rem; color: var(--accent); }
.hero p { color: var(--text-dim); margin-bottom: 1.5rem; font-size: 1.1rem; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    background: var(--accent-dim);
    color: #fff;
    margin: 0.25rem;
}
.btn:hover { background: var(--accent); }
.btn.secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--border);
}
.btn.secondary:hover { background: rgba(88, 166, 255, 0.1); border-color: var(--accent); }

/* Tabs */
.tabs {
    display: flex;
    gap: 0.25rem;
    margin: 1.5rem 0 1rem;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}
.tab {
    padding: 0.4rem 1rem;
    text-decoration: none;
    color: var(--text-dim);
    border-bottom: 2px solid transparent;
    font-size: 0.9rem;
    white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Cards */
.cards { display: flex; flex-direction: column; gap: 0.75rem; }
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
}
.card-title {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
}
.card-title:hover { color: var(--accent-hover); text-decoration: underline; }
.card-meta { color: var(--text-dim); font-size: 0.8rem; margin: 0.25rem 0 0.5rem; }
.card-preview { color: var(--text); font-size: 0.9rem; line-height: 1.5; }
.card-preview h1, .card-preview h2, .card-preview h3 { font-size: 1rem; color: var(--text); }
.card-preview strong { color: #fff; }

/* Briefing content (markdown → HTML) */
.briefing-content h1 { font-size: 1.6rem; margin: 1.5rem 0 0.75rem; color: var(--accent); padding-bottom: 0.25rem; border-bottom: 1px solid var(--border); }
.briefing-content h2 { font-size: 1.25rem; margin: 1.5rem 0 0.6rem; color: var(--accent-hover); }
.briefing-content h3 { font-size: 1.05rem; margin: 1rem 0 0.35rem; color: var(--text); }
.briefing-content p { margin: 0.5rem 0; line-height: 1.7; }
.briefing-content strong { color: #fff; font-weight: 600; }
.briefing-content a { color: var(--accent); text-decoration: none; }
.briefing-content a:hover { text-decoration: underline; }
.briefing-content ul, .briefing-content ol { margin: 0.5rem 0 0.5rem 1.5rem; }
.briefing-content li { margin: 0.3rem 0; line-height: 1.6; }
.briefing-content hr { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.briefing-content blockquote {
    border-left: 3px solid var(--accent-dim);
    padding: 0.5rem 1rem;
    color: var(--text-dim);
    margin: 0.75rem 0;
    background: rgba(88, 166, 255, 0.05);
    border-radius: 0 6px 6px 0;
}
.briefing-content code {
    background: var(--bg);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    border: 1px solid var(--border);
    color: var(--accent-hover);
}
.briefing-content pre {
    background: var(--bg);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0.75rem 0;
    border: 1px solid var(--border);
}
.briefing-content pre code {
    background: none;
    border: none;
    color: var(--text);
}

.briefing-full { padding: 1rem 0; }
.meta { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 1rem; }

/* Sources */
.sources { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.sources h2 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--text); }
.sources ul { list-style: none; }
.sources li { margin: 0.35rem 0; }
.sources a { color: var(--accent); font-size: 0.9rem; text-decoration: none; }
.sources a:hover { text-decoration: underline; color: var(--accent-hover); }

/* Empty states */
.empty { color: var(--text-dim); text-align: center; padding: 3rem 1rem; }
.search-info { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 1rem; }
.back { margin-top: 2rem; }
.back a { color: var(--accent); text-decoration: none; }
.back a:hover { text-decoration: underline; }

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-dim);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
}
footer a { color: var(--text-dim); }
footer a:hover { color: var(--accent); }

/* Mobile */
@media (max-width: 600px) {
    .hero h1 { font-size: 1.8rem; }
    .search-form input[type="search"] { width: 120px; }
    .briefing-content h1 { font-size: 1.3rem; }
    .briefing-content h2 { font-size: 1.1rem; }
}
