:root {
    --ink:         #1a1a1a;
    --ink-mid:     #555;
    --ink-dim:     #999;
    --rule:        #e8e5e0;
    --paper:       #faf9f7;
    --card:        #ffffff;
    --accent:      #c8602a;
    --accent-pale: #f5ede7;
    --green:       #2d7a4f;
    --green-pale:  #edf7ee;
    --amber:       #b07a20;
    --amber-pale:  #fdf6e3;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'DM Sans', sans-serif;
    background: var(--paper);
    color: var(--ink);
    min-height: 100vh;
}

/* ── Header ── */
.header {
    background: var(--card);
    border-bottom: 1px solid var(--rule);
    padding: 24px 40px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 12px rgba(0,0,0,0.04);
}
.header-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.header-left { display: flex; align-items: baseline; gap: 16px; }
.wordmark {
    font-family: 'DM Serif Display', serif;
    font-size: 26px;
    letter-spacing: -0.5px;
}
.wordmark em { font-style: italic; color: var(--accent); }
.tagline { font-size: 12.5px; color: var(--ink-dim); font-weight: 300; }
.run-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--ink-mid);
}
.run-selector select {
    font-family: 'DM Sans', sans-serif;
    font-size: 12.5px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 5px 10px;
    cursor: pointer;
    outline: none;
}
.main-nav { display: flex; gap: 0; overflow-x: auto; }
.nav-tab {
    padding: 12px 22px;
    border: none;
    border-bottom: 3px solid transparent;
    background: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 13.5px;
    font-weight: 400;
    color: var(--ink-mid);
    transition: all 0.15s;
    white-space: nowrap;
}
.nav-tab:hover { color: var(--ink); }
.nav-tab.active { color: var(--ink); font-weight: 500; border-bottom-color: var(--accent); }

/* ── Sections ── */
.section { display: none; }
.section.active { display: block; }
.content { max-width: 1100px; margin: 0 auto; padding: 40px 40px; }

/* ── Briefing ── */
.briefing-header {
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--rule);
}
.run-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-dim);
    margin-bottom: 14px;
}
.briefing-title {
    font-family: 'DM Serif Display', serif;
    font-size: 46px;
    letter-spacing: -1.5px;
    line-height: 1.08;
    color: var(--ink);
    margin-bottom: 14px;
}
.briefing-lede {
    font-size: 19px;
    color: var(--ink-mid);
    line-height: 1.6;
    max-width: 680px;
    font-weight: 300;
}
.briefing-body {
    max-width: 700px;
    font-size: 16px;
    line-height: 1.78;
    color: var(--ink);
}
.briefing-body .b-section-head {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 32px 0 8px;
}
.briefing-body p { margin-bottom: 14px; }

/* ── Convergence box ── */
.convergence-box {
    margin-top: 44px;
    padding: 22px 26px;
    background: var(--amber-pale);
    border: 1px solid #f0dc8a;
    border-radius: 10px;
}
.convergence-box h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 17px;
    color: var(--amber);
    margin-bottom: 14px;
}
.convergence-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0dc8a;
}
.convergence-item:last-child { border-bottom: none; }
.convergence-item a { font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; }
.convergence-item a:hover { color: var(--accent); }
.conv-personas { font-size: 11.5px; color: var(--ink-dim); margin-top: 2px; }

/* ── Dispatches layout ── */
.dispatches-wrap { display: flex; gap: 0; min-height: 600px; }
.persona-sidebar {
    width: 220px;
    flex-shrink: 0;
    border-right: 1px solid var(--rule);
}
.sidebar-item {
    padding: 13px 18px;
    cursor: pointer;
    border-right: 3px solid transparent;
    border-bottom: 1px solid var(--rule);
    transition: all 0.13s;
}
.sidebar-item:last-child { border-bottom: none; }
.sidebar-item:hover { background: var(--paper); }
.sidebar-item.active { background: var(--accent-pale); border-right-color: var(--accent); }
.sb-name { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.sb-beat { font-size: 11px; color: var(--ink-dim); line-height: 1.3; margin-top: 2px; }
.sb-count {
    display: inline-block;
    margin-top: 5px;
    font-size: 11px;
    color: var(--ink-dim);
    background: var(--rule);
    padding: 1px 7px;
    border-radius: 10px;
}
.dispatch-pane { flex: 1; min-width: 0; padding: 32px 36px; overflow: hidden; }
.dp-persona-name {
    font-family: 'DM Serif Display', serif;
    font-size: 28px;
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}
.dp-beat { font-size: 13px; color: var(--ink-mid); margin-bottom: 6px; }
.dp-core-q { font-size: 13px; color: var(--ink-dim); font-style: italic; margin-bottom: 24px; }
.dp-divider { border: none; border-top: 1px solid var(--rule); margin: 28px 0; }
.dispatch-lede-block {
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    padding: 16px 20px;
    background: var(--accent-pale);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    margin-bottom: 20px;
}
.dispatch-body {
    font-size: 15px;
    line-height: 1.78;
    color: var(--ink);
    max-width: 660px;
    white-space: pre-wrap;
    margin-bottom: 36px;
}
.pins-section-label {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-dim);
    margin-bottom: 14px;
}
.article-list { display: flex; flex-direction: column; gap: 12px; }

/* ── Article card ── */
.article-card {
    display: block;
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 16px 18px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.14s, box-shadow 0.14s;
}
.article-card:hover {
    border-color: #c8c0b8;
    box-shadow: 0 4px 14px rgba(0,0,0,0.07);
}
.ac-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.score-badge {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 6px;
    margin-top: 1px;
}
.score-hi  { background: var(--green-pale);  color: var(--green); }
.score-mid { background: var(--amber-pale);  color: var(--amber); }
.ac-title { font-size: 15px; font-weight: 500; line-height: 1.4; flex: 1; color: var(--ink); }
.ac-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.ac-pub { font-size: 11.5px; color: var(--ink-dim); }
.badge {
    font-size: 10.5px;
    font-weight: 500;
    padding: 1px 8px;
    border-radius: 10px;
    border: 1px solid var(--rule);
    background: var(--paper);
    color: var(--ink-mid);
}
.badge-convergence { background: var(--amber-pale); border-color: #f0dc8a; color: var(--amber); }
.badge-fresh       { background: var(--green-pale); border-color: #c3e6cb; color: var(--green); }
.ac-summary { font-size: 13.5px; color: var(--ink-mid); line-height: 1.55; margin-bottom: 8px; }
.ac-excerpt {
    font-size: 13px;
    color: var(--ink-dim);
    font-style: italic;
    line-height: 1.5;
    padding: 8px 12px;
    background: var(--paper);
    border-radius: 6px;
    border-left: 2px solid var(--rule);
}

/* ── Opportunities ── */
.opps-header { margin-bottom: 28px; }
.opps-title { font-family: 'DM Serif Display', serif; font-size: 30px; margin-bottom: 6px; }
.opps-sub { font-size: 13.5px; color: var(--ink-mid); }
.opps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 20px; }
.opp-card {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 12px;
    padding: 22px 22px;
    transition: border-color 0.14s, box-shadow 0.14s;
}
.opp-card:hover { border-color: #c8c0b8; box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.opp-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.opp-title {
    font-family: 'DM Serif Display', serif;
    font-size: 18px;
    line-height: 1.3;
}
.opp-type-badge {
    flex-shrink: 0;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 9px;
    border-radius: 10px;
    background: var(--accent-pale);
    color: var(--accent);
}
.opp-body { font-size: 14px; color: var(--ink); line-height: 1.6; margin-bottom: 14px; }
.opp-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.opp-field { flex: 1; min-width: 130px; }
.opp-field-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--ink-dim);
    margin-bottom: 3px;
}
.opp-field-val { font-size: 13px; color: var(--ink); line-height: 1.45; }
.opp-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.opp-pill { font-size: 11px; padding: 2px 10px; border-radius: 10px; border: 1px solid var(--rule); color: var(--ink-mid); }
.opp-pill-yes { background: var(--green-pale); border-color: #c3e6cb; color: var(--green); }
.opp-divider { border: none; border-top: 1px solid var(--rule); margin: 12px 0; }
.opp-why { font-size: 13px; color: var(--ink-mid); line-height: 1.55; margin-bottom: 8px; }
.opp-risk { font-size: 12.5px; color: #b33; margin-bottom: 8px; }
.opp-source { font-size: 11.5px; color: var(--ink-dim); }
.opp-source a { color: var(--ink-dim); text-decoration: underline; text-underline-offset: 2px; }
.opp-source a:hover { color: var(--ink); }
.star { color: #f59e0b; }

/* ── Empty/loading ── */
.state-msg {
    text-align: center;
    padding: 72px 20px;
    color: var(--ink-dim);
}
.state-msg .icon { font-size: 36px; margin-bottom: 14px; opacity: 0.4; }
.state-msg h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    color: var(--ink-mid);
    margin-bottom: 8px;
}
.state-msg p { font-size: 14px; max-width: 380px; margin: 0 auto; line-height: 1.6; }
.spinner {
    width: 28px; height: 28px;
    border: 2px solid var(--rule);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Subscribe bar ── */
.subscribe-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 40px;
    background: var(--accent-pale);
    border-bottom: 1px solid #ecd5c5;
    font-size: 13.5px;
    color: var(--ink-mid);
}
.subscribe-bar.hidden { display: none; }
.sub-btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.15s;
}
.sub-btn:hover { opacity: 0.88; }
.sub-dismiss {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--ink-dim);
    font-size: 14px;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
}
.sub-dismiss:hover { color: var(--ink); }

/* ── Share buttons ── */
.share-row {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}
.share-btn {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    padding: 5px 14px;
    border: 1px solid var(--rule);
    background: var(--card);
    color: var(--ink-mid);
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: border-color 0.14s;
}
.share-btn:hover { border-color: #c8c0b8; color: var(--ink); }

/* ── Archive ── */
.archive-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
    cursor: pointer;
    transition: background 0.12s;
    border-radius: 4px;
}
.archive-row:hover { background: var(--paper); }
.archive-date { font-size: 15px; color: var(--ink); font-weight: 500; }
.archive-read { font-size: 13.5px; color: var(--accent); text-decoration: none; }
.archive-read:hover { text-decoration: underline; }

/* ── Static pages (About, How It Works) ── */
.static-body {
    max-width: 700px;
    font-size: 16px;
    line-height: 1.78;
    color: var(--ink);
}
.static-body p { margin-bottom: 14px; }
.static-body .b-section-head { margin-top: 40px; }
.static-body .b-section-head:first-child { margin-top: 0; }
.em-dash-item { padding-left: 4px; margin-bottom: 8px; }
.text-link { color: var(--accent); text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ── Definition list (About details) ── */
.detail-list { margin: 16px 0 32px; }
.detail-row {
    display: flex;
    gap: 24px;
    padding: 8px 0;
    border-bottom: 1px solid var(--rule);
}
.detail-row:last-child { border-bottom: none; }
.detail-row dt {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-dim);
    min-width: 160px;
    padding-top: 2px;
}
.detail-row dd { font-size: 14px; color: var(--ink); }

/* ── Subscribe CTA block ── */
.sub-cta-block {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--rule);
}
.sub-cta-block p { font-size: 18px; font-weight: 500; margin-bottom: 16px; color: var(--ink); }

/* ── Responsive ── */
@media (max-width: 860px) {
    .header { padding: 18px 20px 0; }
    .content { padding: 28px 20px; }
    .briefing-title { font-size: 34px; }
    .dispatches-wrap { flex-direction: column; }
    .persona-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--rule); display: flex; flex-wrap: wrap; }
    .sidebar-item { border-right: none; border-bottom: none; }
    .dispatch-pane { padding: 24px 20px; }
    .opps-grid { grid-template-columns: 1fr; }
    .subscribe-bar { padding: 10px 20px; flex-wrap: wrap; gap: 10px; }
    .main-nav { overflow-x: auto; }
}
