:root {
    --bg: #fafaf9;
    --fg: #1a1a1a;
    --muted: #6b6b6b;
    --line: #e5e5e5;
    --accent: #2563eb;
    --conv-5-bg: #b91c1c;
    --conv-4-bg: #d97706;
    --conv-3-bg: #4b5563;
    --conv-2-bg: #9ca3af;
    --conv-1-bg: #d1d5db;
    --buy: #15803d;
    --sell: #b91c1c;
    --hold: #4b5563;
    --watch: #6366f1;
    --mention: #9ca3af;
    --warn: #d97706;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.5;
    font-size: 14px;
}
header {
    padding: 1.5rem 2rem 0;
    border-bottom: 1px solid var(--line);
    background: white;
}
header h1 {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--muted);
}
#meta {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
nav {
    display: flex;
    gap: 0.25rem;
}
nav button {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    font: inherit;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
}
nav button.active {
    color: var(--fg);
    border-bottom-color: var(--accent);
    font-weight: 500;
}
main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.tab { display: none; }
.tab.active { display: block; }
.placeholder { color: var(--muted); font-style: italic; padding: 2rem 0; }
.sub { color: var(--muted); font-size: 0.9rem; margin: 0 0 1.5rem; }
.footnote { color: var(--muted); font-size: 0.8rem; margin-top: 0.5rem; }

h2 {
    margin: 2rem 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--fg);
    letter-spacing: 0.01em;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
}
th, td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
th {
    background: #f5f5f4;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 var(--line);
}
tr:last-child td { border-bottom: none; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.ticker { font-weight: 600; font-family: ui-monospace, SFMono-Regular, monospace; }
td.summary { color: #333; line-height: 1.4; max-width: 480px; }
td.src { color: var(--muted); font-size: 0.85rem; font-family: ui-monospace, monospace; }
td.date { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }

.conv {
    display: inline-block;
    width: 1.4rem;
    height: 1.4rem;
    line-height: 1.4rem;
    text-align: center;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}
.conv-1 { background: var(--conv-1-bg); color: #555; }
.conv-2 { background: var(--conv-2-bg); }
.conv-3 { background: var(--conv-3-bg); }
.conv-4 { background: var(--conv-4-bg); }
.conv-5 { background: var(--conv-5-bg); }

.rec {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.rec-BUY { background: rgba(21, 128, 61, 0.1); color: var(--buy); }
.rec-SELL { background: rgba(185, 28, 28, 0.1); color: var(--sell); }
.rec-HOLD { background: rgba(75, 85, 99, 0.1); color: var(--hold); }
.rec-WATCH { background: rgba(99, 102, 241, 0.1); color: var(--watch); }
.rec-MENTION { background: rgba(156, 163, 175, 0.1); color: var(--mention); }

.conv-row-5 td { background: rgba(185, 28, 28, 0.04); }
.conv-row-4 td { background: rgba(217, 119, 6, 0.03); }

tr.insufficient { color: var(--muted); }
.warn { color: var(--warn); }

.legend {
    margin: 0 0 1rem;
    font-size: 0.85rem;
}
.legend summary {
    cursor: pointer;
    color: var(--accent);
    user-select: none;
    padding: 0.25rem 0;
}
.legend-body {
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid var(--line);
    border-radius: 4px;
}
.legend-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.35rem 0;
    line-height: 1.45;
}
.legend-row strong { margin-right: 0.25rem; }

.article-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted var(--muted);
}
.article-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.move {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 0.85rem;
}
.move.up { color: var(--buy); }
.move.down { color: var(--sell); }
.move.muted { color: var(--muted); font-weight: 400; }

.synthesis {
    background: white;
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.synthesis h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.synthesis-body {
    color: #1f2937;
    line-height: 1.55;
    font-size: 0.95rem;
}
