/* newsdesk — Bloomberg-density meets Linear polish, dark default */
:root {
  --bg-0: #0a0d12;
  --bg-1: #0f131a;
  --bg-2: #161b24;
  --bg-3: #1f2632;
  --line: #2a3140;
  --ink: #e2e6ee;
  --ink-dim: #9aa4b6;
  --ink-mute: #6b7589;
  --accent: #f6c177;        /* tan — RX/banker palette */
  --accent-2: #82c4ff;      /* cool blue accent */
  --green: #6cc28a;
  --red: #f06d6d;
  --yellow: #f6c177;
  --rx: #f6c177;
  --macro: #82c4ff;
  --finance: #b7a3e8;
  --serif: 'Iowan Old Style','Source Serif Pro','Charter','Georgia',serif;
  --mono: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --sans: -apple-system,BlinkMacSystemFont,'Segoe UI','Inter',sans-serif;
}

* { box-sizing: border-box; }
html, body { background: var(--bg-0); color: var(--ink); margin: 0; font-family: var(--sans); font-size: 13px; line-height: 1.45; }
.mono { font-family: var(--mono); font-size: 11px; color: var(--ink-mute); }

/* ── topbar ─────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 8px 16px; border-bottom: 1px solid var(--line);
  background: var(--bg-1); position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand .logo { font-size: 20px; line-height: 1; }
.brand h1 { margin: 0; font-family: var(--serif); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.brand .sub { color: var(--ink-mute); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.topbar-stats { display: flex; gap: 12px; margin-left: auto; }
.topbar-stats .stat {
  font-family: var(--mono); font-size: 11px; color: var(--ink-dim);
  padding: 4px 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px;
}
.topbar-actions { display: flex; gap: 6px; }

/* ── controls ──────────────────────────────────── */
.btn {
  background: var(--bg-2); color: var(--ink); border: 1px solid var(--line);
  padding: 5px 11px; border-radius: 4px; cursor: pointer; font-family: var(--sans); font-size: 12px;
}
.btn:hover { background: var(--bg-3); border-color: var(--accent); }
.btn.primary { background: var(--accent); color: #1a1208; border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { background: #ffd595; }

.filterbar {
  display: flex; align-items: center; gap: 16px;
  padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--bg-1);
}
.chips { display: flex; gap: 4px; align-items: center; }
.chip {
  background: var(--bg-2); color: var(--ink-dim); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 999px; cursor: pointer; font-size: 11px;
}
.chip:hover { background: var(--bg-3); color: var(--ink); }
.chip.active {
  background: var(--accent); color: #1a1208; border-color: var(--accent); font-weight: 600;
}
/* Category drill-down chips are secondary to the primary reads (Brief/Letter). */
.chip.cat { background: transparent; font-size: 10.5px; opacity: 0.78; }
.chip.cat.active { background: var(--accent); opacity: 1; }
.chip-sep { width: 1px; align-self: stretch; background: var(--line); margin: 2px 6px; }
.window-controls { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.window-controls label { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-mute); }
.window-controls label.check { gap: 4px; }
.window-controls select, .window-controls input[type="number"] {
  background: var(--bg-2); color: var(--ink); border: 1px solid var(--line);
  padding: 3px 6px; font-size: 11px; font-family: var(--mono); border-radius: 4px;
}
.window-controls input[type="number"] { width: 70px; }
.window-controls .meta { padding-left: 12px; border-left: 1px solid var(--line); }
/* Feed category chips (Markets + Tech folded into Feed, 2026-06-18) */
.fcat-row { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.chip.fcat { font-size: 11px; padding: 3px 9px; }

/* ── layout ───────────────────────────────────── */
.layout {
  display: grid; grid-template-columns: 240px 1fr;
  gap: 0; min-height: calc(100vh - 96px);
}
.sources {
  border-right: 1px solid var(--line); background: var(--bg-1);
  padding: 12px 14px; font-size: 11px;
}
.sources h3 {
  margin: 0 0 8px; font-size: 11px; color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600;
}
.sources h3.collapser { cursor: pointer; user-select: none; }
.sources h3.collapser:hover { color: var(--ink); }
.sources h3 .caret { display: inline-block; transition: transform 0.12s; font-size: 9px; }
.sources.src-collapsed h3 .caret { transform: rotate(-90deg); }
.sources.src-collapsed .sources-list { display: none; }
.sources-list .src-row {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 3px 0; border-bottom: 1px dashed var(--bg-3); font-size: 11px;
}
.src-row.err { color: var(--red); }
.src-row.ok { color: var(--ink-dim); }
.src-row .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.src-row .ct { font-family: var(--mono); color: var(--ink-mute); }
.cost-table .cost-row { display: flex; justify-content: space-between; padding: 2px 0; font-family: var(--mono); }

/* ── feed ─────────────────────────────────────── */
.feed { padding: 14px 18px; }
.feed .empty { color: var(--ink-mute); padding: 24px; text-align: center; }
.article {
  border-bottom: 1px solid var(--line); padding: 11px 4px 12px;
  display: grid; grid-template-columns: 50px 1fr 80px; gap: 10px;
}
.article:hover { background: var(--bg-1); }
.article .score-badge {
  font-family: var(--mono); font-size: 14px; font-weight: 700;
  color: var(--ink-dim); text-align: center;
  padding-top: 2px;
}
.article .score-badge.hi { color: var(--accent); }
.article .score-badge.med { color: var(--accent-2); }
.article .body { min-width: 0; }
.article .title-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.article .cat-pill {
  display: inline-block; font-size: 9px; padding: 2px 6px; border-radius: 3px;
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-dim);
}
.article.cat-rx .cat-pill { background: rgba(246, 193, 119, 0.12); border-color: var(--rx); color: var(--rx); }
.article.cat-macro .cat-pill { background: rgba(130, 196, 255, 0.10); border-color: var(--macro); color: var(--macro); }
.article.cat-finance .cat-pill { background: rgba(183, 163, 232, 0.10); border-color: var(--finance); color: var(--finance); }
.article a.headline {
  color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 15px;
  line-height: 1.3; font-weight: 500;
}
.article a.headline:hover { color: var(--accent); }
.article .summary { color: var(--ink-dim); margin-top: 4px; font-size: 12.5px; }
.article .summary.deep { color: var(--ink); border-left: 2px solid var(--accent); padding-left: 8px; }
.article .summary.deep .lbl { color: var(--accent); font-weight: 600; font-family: var(--mono); font-size: 10px; }
.article .meta-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  font-family: var(--mono); font-size: 10px; color: var(--ink-mute); margin-top: 4px;
}
.article .meta-row .source { color: var(--ink-dim); }
.article .tags { display: flex; gap: 4px; flex-wrap: wrap; }
.article .tag {
  font-family: var(--mono); font-size: 10px; padding: 1px 6px; border-radius: 3px;
  background: var(--bg-3); color: var(--ink-dim);
}
.article .tag.hit { background: rgba(246, 193, 119, 0.18); color: var(--accent); border: 1px solid rgba(246, 193, 119, 0.4); }
.article .right { text-align: right; font-family: var(--mono); font-size: 10px; color: var(--ink-mute); }
.article .right .age { font-size: 11px; color: var(--ink-dim); }
.article .right .model { display: block; margin-top: 4px; }
.article.read { opacity: 0.5; }
.article.read .headline { color: var(--ink-mute); }
.article.focus { background: var(--bg-1); border-left: 3px solid var(--accent); padding-left: 12px; }
.article .star-btn {
  display: inline-block; margin-left: 6px; cursor: pointer;
  background: transparent; border: none; color: var(--ink-mute); font-size: 14px;
}
.article .star-btn.starred { color: var(--accent); }
.article .star-btn:hover { color: var(--accent); }
.article .add-watch {
  font-size: 9px; padding: 0 4px; margin-left: 4px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); color: var(--ink-mute);
  border-radius: 3px;
}
.article .add-watch:hover { color: var(--accent); border-color: var(--accent); }
.article .cluster-pill {
  display: inline-block; font-size: 10px; padding: 2px 7px; border-radius: 999px;
  background: rgba(130, 196, 255, 0.10); color: var(--accent-2);
  border: 1px solid rgba(130, 196, 255, 0.4); cursor: pointer;
  margin-left: 6px; font-family: var(--mono);
}
.article .cluster-pill:hover { background: rgba(130, 196, 255, 0.20); }
.article .alsoin-pill {
  display: inline-block; font-size: 10px; padding: 2px 7px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); color: var(--ink-mute);
  border: 1px dashed var(--line); margin-left: 6px; font-family: var(--mono);
}
/* Top of Book — narrative paragraph above the brief sections */
.top-of-book {
  margin-bottom: 28px;
  padding: 18px 22px;
  background: linear-gradient(180deg, rgba(246, 193, 119, 0.05), rgba(130, 196, 255, 0.03));
  border-left: 3px solid var(--rx);
  border-radius: 4px;
}
.top-of-book .tob-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-mute);
}
.top-of-book .tob-label { color: var(--rx); font-weight: 600; }
.top-of-book .tob-age { color: var(--ink-mute); }
.top-of-book p {
  margin: 0; font-family: var(--serif); font-size: 15px; line-height: 1.55;
  color: var(--ink); letter-spacing: -0.005em;
}
.top-of-book.pending p { color: var(--ink-mute); font-style: italic; }
.top-of-book .muted { color: var(--ink-mute); }
.top-of-book .tob-refresh {
  margin-left: auto; background: transparent; color: var(--ink-mute);
  border: 1px solid var(--line); border-radius: 3px; font-size: 10px;
  font-family: var(--mono); padding: 2px 8px; cursor: pointer;
  letter-spacing: 0.04em; text-transform: none;
}
.top-of-book .tob-refresh:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.top-of-book .tob-refresh:disabled { opacity: 0.5; cursor: wait; }
.top-of-book .tob-lede {
  font-family: var(--serif); font-size: 16px; line-height: 1.55; color: var(--ink);
  margin: 0 0 18px; padding-bottom: 16px; border-bottom: 1px dashed var(--line);
  letter-spacing: -0.005em;
}
.tob-section {
  margin-bottom: 14px;
}
.tob-section h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--rx); margin: 0 0 6px; font-weight: 600;
}
.tob-section p {
  margin: 0; font-family: var(--serif); font-size: 14px; line-height: 1.55;
  color: var(--ink-dim);
}
.tob-section p b { color: var(--ink); }
.tob-section p a { color: var(--accent-2); text-decoration: none; border-bottom: 1px dotted var(--accent-2); }
.tob-section p a:hover { color: var(--accent); border-color: var(--accent); }
.tob-stories {
  margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line);
}
.tob-stories h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 8px; font-weight: 600;
}
.tob-stories ul { margin: 0; padding-left: 0; list-style: none; }
.tob-stories li {
  font-family: var(--serif); font-size: 13px; line-height: 1.55;
  color: var(--ink-dim); margin-bottom: 9px; padding-left: 14px; position: relative;
}
.tob-stories li::before { content: '·'; position: absolute; left: 0; color: var(--ink-mute); }
.tob-bullet-srcs { font-family: var(--mono); font-size: 10px; color: var(--ink); font-weight: 600; }
.tob-bullet-srcs .tob-src { color: var(--accent-2); }
.tob-bullet-blurb { color: var(--ink-mute); }
.tob-stories .story-section {
  display: inline-block; font-family: var(--mono); font-size: 9px; padding: 1px 6px;
  border-radius: 999px; background: rgba(255,255,255,0.04); color: var(--ink-mute);
  border: 1px solid var(--line); margin-right: 4px; text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tob-stories .theme-pill {
  display: inline-block; font-family: var(--mono); font-size: 9px; padding: 1px 6px;
  border-radius: 999px; background: rgba(246, 193, 119, 0.10); color: var(--rx);
  border: 1px solid rgba(246, 193, 119, 0.3); margin-left: 4px;
}
.tob-url {
  font-family: var(--mono); font-size: 10px; color: var(--ink-mute);
  text-decoration: none; margin-left: 4px;
}
.tob-url:hover { color: var(--accent); }
.tob-stories-link {
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line);
  font-family: var(--mono); font-size: 11px;
}
.tob-stories-link a {
  color: var(--accent-2); text-decoration: none; padding: 4px 10px;
  border: 1px solid rgba(130, 196, 255, 0.3); border-radius: 3px;
  display: inline-block; transition: all 0.1s;
}
.tob-stories-link a:hover { color: var(--accent); border-color: var(--accent); background: rgba(255,255,255,0.03); }

/* ─── Top Stories tab ─────────────────────────────────────────── */
.topstories-page { padding: 4px; }
.ts-meta {
  font-family: var(--mono); font-size: 11px; color: var(--ink-mute);
  letter-spacing: 0.04em; padding-bottom: 14px; border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.ts-lede {
  font-family: var(--serif); font-size: 16px; line-height: 1.55;
  color: var(--ink); margin: 0 0 24px; padding: 14px 18px;
  border-left: 3px solid var(--rx); background: rgba(246, 193, 119, 0.05);
}
.ts-group { margin-bottom: 28px; }
.ts-group-head {
  font-family: var(--serif); font-size: 14px; font-weight: 600;
  margin: 0 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
  color: var(--ink); text-transform: capitalize;
}
.ts-group-head .ts-count {
  font-family: var(--mono); font-size: 10px; color: var(--ink-mute);
  margin-left: 8px; background: var(--bg-2); padding: 2px 8px; border-radius: 999px;
}
.ts-bullet {
  margin-bottom: 14px; padding: 12px 16px; background: var(--bg-1);
  border: 1px solid var(--line); border-radius: 4px;
}
.ts-srcline {
  font-family: var(--mono); font-size: 10px; margin-bottom: 6px;
  color: var(--ink-mute); letter-spacing: 0.04em;
}
.ts-srcline .ts-src { color: var(--accent-2); font-weight: 600; }
.ts-headline {
  font-family: var(--serif); font-size: 14px; line-height: 1.4;
  color: var(--ink); margin-bottom: 6px; font-weight: 500;
}
.ts-blurb {
  font-family: var(--serif); font-size: 13px; line-height: 1.55;
  color: var(--ink-dim); margin-bottom: 8px;
}
.ts-urls { font-family: var(--mono); font-size: 10px; }
.ts-urls .ts-url {
  color: var(--ink-mute); text-decoration: none; margin-right: 10px;
  border-bottom: 1px dotted var(--line);
}
.ts-urls .ts-url:hover { color: var(--accent); border-color: var(--accent); }

/* ─── Macro Themes tab ────────────────────────────────────────── */
.themes-page { padding: 4px; }
.themes-meta {
  font-family: var(--mono); font-size: 11px; color: var(--ink-mute);
  letter-spacing: 0.04em; padding-bottom: 14px; border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.theme-card {
  margin-bottom: 18px; padding: 14px 18px; background: var(--bg-1);
  border: 1px solid var(--line); border-radius: 4px; border-left-width: 3px;
}
.theme-card.dir-bull   { border-left-color: var(--rx); }
.theme-card.dir-bear   { border-left-color: #e74c3c; }
.theme-card.dir-rot    { border-left-color: var(--accent-2); }
.theme-card.dir-hedge  { border-left-color: var(--finance); }
.theme-card.dir-neutral{ border-left-color: var(--ink-mute); }
.theme-head {
  display: flex; align-items: baseline; gap: 14px;
  flex-wrap: wrap; margin-bottom: 8px;
}
.theme-name {
  font-family: var(--serif); font-size: 16px; font-weight: 600;
  color: var(--ink); letter-spacing: -0.005em;
}
.theme-conf, .theme-agree, .theme-dir {
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: var(--bg-2); color: var(--ink-dim); border: 1px solid var(--line);
}
.theme-conf { background: rgba(246, 193, 119, 0.10); color: var(--rx); border-color: rgba(246, 193, 119, 0.3); }
.theme-narr {
  font-family: var(--serif); font-size: 14px; line-height: 1.55;
  color: var(--ink-dim); margin-bottom: 12px;
}
.theme-evidence h5, .theme-plays h5 {
  font-family: var(--mono); font-size: 10px; color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: 0.06em; margin: 12px 0 4px;
}
.theme-plays h5 .hint { text-transform: none; }
.theme-evidence ul {
  margin: 0; padding-left: 20px; font-family: var(--mono); font-size: 11px;
  color: var(--ink-dim); line-height: 1.6;
}
.theme-plays table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
.theme-plays th {
  text-align: left; font-family: var(--mono); font-size: 10px;
  color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.04em;
  padding: 4px 8px; border-bottom: 1px solid var(--line);
}
.theme-plays td {
  padding: 6px 8px; border-bottom: 1px dashed var(--bg-3);
  color: var(--ink-dim);
}
.theme-plays td.ticker { color: var(--accent-2); font-weight: 600; }
.theme-plays td.rationale { font-size: 11px; color: var(--ink-mute); }

/* ─── Liability Management tab ────────────────────────────────── */
.lme-page { padding: 4px; }
.lme-stats {
  display: flex; flex-wrap: wrap; gap: 14px; padding: 12px 18px;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 4px;
  margin-bottom: 18px; font-family: var(--mono); font-size: 11px;
}
.lme-stat { color: var(--ink-dim); }
.lme-stat.novel { color: var(--rx); font-weight: 600; }
.lme-bytype {
  color: var(--ink-mute); padding: 1px 8px; background: var(--bg-2);
  border-radius: 999px; font-size: 10px;
}
.lme-section { margin-bottom: 28px; }
.lme-section-head {
  font-family: var(--serif); font-size: 14px; font-weight: 600;
  margin: 0 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
  color: var(--ink); text-transform: uppercase; letter-spacing: 0.04em;
}
.lme-card {
  margin-bottom: 12px; padding: 14px 18px; background: var(--bg-1);
  border: 1px solid var(--line); border-radius: 4px; border-left-width: 3px;
  border-left-color: var(--ink-mute);
}
.lme-card.nov-high { border-left-color: var(--rx); background: rgba(246, 193, 119, 0.04); }
.lme-card.nov-mid  { border-left-color: var(--accent-2); }
.lme-card-head {
  display: flex; align-items: baseline; gap: 12px;
  flex-wrap: wrap; margin-bottom: 8px;
}
.lme-type {
  font-family: var(--mono); font-size: 10px; padding: 2px 8px;
  border-radius: 999px; background: rgba(130, 196, 255, 0.10);
  color: var(--accent-2); border: 1px solid rgba(130, 196, 255, 0.3);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.lme-novelty {
  font-family: var(--mono); font-size: 11px; padding: 2px 8px;
  border-radius: 4px; background: var(--bg-2); color: var(--ink-dim);
  border: 1px solid var(--line); font-weight: 600;
}
.lme-card.nov-high .lme-novelty { color: var(--rx); border-color: rgba(246, 193, 119, 0.4); background: rgba(246, 193, 119, 0.10); }
.lme-headline {
  font-family: var(--serif); font-size: 14px; color: var(--ink);
  text-decoration: none; flex: 1; min-width: 200px; line-height: 1.4;
}
.lme-headline:hover { color: var(--accent-2); }
.lme-source { color: var(--ink-mute); font-size: 10px; margin-left: auto; }
.lme-summary {
  font-family: var(--serif); font-size: 13px; line-height: 1.55;
  color: var(--ink-dim); margin-bottom: 8px;
}
.lme-precedent, .lme-tradeable {
  font-family: var(--serif); font-size: 12px; line-height: 1.5;
  color: var(--ink-mute); margin-bottom: 4px;
}
.lme-precedent b, .lme-tradeable b {
  color: var(--ink-dim); font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.cluster-members {
  grid-column: 2 / -1; margin-top: 8px;
  padding: 6px 12px; background: var(--bg-1);
  border-left: 2px solid var(--accent-2);
  font-size: 11px;
}
.cluster-members .cm-row {
  display: flex; gap: 10px; padding: 3px 0;
  border-bottom: 1px dashed var(--bg-3);
}
.cluster-members .cm-row:last-child { border-bottom: none; }
.cluster-members .cm-source { color: var(--ink-mute); font-family: var(--mono); min-width: 140px; font-size: 10px; }
.cluster-members a { color: var(--ink-dim); text-decoration: none; }
.cluster-members a:hover { color: var(--accent-2); }
kbd { font-family: var(--mono); background: var(--bg-3); border: 1px solid var(--line); padding: 0 4px; border-radius: 3px; font-size: 10px; }
.mini { background: var(--bg-3); border: 1px solid var(--line); color: var(--ink-dim); padding: 1px 6px; font-size: 12px; cursor: pointer; border-radius: 3px; line-height:1; }
.mini:hover { color: var(--accent); border-color: var(--accent); }
.brief-section {
  margin-bottom: 24px;
}
.brief-section .head {
  display: flex; align-items: baseline; gap: 12px;
  padding: 4px 4px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px;
}
.brief-section .head h2 {
  font-family: var(--serif); font-size: 14px; font-weight: 600; margin: 0;
  letter-spacing: -0.01em;
}
.brief-section .head .count { font-family: var(--mono); font-size: 11px; color: var(--ink-mute); }
.brief-section.empty .head h2 { color: var(--ink-mute); }
.brief-section .empty-msg { padding: 8px 4px; color: var(--ink-mute); font-size: 11px; font-style: italic; }
/* All-In episode card */
.allin-ep {
  border: 1px solid var(--line); padding: 14px; margin-bottom: 14px;
  background: var(--bg-1); border-radius: 6px;
}
.allin-ep h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 14px; }
.allin-ep .meta { font-family: var(--mono); font-size: 10px; color: var(--ink-mute); margin-bottom: 10px; }
.allin-ep .summary { color: var(--ink-dim); font-size: 12.5px; margin-bottom: 10px; }
.allin-ep .stories { display: flex; flex-direction: column; gap: 6px; }
.allin-ep .story { padding: 6px 8px; background: var(--bg-2); border-left: 2px solid var(--macro); border-radius: 0 4px 4px 0; font-size: 12px; }
.allin-ep .story .ts { font-family: var(--mono); color: var(--accent-2); margin-right: 8px; }
.allin-ep .story .title { font-weight: 600; color: var(--ink); }
.allin-ep .story .companies { display: inline-flex; gap: 4px; margin-left: 8px; }
.allin-ep .story .ticker { background: var(--bg-3); padding: 1px 5px; border-radius: 3px; font-family: var(--mono); font-size: 10px; color: var(--accent); }
.allin-ep .story .take { color: var(--ink-dim); font-size: 11.5px; margin-top: 2px; line-height: 1.4; }
.watch-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2px 0; font-family: var(--mono); font-size: 11px;
}
.watch-row .x { cursor: pointer; color: var(--ink-mute); padding: 0 4px; }
.watch-row .x:hover { color: var(--red); }
.article .right .overview-btn {
  display: block; margin-top: 6px; padding: 3px 7px; font-size: 11px;
  background: var(--bg-2); color: var(--accent-2); border: 1px solid var(--line);
  border-radius: 4px; cursor: pointer; font-family: var(--mono);
  width: 100%;
}
.article .right .overview-btn:hover { border-color: var(--accent-2); background: var(--bg-3); }
.article .right .overview-btn:disabled { opacity: 0.4; cursor: wait; }
.article .right .overview-btn.cached { color: var(--green); }
.article .overview-panel {
  grid-column: 2 / -1; margin-top: 10px; padding: 10px 12px;
  background: var(--bg-1); border-left: 2px solid var(--accent-2);
  font-size: 12.5px; color: var(--ink-dim); border-radius: 0 4px 4px 0;
}
.article .overview-panel .lbl {
  display: block; font-family: var(--mono); font-size: 10px;
  color: var(--accent-2); letter-spacing: 0.06em; margin-bottom: 4px;
}
.article .overview-panel .text { color: var(--ink); margin-bottom: 8px; line-height: 1.55; }
.article .overview-panel .citations { display: flex; flex-wrap: wrap; gap: 6px; }
.article .overview-panel .cite {
  font-family: var(--mono); font-size: 10px; padding: 2px 6px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 3px;
  color: var(--ink-dim); text-decoration: none;
}
.article .overview-panel .cite:hover { color: var(--accent-2); border-color: var(--accent-2); }
.article .overview-panel .meta-pplx { font-family: var(--mono); font-size: 10px; color: var(--ink-mute); margin-top: 8px; }

/* ── toast ─────────────────────────────────────── */
.toast {
  position: fixed; bottom: 18px; right: 18px; padding: 10px 16px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px;
  color: var(--ink); font-size: 12px; opacity: 0; transition: opacity 0.18s;
  pointer-events: none; max-width: 320px;
}
.toast.show { opacity: 1; }
.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); }

/* ── RX IDEAS view (2026-05-17 v2) ───────────────── */
.rxi-cards { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.rxi-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 5px;
  padding: 8px 12px; min-width: 110px;
}
.rxi-card-k { color: var(--ink-mute); font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.rxi-card-v { color: var(--ink); font-size: 16px; font-weight: 600; font-family: var(--mono); margin-top: 2px; }

.rxi-card-row {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 14px; margin-bottom: 8px; transition: border-color 0.12s;
}
.rxi-card-row:hover { border-color: var(--accent-2); }
.rxi-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  font-size: 12px; margin-bottom: 6px;
}
.rxi-stars { font-family: var(--mono); letter-spacing: 1px; }
.rxi-c5, .rxi-c4 { color: #7fd49a; }
.rxi-c3 { color: #ffd06d; }
.rxi-c2, .rxi-c1 { color: var(--ink-dim); }
.rxi-skip-pill {
  background: #2c1a1a; color: var(--ink-mute); padding: 2px 8px;
  border-radius: 3px; font-size: 10px; text-transform: uppercase;
}
.rxi-type {
  font-family: var(--mono); font-size: 11px; color: var(--accent-2);
  background: var(--bg); padding: 2px 8px; border-radius: 3px;
}
.rxi-issuer { color: var(--ink); font-weight: 600; }
.rxi-tickers { display: inline-flex; gap: 4px; }
.rxi-tick {
  font-family: var(--mono); font-size: 10px;
  background: var(--bg); padding: 1px 6px; border-radius: 3px; color: var(--accent);
}
.rxi-horizon, .rxi-age { color: var(--ink-mute); font-size: 10px; margin-left: auto; }
.rxi-cap { color: var(--ink-dim); font-size: 11px; font-style: italic; margin: 4px 0; line-height: 1.4; }
.rxi-reasoning { color: var(--ink); font-size: 12px; line-height: 1.5; margin: 4px 0; }
.rxi-cusips { color: var(--ink-dim); font-size: 11px; margin: 4px 0; }
.rxi-cusips code {
  font-family: var(--mono); background: var(--bg);
  padding: 1px 5px; border-radius: 2px; color: var(--accent-2);
}
.rxi-foot { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 11px; }
.rxi-src { color: var(--ink-mute); text-decoration: none; flex-shrink: 0; }
.rxi-src:hover { color: var(--accent-2); }
.rxi-headline-trunc { color: var(--ink-dim); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rxi-rate { margin-left: auto; display: inline-flex; gap: 4px; }
.rxi-rate-btn {
  background: transparent; border: 1px solid var(--line); color: var(--ink-mute);
  padding: 2px 8px; border-radius: 3px; cursor: pointer; font-size: 13px;
}
.rxi-rate-btn:hover { color: var(--ink); border-color: var(--accent-2); }
.rxi-rate.up .rxi-rate-btn[data-rate="1"] { color: #7fd49a; border-color: #7fd49a; }
.rxi-rate.down .rxi-rate-btn[data-rate="-1"] { color: #ff8090; border-color: #ff8090; }

/* ── RX THEMES banner (stage 4) ───────────────── */
.rxt-banner {
  background: linear-gradient(135deg, var(--bg-2) 0%, #181b20 100%);
  border: 1px solid var(--accent-2);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 14px;
}
.rxt-banner.empty {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink-mute); font-size: 12px;
}
.rxt-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.rxt-title { font-size: 12px; letter-spacing: 1.5px; color: var(--accent-2); text-transform: uppercase; font-weight: 700; }
.rxt-empty { flex: 1; font-style: italic; }
.rxt-card {
  background: var(--bg);
  border-left: 3px solid var(--accent-2);
  padding: 8px 12px;
  margin: 6px 0;
  border-radius: 0 4px 4px 0;
}
.rxt-head-row { display: flex; gap: 10px; align-items: baseline; }
.rxt-stars { font-family: var(--mono); letter-spacing: 1px; flex-shrink: 0; }
.rxt-theme { color: var(--ink); font-weight: 600; font-size: 13px; line-height: 1.35; }
.rxt-narrative { color: var(--ink-dim); font-size: 11px; line-height: 1.55; margin-top: 4px; }
.rxt-issuers { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.rxt-issuer {
  font-family: var(--mono); font-size: 10px;
  background: var(--bg-2); padding: 1px 6px; border-radius: 3px;
  color: var(--ink-dim);
}
.mini { font-size: 10px !important; padding: 2px 8px !important; }

/* ── RX EXPANSIONS (stage 5) ───────────────── */
.rxi-actions { display: inline-flex; gap: 8px; align-items: center; margin-left: auto; }
.rxi-expand-btn {
  background: transparent; border: 1px solid var(--accent-2); color: var(--accent-2);
  padding: 3px 10px; border-radius: 3px; cursor: pointer; font-size: 11px;
  font-family: inherit;
}
.rxi-expand-btn:hover { background: var(--accent-2); color: var(--bg); }
.rxi-expansion { margin-top: 10px; }
.rxe-loading {
  background: var(--bg); padding: 12px; border-radius: 5px; border: 1px dashed var(--line);
  font-style: italic; color: var(--ink-mute); font-size: 11px; text-align: center;
}
.rxe-error {
  background: #2c1a1a; color: #ff8090; padding: 10px 14px; border-radius: 5px;
  font-size: 11px; border: 1px solid #5a2828;
}
.rxe-box {
  background: var(--bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 5px 5px 0;
  padding: 12px 16px;
  font-size: 12px; line-height: 1.55;
}
.rxe-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  border-bottom: 1px solid var(--line); padding-bottom: 8px;
}
.rxe-title { color: var(--accent); font-weight: 700; font-size: 12px; letter-spacing: 1px; }
.rxe-meta { color: var(--ink-mute); font-size: 10px; margin-left: 4px; }
.rxe-rate { margin-left: auto; display: inline-flex; gap: 4px; }
.rxe-rate-btn {
  background: transparent; border: 1px solid var(--line); color: var(--ink-mute);
  padding: 1px 7px; border-radius: 3px; cursor: pointer; font-size: 12px;
}
.rxe-rate-btn:hover { color: var(--ink); border-color: var(--accent-2); }
.rxe-rate.up .rxe-rate-btn[data-rate="1"] { color: #7fd49a; border-color: #7fd49a; }
.rxe-rate.down .rxe-rate-btn[data-rate="-1"] { color: #ff8090; border-color: #ff8090; }
.rxe-close {
  background: transparent; border: 1px solid var(--line); color: var(--ink-mute);
  padding: 0 8px; border-radius: 3px; cursor: pointer; font-size: 14px; line-height: 18px;
}
.rxe-close:hover { color: var(--ink); }
.rxe-sec { margin: 10px 0; }
.rxe-sec-h {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--accent-2); margin-bottom: 4px; font-weight: 600;
}
.rxe-sec-b { color: var(--ink); }
.rxe-list { list-style: none; padding: 0; margin: 0; }
.rxe-list li {
  padding: 4px 0 4px 16px; position: relative;
  color: var(--ink-dim); font-size: 11px; line-height: 1.5;
}
.rxe-list li::before {
  content: "▸"; position: absolute; left: 2px; color: var(--accent-2);
}
.rxe-list li b { color: var(--ink); font-weight: 600; }

/* Article summary button (stage 5+) — sits next to 🔮 overview */
.summary-btn {
  background: var(--bg-2); border: 1px solid var(--accent); color: var(--accent);
  padding: 3px 8px; border-radius: 3px; cursor: pointer; font-size: 10px;
  font-family: inherit; margin-top: 4px;
}
.summary-btn:hover { background: var(--accent); color: var(--bg); }
.summary-panel { grid-column: 1 / -1; margin-top: 8px; }
.article-summary { font-size: 11.5px; }

/* ── Direction C: RX TOP OF BOOK hero (2026-05-17) ─────────────────────── */
.rxtob-hero {
  background: linear-gradient(135deg, #18120a 0%, #15181f 45%, #0f131a 100%);
  border: 1px solid #5a3e1a;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 11px 18px 13px;
  margin-bottom: 14px;
  box-shadow: 0 1px 0 rgba(246,193,119,0.08) inset, 0 4px 18px rgba(0,0,0,0.4);
}
.rxtob-hero.collapsed { padding-bottom: 11px; }
.rxtob-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
  border-bottom: 1px solid #2c2412; padding-bottom: 8px;
}
.rxtob-hero.collapsed .rxtob-head { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
.rxtob-collapse {
  background: transparent; border: 1px solid var(--line); color: var(--ink-mute);
  border-radius: 4px; cursor: pointer; font-size: 10px; padding: 2px 8px;
}
.rxtob-collapse:hover { color: var(--ink); border-color: var(--accent); }
.rxtob-title {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 2.5px; color: var(--accent);
  font-weight: 700; text-transform: uppercase;
}
.rxtob-batch { color: var(--ink-mute); font-size: 10px; }
.rxtob-head .btn { margin-left: auto; }
.rxtob-theme {
  background: rgba(246,193,119,0.04); padding: 8px 12px;
  border-radius: 4px; border-left: 2px solid var(--accent);
  margin-bottom: 8px;
}
.rxtob-theme-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.rxtob-theme-stars { font-family: var(--mono); color: var(--accent); letter-spacing: 1.5px; font-size: 12px; }
.rxtob-theme-title { color: var(--ink); font-weight: 600; font-size: 13px; line-height: 1.3; }
/* Clamp narrative to 2 lines so the hero doesn't push ranked sections below the fold; full text on theme expand. */
.rxtob-theme-narr {
  color: var(--ink-dim); font-size: 11.5px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.rxtob-ideas-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.rxtob-idea {
  background: var(--bg-2); border-radius: 5px;
  padding: 8px 12px; cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  border: 1px solid var(--line);
}
.rxtob-idea:hover { background: var(--bg-3); border-color: var(--accent-2); }
.rxtob-idea-head {
  display: flex; align-items: center; gap: 6px; margin-bottom: 4px; flex-wrap: wrap;
}
.rxtob-idea-stars { color: var(--accent); font-family: var(--mono); letter-spacing: 1px; font-size: 11px; }
.rxtob-idea-type {
  background: var(--bg); color: var(--accent-2);
  padding: 1px 6px; border-radius: 3px;
  font-family: var(--mono); font-size: 10px;
}
.rxtob-idea-issuer { color: var(--ink); font-weight: 600; font-size: 11.5px; }
.rxtob-tick {
  font-family: var(--mono); font-size: 9px;
  background: var(--bg); color: var(--ink-dim);
  padding: 1px 4px; border-radius: 2px;
}
.rxtob-idea-reason { color: var(--ink-dim); font-size: 11px; line-height: 1.5; }
.rxtob-empty { color: var(--ink-mute); font-style: italic; font-size: 11px; }

/* Gold conviction stars (Direction C) — apply throughout */
.rxi-c3 { color: var(--accent); }
.rxi-c4 { color: var(--accent); text-shadow: 0 0 6px rgba(246,193,119,0.3); }
.rxi-c5 { color: var(--accent); text-shadow: 0 0 8px rgba(246,193,119,0.5); }

/* Category-tinted left border on article cards */
.article.cat-rx { border-left: 2px solid var(--rx); }
.article.cat-macro { border-left: 2px solid var(--macro); }
.article.cat-finance { border-left: 2px solid var(--finance); }
.article.cat-tech { border-left: 2px solid var(--green); }
.article.cat-politics { border-left: 2px solid var(--ink-mute); opacity: 0.85; }

/* ── Theme expand button + per-theme expansion (2026-05-17) ─────── */
.rxtob-theme { position: relative; }
.rxtob-theme-expand {
  background: transparent; border: 1px solid var(--accent); color: var(--accent);
  padding: 2px 8px; border-radius: 3px; cursor: pointer; font-size: 10px;
  font-family: inherit; margin-left: auto; flex-shrink: 0;
}
.rxtob-theme-expand:hover { background: var(--accent); color: var(--bg-0); }
.rxtob-theme-head { gap: 10px; }
.rxtob-theme-expansion { margin-top: 12px; }
.rxe-theme-expansion-box { font-size: 12.5px; line-height: 1.6; }
.rxe-when {
  font-family: var(--mono); font-size: 10px;
  background: var(--bg-2); padding: 1px 6px; border-radius: 3px;
  color: var(--accent-2); margin-right: 6px;
}
.rxe-names li { margin-bottom: 8px; }
.rxe-status {
  font-family: var(--mono); font-size: 9px; padding: 1px 5px;
  border-radius: 2px; margin-left: 6px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.rxe-st-active { background: #2a4a2a; color: var(--green); }
.rxe-st-fresh { background: #4a3a18; color: var(--accent); }
.rxe-st-prior { background: var(--bg-2); color: var(--ink-mute); }
.rxe-st-speculation { background: #3a1a3a; color: #d090f0; }

/* ── Letter (Matt Levine-style daily newsletter) ─── */
.letter {
  max-width: 760px;
  margin: 12px auto 60px;
  padding: 0 20px;
  line-height: 1.6;
  color: var(--ink-0);
}
.letter-lede {
  border-bottom: 1px solid var(--bg-2);
  padding-bottom: 24px;
  margin-bottom: 24px;
}
.letter-lede-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.letter-lede-body {
  font-size: 15px;
  line-height: 1.7;
}
.letter-lede-body p { margin: 0 0 14px; }
.letter-section {
  margin-bottom: 28px;
}
.letter-section h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  font-weight: 600;
  margin: 0 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--bg-2);
}
.letter-macro-intro {
  font-size: 14px;
  color: var(--ink-1);
  font-style: italic;
  margin: 0 0 16px;
}
.letter-macro-grid {
  display: grid;
  gap: 18px;
}
.letter-macro-item {
  padding: 12px 14px;
  background: var(--bg-1);
  border-left: 2px solid var(--accent);
  border-radius: 0 4px 4px 0;
}
.letter-macro-theme {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.letter-macro-take {
  font-size: 14px;
  line-height: 1.6;
}
.letter-m2w-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.letter-m2w-item {
  padding: 10px 12px;
  background: var(--bg-1);
  border-radius: 4px;
  font-size: 13px;
}
.letter-m2w-instr {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--accent-2);
}
.letter-m2w-thesis {
  color: var(--ink-1);
  font-size: 12px;
  line-height: 1.5;
}
.letter-quickhits {
  list-style: none;
  padding: 0;
  margin: 0;
}
.letter-quickhits li {
  padding: 6px 0 6px 16px;
  border-bottom: 1px dotted var(--bg-2);
  font-size: 13px;
  position: relative;
}
.letter-quickhits li:before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.letter-quickhits a {
  color: var(--ink-0);
  text-decoration: none;
}
.letter-quickhits a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Letter — four-beat macro reads + watch-for list */
.letter-lede-watch {
  margin-top: 20px;
  padding: 12px 14px;
  background: var(--bg-1);
  border-left: 2px solid var(--accent-2);
  border-radius: 0 4px 4px 0;
}
.letter-lede-watch-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-2);
  margin-bottom: 6px;
}
.letter-lede-watch-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}
.letter-lede-watch-list li {
  padding: 3px 0 3px 14px;
  position: relative;
}
.letter-lede-watch-list li:before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--accent-2);
}
.letter-macro-beats { display: grid; gap: 6px; margin-top: 6px; }
.letter-macro-beat {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-1);
}
.letter-beat-label {
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  margin-right: 6px;
  display: inline;
}
.letter-beat-play .letter-beat-label { color: var(--accent); }
.letter-beat-play { color: var(--ink-0); }

/* ─── Top Stories — general-news front page (WSJ/NYT/CNN look) ───────────── */
.fp-page { max-width: 980px; margin: 0 auto; padding: 6px 18px 60px; }
.fp-masthead {
  display: flex; align-items: baseline; gap: 14px;
  border-bottom: 3px double var(--ink-dim); padding-bottom: 8px; margin-bottom: 4px;
}
.fp-masthead .fp-name {
  font-family: var(--serif); font-weight: 700; font-size: 30px;
  letter-spacing: -0.01em; color: var(--ink);
}
.fp-masthead .fp-date { font-family: var(--serif); font-size: 13px; color: var(--ink-dim); font-style: italic; }
.fp-masthead .fp-age { margin-left: auto; color: var(--ink-mute); }

.fp-story { border-bottom: 1px solid var(--line); padding: 14px 0; }
.fp-kickline { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.fp-kicker {
  font-family: var(--sans); font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent);
}
.fp-srcs { font-family: var(--mono); font-size: 10px; color: var(--ink-mute); }
.fp-badge {
  font-family: var(--sans); font-size: 9px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 1px 6px; border-radius: 3px; color: #fff;
}
.fp-badge-breaking { background: #c0392b; }
.fp-badge-big { background: #b8860b; }
.fp-badge-dev { background: #2c6e9b; }
.fp-badge-excl { background: #6c3483; }

/* ─── Situations tracker ─────────────────────────────────────────── */
.sit-page { max-width: 920px; margin: 0 auto; padding: 8px 4px 40px; }
.sit-pagehead { font-family: var(--serif); font-size: 17px; font-weight: 600; margin-bottom: 12px; color: var(--ink); }
.sit-pagehead .mono { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--ink-mute); }
.sit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.sit-card { text-align: left; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px;
  padding: 11px 12px; cursor: pointer; transition: border-color .12s, background .12s, transform .12s; color: var(--ink); font: inherit; }
.sit-card:hover { border-color: var(--accent); background: var(--bg-3); transform: translateY(-1px); }
.sit-head { display: flex; align-items: baseline; gap: 7px; margin-bottom: 6px; }
.sit-name { font-family: var(--serif); font-size: 15px; font-weight: 600; }
.sit-tick { font-family: var(--mono); font-size: 10px; color: var(--accent); font-weight: 700; }
.sit-counts { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 5px; }
.sit-c { font-family: var(--mono); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 1px 5px; border-radius: 3px; color: #fff; }
.sit-docket { background: #8e44ad; }
.sit-filing { background: #2c6e9b; }
.sit-news { background: #555; }
.sit-terms { display: flex; gap: 5px; flex-wrap: wrap; margin: 5px 0; }
.sit-term { font-family: var(--mono); font-size: 9px; color: var(--ink-mute); background: rgba(127,127,127,.12);
  padding: 1px 5px; border-radius: 3px; }
.sit-latest { font-size: 12px; color: var(--ink); line-height: 1.3; margin: 4px 0 5px; }
.sit-foot { font-family: var(--mono); font-size: 10px; color: var(--ink-mute); }
.sit-suggest { background: var(--bg-1); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin-bottom: 16px; }
.sit-suggest-head { font-size: 12px; font-weight: 600; color: var(--ink-dim); margin-bottom: 8px; }
.sit-suggest-head .mono { font-family: var(--mono); font-size: 10px; font-weight: 400; color: var(--ink-mute); }
.sit-suggest-row { display: flex; flex-wrap: wrap; gap: 7px; }
.sit-sugg { display: inline-flex; align-items: center; gap: 7px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 5px; padding: 4px 6px 4px 9px; }
.sit-sugg-name { font-size: 12px; color: var(--ink); }
.sit-sugg-n { font-family: var(--mono); font-size: 10px; color: var(--ink-mute); }
.sit-sugg-btn { font-size: 10px; font-family: var(--sans); background: var(--accent); color: #1a1208; border: none;
  border-radius: 4px; padding: 2px 7px; cursor: pointer; font-weight: 600; }
.sit-sugg-btn:hover { background: #ffd595; }
.sit-sugg-btn.added { background: var(--green); cursor: default; }
.sit-back { margin-bottom: 14px; }
.sit-detail-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.sit-detail-head h2 { margin: 0; font-family: var(--serif); font-size: 23px; font-weight: 600; }
.sit-timeline { margin-top: 14px; border-left: 2px solid var(--line); padding-left: 0; }
.sit-item { display: flex; gap: 12px; padding: 10px 0 10px 14px; border-bottom: 1px solid var(--line); position: relative; }
.sit-item::before { content: ''; position: absolute; left: -5px; top: 16px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); }
.sit-item-date { font-family: var(--mono); font-size: 11px; color: var(--ink-mute); min-width: 46px; padding-top: 2px; }
.sit-item-body { flex: 1; }
.sit-item-head { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.sit-item-head a { font-family: var(--serif); font-size: 15px; color: var(--ink); text-decoration: none; line-height: 1.25; }
.sit-item-head a:hover { color: var(--accent); text-decoration: underline; }
.sit-tag { font-family: var(--mono); font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; color: #fff; }
.sit-corr { font-family: var(--mono); font-size: 9px; color: #b8860b; font-weight: 700; }
.sit-item-sum { font-size: 12.5px; color: var(--ink-mute); line-height: 1.4; margin: 3px 0; }
.sit-item-src { font-size: 10px; color: var(--ink-mute); opacity: .8; }
.fp-headline {
  margin: 0; font-family: var(--serif); font-weight: 600; line-height: 1.18;
  color: var(--ink); font-size: 19px; letter-spacing: -0.005em;
}
.fp-dek {
  margin: 6px 0 0; font-family: var(--serif); font-size: 14px; line-height: 1.5;
  color: var(--ink-dim);
}
.fp-links { margin-top: 7px; display: flex; gap: 12px; flex-wrap: wrap; }
.fp-link { font-family: var(--mono); font-size: 11px; color: var(--accent-2); text-decoration: none; }
.fp-link:hover { text-decoration: underline; }

/* Lead / splash story */
.fp-lead-wrap { border-bottom: 2px solid var(--ink-dim); margin-bottom: 4px; }
.fp-story.fp-lead { border-bottom: none; padding-top: 16px; }
.fp-story.fp-lead .fp-headline { font-size: 30px; line-height: 1.12; font-weight: 700; }
.fp-story.fp-lead .fp-dek { font-size: 16px; line-height: 1.55; margin-top: 8px; }
.fp-story.fp-lead .fp-kicker { font-size: 11px; }

/* Remaining stories — two-column newspaper grid */
.fp-grid { column-count: 2; column-gap: 32px; }
.fp-grid .fp-story { break-inside: avoid; }
.fp-grid .fp-story:first-child { padding-top: 4px; }
@media (max-width: 760px) { .fp-grid { column-count: 1; } }

/* Front-page section TABS (2026-06-24) — Top Stories + per-category tabs */
.fp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 10px 0 4px;
  border-bottom: 2px solid var(--ink-dim);
}
.fp-tab {
  background: transparent;
  color: var(--ink-dim);
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 7px 13px;
  font-family: var(--serif);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}
.fp-tab:hover { color: var(--ink); }
.fp-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
@media (max-width: 760px) {
  .fp-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .fp-tab { padding: 7px 10px; font-size: 11.5px; }
}

/* Category bands (2026-06-24) — Top Stories splash, then per-section bands */
.fp-section { margin-top: 18px; }
.fp-section-h {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--ink-dim);
}
.fp-section.fp-top { margin-top: 4px; }
.fp-top-h {
  font-size: 14px;
  letter-spacing: 0.12em;
  border-bottom-width: 2px;
}

/* ════════════════════════════════════════════════════════════════════
   MOBILE / RESPONSIVE (2026-06-18) — the viewport was hard-pinned to
   width=1100; now device-width. Collapse the 2-col layout, let the nav
   chips scroll, stack the topbar, and hide the secondary sources rail.
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 860px) {
  /* Topbar: wrap, tighten, allow stats to flow under the brand */
  .topbar { flex-wrap: wrap; gap: 8px 12px; padding: 7px 11px; }
  .topbar-stats { gap: 6px; flex-wrap: wrap; margin-left: auto; }
  .topbar-stats .stat { padding: 3px 6px; font-size: 10px; }
  .topbar-actions { gap: 5px; }
  .brand h1 { font-size: 16px; }

  /* Filterbar: stack the chip row above the per-view controls; let both
     scroll horizontally instead of squashing. */
  .filterbar { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 10px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 4px; scrollbar-width: thin; }
  .chip { flex: 0 0 auto; white-space: nowrap; padding: 6px 11px; font-size: 12px; }
  .chip.cat { font-size: 12px; opacity: 0.9; }
  .chip-sep { display: none; }
  .window-controls { margin-left: 0; flex-wrap: wrap; gap: 10px; }
  #view-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

  /* Layout: single column, drop the 240px sidebar entirely (sources/cost are
     a desktop convenience; Watchlist tab covers the watchlist on mobile). */
  .layout { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .sources { display: none; }
  /* Grid items default to min-width:auto and refuse to shrink below their
     content's intrinsic width — which let the feed balloon past the viewport
     and forced page-wide horizontal scroll. Pin it to 0 so it stays in track. */
  .feed { padding: 12px 12px 40px; min-width: 0; }
  .feed, .fp-page, .fp-section, .fp-summary, .fp-lead-wrap { min-width: 0; max-width: 100%; }

  /* Article rows: collapse the 50px score + 80px meta columns so the
     headline gets the width; score sits inline. */
  .article { grid-template-columns: 34px 1fr; gap: 8px; padding: 11px 2px 12px; }
  .article .score-badge { font-size: 13px; padding-top: 0; }
  .article :last-child:not(.score-badge) { grid-column: 1 / -1; }
  /* The meta/right column spans full width and reads left-aligned on mobile
     (the desktop right-align looks broken once it's the only column). */
  .article .right { grid-column: 1 / -1; text-align: left;
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

  /* Wide content tables (theme plays) scroll inside their card instead of
     forcing the whole page to scroll sideways. */
  .theme-plays { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Bigger tap targets — desktop padding gives ~28-30px tall controls,
     below the ~44px touch guideline. */
  .btn { padding: 9px 14px; }
  .mini { padding: 6px 10px !important; font-size: 12px !important; line-height: 1.2; }
  .chip { padding: 9px 13px; }

  /* Letter "moves to watch" 2-col grid stacks on phones. */
  .letter-m2w-grid { grid-template-columns: 1fr; }

  /* Front page: single column, smaller masthead + headlines. */
  .fp-page { padding: 4px 12px 48px; }
  .fp-grid { column-count: 1; column-gap: 0; }
  .fp-masthead { flex-wrap: wrap; gap: 4px 10px; }
  .fp-masthead .fp-name { font-size: 22px; }
  .fp-masthead .fp-age { margin-left: 0; }
  .fp-headline { font-size: 17px; }
  .fp-story.fp-lead .fp-headline { font-size: 22px; }

  /* Situations: single-column cards; tighter timeline. */
  .sit-page { padding: 6px 2px 40px; }
  .sit-grid { grid-template-columns: 1fr; }
  .sit-detail-head h2 { font-size: 20px; }
  .sit-item { gap: 9px; padding: 9px 0 9px 12px; }
  .sit-item-head a { font-size: 14px; }
}

/* Phones: drop the long uppercase subtitle and shrink a touch more. */
@media (max-width: 480px) {
  .brand .sub { display: none; }
  .topbar { gap: 6px 8px; }
  /* The three monospaced stat pills wrap to a 2nd/3rd row and eat vertical
     space on a phone — hide them (the data lives in their own views). */
  .topbar-stats { display: none; }
  /* Drop the secondary sort/filter inputs to de-noise the filterbar. */
  .window-controls select, .window-controls input[type="number"] { display: none; }
  .fp-story.fp-lead .fp-headline { font-size: 20px; }
  .fp-story.fp-lead .fp-dek { font-size: 14px; }
  .feed { padding: 10px 9px 36px; }
}

/* Tablet: 2-col grids stay but the sidebar narrows so the feed isn't cramped. */
@media (min-width: 861px) and (max-width: 1080px) {
  .layout { grid-template-columns: 200px 1fr; }
}

/* ── Credit Letter cohort thesis (structural read) + Ideas tab (2026-06-25) ── */
/* Structural-read cards: hairline-separated (no full box) — 1 of 2 letter styles */
.letter-cohort .cohort-thesis {
  border: none; border-top: 1px solid var(--line);
  border-radius: 0; padding: 14px 0 6px; margin-bottom: 4px; background: none;
}
.letter-cohort .cohort-thesis:first-of-type { border-top: none; padding-top: 2px; }
.cohort-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.cohort-prop { margin: 0; font-size: 15px; line-height: 1.35; color: var(--ink); font-weight: 650; flex: 1; }
.cohort-conv {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 6px;
  border-radius: 3px; border: 1px solid var(--line); color: var(--ink-dim); white-space: nowrap;
}
.cohort-conv-high { color: #7fd49a; border-color: #7fd49a; }
.cohort-conv-medium { color: var(--accent); border-color: var(--accent); }
.cohort-conv-low { color: var(--ink-mute); }
.cohort-macro { margin: 6px 0; font-size: 13px; line-height: 1.5; color: var(--ink-dim); }
.cohort-line { font-size: 12.5px; line-height: 1.45; color: var(--ink-dim); margin-top: 4px; }
.cohort-label {
  display: inline-block; font-size: 9px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--accent); font-weight: 700; margin-right: 6px;
}
.cohort-members { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.cohort-member {
  font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 3px;
  background: var(--bg-3); border: 1px solid var(--line); color: var(--ink-dim);
}

/* Save buttons */
.idea-save-btn, .rxe-save-btn {
  background: transparent; border: 1px solid var(--line); color: var(--ink-mute);
  padding: 1px 8px; border-radius: 3px; cursor: pointer; font-size: 11px; white-space: nowrap;
}
.idea-save-btn:hover, .rxe-save-btn:hover { color: var(--accent); border-color: var(--accent); }
.idea-save-btn.saved { color: #7fd49a; border-color: #7fd49a; cursor: default; }
.cohort-head .idea-save-btn { margin-left: auto; }

/* Ideas list */
.ideas-list { display: flex; flex-direction: column; gap: 14px; max-width: 860px; }
.idea-card {
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg-1);
  padding: 14px 16px;
}
.idea-card.pinned { border-color: var(--accent); }
.idea-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.idea-badge {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700;
  padding: 2px 7px; border-radius: 3px; background: var(--bg-3); color: var(--accent-2);
  border: 1px solid var(--line); white-space: nowrap;
}
.idea-badge-rx_letter_thesis { color: var(--accent); }
.idea-title { font-size: 14px; font-weight: 600; color: var(--ink); flex: 1; min-width: 180px; }
.idea-meta { font-size: 10px; color: var(--ink-mute); }
.idea-pin, .idea-del {
  background: transparent; border: 1px solid var(--line); color: var(--ink-mute);
  padding: 1px 7px; border-radius: 3px; cursor: pointer; font-size: 12px;
}
.idea-pin:hover { border-color: var(--accent); }
.idea-del:hover { border-color: #ff8090; color: #ff8090; }
.idea-body { margin-bottom: 8px; }
.idea-note {
  width: 100%; box-sizing: border-box; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 4px; color: var(--ink-dim); font-family: inherit; font-size: 12px;
  padding: 6px 8px; resize: vertical; min-height: 32px;
}
.idea-note:focus { outline: none; border-color: var(--accent-2); }
.idea-generic { white-space: pre-wrap; font-size: 12px; color: var(--ink-dim); font-family: var(--mono); }

/* Front-page "The brief" digest (2026-06-25) */
.fp-summary {
  border: 1px solid var(--line); border-left: 3px solid var(--accent-2);
  background: var(--bg-2); border-radius: 6px; padding: 12px 16px; margin-bottom: 20px;
}
.fp-summary-label {
  display: block; font-size: 9px; text-transform: uppercase; letter-spacing: 1px;
  font-weight: 700; color: var(--accent-2); margin-bottom: 5px;
}
.fp-summary p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink); }

/* Editorials & Opinion rail (2026-06-26) — argued pieces across the spectrum,
   sits below the lead news on the Top Stories tab. Visually distinct from the
   neutral news cards: tinted, viewpoint-tagged, argument-first. */
.ed-rail { margin-top: 26px; border-top: 2px solid var(--line); padding-top: 16px; }
.ed-rail-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ed-rail-title { font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--ink); }
.ed-rail-hint { font-size: 11px; color: var(--ink-mute); font-style: italic; }
.ed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ed-card {
  border: 1px solid var(--line); border-left: 3px solid var(--accent-2);
  background: var(--bg-2); border-radius: 6px; padding: 12px 14px; min-width: 0;
}
.ed-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.ed-lean {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700;
  color: var(--accent-2); background: rgba(255,255,255,0.04); border: 1px solid var(--line);
  border-radius: 4px; padding: 2px 7px;
}
.ed-topic { font-size: 10px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.5px; }
.ed-headline { margin: 2px 0 4px; font-family: var(--serif); font-size: 16px; line-height: 1.25; font-weight: 650; }
.ed-headline a { color: var(--ink); text-decoration: none; }
.ed-headline a:hover { color: var(--accent); text-decoration: underline; }
.ed-author { display: block; font-size: 11px; color: var(--ink-mute); margin-bottom: 6px; }
.ed-arg { margin: 6px 0; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.ed-arg-label {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700;
  color: var(--accent); margin-right: 5px;
}
.ed-sum { margin: 6px 0 8px; font-size: 13px; line-height: 1.58; color: var(--ink); }
.ed-points { margin: 4px 0 8px; padding-left: 16px; }
.ed-points li { font-size: 12px; line-height: 1.45; color: var(--ink-mute); margin-bottom: 3px; }
/* subject tag — sits before the viewpoint tag on each card */
.ed-subject {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700;
  color: var(--accent); background: rgba(246,193,119,0.12); border: 1px solid var(--line);
  border-radius: 4px; padding: 2px 7px;
}
/* filter chips above the grid */
.ed-filters { margin: 4px 0 14px; display: flex; flex-direction: column; gap: 7px; }
.ed-frow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ed-flabel { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.7px; font-weight: 700;
  color: var(--ink-mute); width: 46px; flex: 0 0 46px; }
.ed-fchip {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-mute);
  font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: 14px; cursor: pointer;
  transition: all 0.12s; white-space: nowrap;
}
.ed-fchip:hover { color: var(--ink); border-color: var(--accent-2); }
.ed-fchip.on { background: var(--accent); color: #1a1208; border-color: var(--accent); }
.ed-fcount { opacity: 0.6; font-size: 10px; }
.ed-fchip.on .ed-fcount { opacity: 0.7; }
@media (max-width: 760px) { .ed-grid { grid-template-columns: 1fr; } }

/* Grand thesis: the one emphatic gold-accent "thesis" box — 2nd of 2 styles */
.letter-grand .grand-thesis {
  border: none; border-left: 3px solid var(--accent);
  border-radius: 0; padding: 8px 0 8px 16px; margin-bottom: 8px;
  background: linear-gradient(90deg, rgba(246,193,119,0.06), transparent 60%);
}
.grand-prop { margin: 0; font-size: 16.5px; line-height: 1.35; color: var(--ink); font-weight: 700; flex: 1; }
.letter-grand .cohort-macro { font-size: 13.5px; color: var(--ink); }

/* Per-story expandable summary on the front page (2026-06-25) */
.fp-sum { margin: 6px 0 2px; }
.fp-sum-toggle {
  cursor: pointer; font-size: 11px; color: var(--accent-2); list-style: none;
  display: inline-flex; align-items: center; gap: 4px; user-select: none;
}
.fp-sum-toggle::-webkit-details-marker { display: none; }
.fp-sum-toggle:hover { color: var(--accent); }
.fp-sum[open] .fp-sum-toggle { color: var(--ink-mute); margin-bottom: 4px; }
.fp-sum-body {
  margin: 4px 0 0; font-size: 13px; line-height: 1.55; color: var(--ink-dim);
  padding-left: 10px; border-left: 2px solid var(--line);
}

/* ════════════════════════════════════════════════════════════════════════
   UI refresh 2026-06-28 — sticky chrome, 6-chip nav + sub-strip, slim rail,
   cost popover, collapsible editorials, letter TOC, command palette / modals.
   ════════════════════════════════════════════════════════════════════════ */
:root { --chrome-h: 120px; --topbar-h: 49px; --filterbar-h: 38px; }

/* sticky chrome stack -------------------------------------------------------*/
.topbar    { z-index: 30; }
.filterbar { position: sticky; top: var(--topbar-h); z-index: 25; }
.substrip  { position: sticky; top: calc(var(--topbar-h) + var(--filterbar-h)); z-index: 20; }

/* header: cost pill button + popover ---------------------------------------*/
.stat-btn { cursor: pointer; font-family: var(--mono); font-size: 11px; }
.stat-btn:hover { border-color: var(--accent); color: var(--ink); }
.popover {
  position: absolute; top: calc(100% + 6px); right: 12px; z-index: 40;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 12px; min-width: 240px; box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.popover h4 { margin: 0 0 6px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-mute); }
.popover .cost-table { font-size: 11px; }

/* nav chips: one emoji + word ----------------------------------------------*/
.nav-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; font-size: 12px; }
.nav-emoji { font-size: 12px; }

/* secondary sub-strip -------------------------------------------------------*/
.substrip {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 6px 16px; background: var(--bg-0); border-bottom: 1px solid var(--line);
}
.subchip {
  background: transparent; color: var(--ink-dim); border: 1px solid transparent;
  padding: 3px 10px; border-radius: 999px; cursor: pointer; font-size: 11px;
}
.subchip:hover { color: var(--ink); background: var(--bg-2); }
.subchip.active { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.subchip.ghost { color: var(--ink-mute); font-family: var(--mono); font-size: 10.5px; }
.substrip-spacer { flex: 1; }

/* left rail → sticky, independently scrollable, watchlist-first ------------*/
.sources {
  position: sticky; top: var(--chrome-h); align-self: start;
  height: calc(100vh - var(--chrome-h)); overflow-y: auto;
  display: flex; flex-direction: column; scrollbar-width: thin;
}
.rail-filter {
  width: 100%; box-sizing: border-box; margin-bottom: 6px;
  background: var(--bg-2); color: var(--ink); border: 1px solid var(--line);
  border-radius: 4px; padding: 4px 7px; font-size: 11px; font-family: var(--mono);
}
.watchlist-list { flex: none; overflow-y: auto; max-height: 42vh; scrollbar-width: thin; }
.sources .sources-list { flex: none; }
.watch-row { display: flex; align-items: center; gap: 6px; padding: 2px 0; font-size: 11px; }
.watch-row .wk {
  flex: none; width: 15px; text-align: center; font-family: var(--mono); font-size: 9px;
  color: var(--accent); border: 1px solid var(--line); border-radius: 3px; line-height: 14px;
}
.watch-row .wv { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-dim); }
.watch-row .x { cursor: pointer; color: var(--ink-mute); padding: 0 2px; }
.watch-row .x:hover { color: var(--red); }
.rail-foot { margin-top: auto; padding-top: 10px; }
.linkish { background: none; border: none; color: var(--ink-mute); cursor: pointer; font-size: 11px; padding: 0; }
.linkish:hover { color: var(--accent); }
.mini { background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-dim); cursor: pointer; border-radius: 4px; width: 20px; height: 18px; line-height: 1; font-size: 13px; }
.mini:hover { border-color: var(--accent); color: var(--ink); }

/* editorials: collapsed by default, click to expand ------------------------*/
.ed-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
.ed-card { cursor: pointer; position: relative; transition: border-color 0.12s; }
.ed-card:hover { border-color: var(--accent); }
.ed-card.ed-collapsed .ed-sum,
.ed-card.ed-collapsed .ed-points { display: none; }
.ed-card.ed-collapsed .ed-arg {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ed-card.ed-collapsed .fp-links { display: none; }
.ed-more {
  background: none; border: none; color: var(--accent-2); cursor: pointer;
  font-size: 11px; padding: 4px 0 0; font-family: var(--sans);
}

/* letter sticky table of contents (wide screens only) ----------------------*/
#letter-toc { display: none; }
@media (min-width: 1180px) {
  #letter-toc {
    display: block; position: fixed; top: calc(var(--chrome-h) + 24px); right: 20px;
    width: 196px; max-height: calc(100vh - var(--chrome-h) - 60px); overflow-y: auto;
    font-size: 11.5px; z-index: 5; scrollbar-width: thin;
  }
  #letter-toc .toc-cap { text-transform: uppercase; letter-spacing: 0.06em; font-size: 9.5px; color: var(--ink-mute); margin-bottom: 6px; }
  #letter-toc a {
    display: block; color: var(--ink-mute); text-decoration: none; padding: 3px 0 3px 9px;
    border-left: 2px solid var(--line); line-height: 1.3;
  }
  #letter-toc a:hover { color: var(--ink); }
  #letter-toc a.active { color: var(--accent); border-left-color: var(--accent); }
}

/* modals: keyboard help + command palette ----------------------------------*/
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.5);
  display: flex; align-items: flex-start; justify-content: center;
}
.modal {
  margin-top: 12vh; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 18px 20px; width: 360px; max-width: 92vw;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.modal h3 { margin: 0 0 12px; font-family: var(--serif); font-size: 16px; }
.keys-grid .cost-row { padding: 3px 0; font-size: 12px; }
kbd {
  font-family: var(--mono); font-size: 10px; background: var(--bg-0);
  border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; color: var(--ink);
}
.cmdk-box {
  margin-top: 12vh; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 8px; width: 540px; max-width: 94vw; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
#cmdk-input {
  width: 100%; box-sizing: border-box; background: var(--bg-1); color: var(--ink);
  border: none; border-bottom: 1px solid var(--line); padding: 13px 16px; font-size: 14px; outline: none;
}
.cmdk-results { max-height: 50vh; overflow-y: auto; padding: 4px; }
.cmdk-row { padding: 8px 12px; border-radius: 5px; cursor: pointer; font-size: 13px; color: var(--ink-dim); }
.cmdk-row.sel { background: var(--accent); color: #1a1208; }
.cmdk-empty { padding: 14px; color: var(--ink-mute); text-align: center; font-size: 12px; }

/* rail trigger + close button (mobile only) --------------------------------*/
#btn-rail, .rail-close { display: none; }
#rail-backdrop { display: none; }

/* mobile: rail becomes a slide-up bottom sheet (⭐ in the header) -----------*/
@media (max-width: 860px) {
  .filterbar, .substrip { position: static; }
  #btn-rail { display: inline-block; }
  .rail-close { display: inline-block; }
  #rail-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 80;
    opacity: 0; pointer-events: none; transition: opacity 0.2s;
  }
  body.rail-open #rail-backdrop { display: block; opacity: 1; pointer-events: auto; }
  .sources {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    height: auto; max-height: 82vh; width: auto; z-index: 90;
    border: none; border-top: 1px solid var(--line); border-radius: 14px 14px 0 0;
    box-shadow: 0 -8px 30px rgba(0,0,0,0.5); padding: 16px 16px 24px;
    transform: translateY(102%); transition: transform 0.24s ease;
  }
  body.rail-open .sources { transform: translateY(0); }
  .watchlist-list { max-height: 38vh; }
  .sources .sources-list { max-height: 22vh; overflow-y: auto; }
}

/* ── Credit Letter: situations as structural (hairline) list — same family ──*/
.rxl-sit { gap: 0; }
.rxl-sit .letter-macro-item {
  background: none; border-left: none; border-top: 1px solid var(--line);
  border-radius: 0; padding: 12px 0 8px;
}
.rxl-sit .letter-macro-item:first-child { border-top: none; padding-top: 2px; }

/* ── unified badge family — one shape token set, semantic colors ────────────
   Centralizes the small label badges so Feed categories, front-page kickers,
   editorial leans and credit-letter conviction chips read as ONE system. Only
   shape is normalized here; each class keeps its own semantic color below. */
:root {
  --sem-pos: #7fd49a;            /* high conviction / good */
  --sem-credit: var(--accent);   /* gold — credit/rx */
  --sem-macro: var(--accent-2);  /* blue — macro/markets */
  --sem-finance: var(--finance); /* purple — finance */
  --sem-alert: var(--red);       /* breaking */
  --sem-neutral: var(--ink-mute);
}
.fp-badge, .cat-pill, .cohort-conv, .ed-lean, .ed-subject, .idea-badge,
.cohort-member, .alsoin-pill {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700;
  padding: 2px 6px; border-radius: 3px; line-height: 1.5; vertical-align: middle;
}
.cohort-member { text-transform: none; font-weight: 500; }  /* tickers keep case */
/* semantic colors drawn from the shared palette */
.cohort-conv-high { color: var(--sem-pos); border-color: var(--sem-pos); }
.cohort-conv-medium { color: var(--sem-credit); border-color: var(--sem-credit); }
.cohort-conv-low { color: var(--sem-neutral); border-color: var(--sem-neutral); }
.article.cat-rx .cat-pill { color: var(--sem-credit); border-color: var(--sem-credit); }
.article.cat-macro .cat-pill { color: var(--sem-macro); border-color: var(--sem-macro); }
.article.cat-finance .cat-pill { color: var(--sem-finance); border-color: var(--sem-finance); }

/* ─── The Marks Desk (📓 memos) ─────────────────────────────────────────── */
.mk-head h1 { font-family: var(--serif); font-size: 26px; margin: 8px 0 2px; }
.mk-head .mk-sub { color: var(--ink-mute); margin: 0 0 14px; font-size: 12.5px; }
.mk-sec { margin: 0 0 26px; }
.mk-sec > h2 { font-family: var(--serif); font-size: 18px; border-bottom: 1px solid var(--line); padding-bottom: 5px; margin: 0 0 12px; }
.mk-hint { color: var(--ink-mute); font-weight: 400; font-size: 11px; }
.mk-intro { color: var(--ink-dim); margin: 0 0 12px; }

/* pending evergreen gate */
.mk-pending { background: var(--bg-2); border: 1px solid var(--yellow); border-radius: 6px; padding: 10px 12px; margin: 0 0 20px; }
.mk-diff { font-family: var(--mono); font-size: 11px; white-space: pre-wrap; background: var(--bg-1); padding: 8px; border-radius: 4px; margin: 8px 0; max-height: 180px; overflow: auto; }

/* sparkline */
.mk-spark-wrap { background: var(--bg-1); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px 4px; margin: 0 0 14px; }
.mk-spark-legend { font-size: 10.5px; color: var(--ink-mute); text-align: center; margin-top: 2px; }

/* cycle ledger table */
.mk-ledger { width: 100%; border-collapse: collapse; font-size: 12px; }
.mk-ledger th { text-align: left; color: var(--ink-mute); font-weight: 600; border-bottom: 1px solid var(--line); padding: 5px 8px; font-size: 10.5px; text-transform: uppercase; }
.mk-ledger td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mk-ledger tr:hover { background: var(--bg-1); }
.mk-date { font-family: var(--mono); font-size: 11px; color: var(--ink-mute); white-space: nowrap; }
.mk-ev { font-family: var(--serif); font-style: italic; color: var(--ink-dim); max-width: 340px; }
.mk-outcome { background: #f39c1215; border-left: 2px solid var(--yellow); padding: 3px 6px; margin: 2px 0; border-radius: 3px; font-size: 11px; }

/* chips + tags */
.mk-chip { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.mk-tag { display: inline-block; padding: 0 6px; border-radius: 3px; font-size: 10px; background: var(--bg-3); color: var(--ink-mute); }
.mk-flag { color: var(--yellow); cursor: help; }
.mk-link { color: var(--accent); cursor: pointer; font-size: 11px; }

/* distressed mechanics + generic items */
.mk-item { margin: 0 0 14px; }
.mk-item h3 { font-size: 13.5px; margin: 0 0 3px; color: var(--ink); }
.mk-item p { margin: 0 0 4px; color: var(--ink-dim); }
.mk-cites { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.mk-cite { font-size: 10px; color: var(--ink-mute); background: var(--bg-2); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; }
.mk-fw { font-family: var(--mono); font-size: 10px; color: var(--accent); background: var(--bg-2); border: 1px solid var(--accent); border-radius: 3px; padding: 0 5px; }

/* today's read */
.mk-todaystance { margin: 0 0 8px; }
.mk-read { font-family: var(--serif); font-size: 14px; line-height: 1.6; color: var(--ink); max-width: 720px; }

/* desk bridge */
.mk-bridge { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 5px; padding: 8px 12px; margin: 0 0 10px; }
.mk-bridge-muted { opacity: 0.6; border-left-color: var(--ink-mute); }
.mk-bridge-top { margin-bottom: 3px; }
.mk-bridge p { margin: 3px 0; color: var(--ink-dim); font-size: 12.5px; }
.mk-live { display: inline-block; background: var(--rx); color: #fff; border-radius: 3px; padding: 0 6px; font-size: 10px; font-weight: 600; }
.mk-conf { display: inline-block; font-size: 9.5px; text-transform: uppercase; font-weight: 700; padding: 0 5px; border-radius: 3px; }
.mk-conf-tight { background: var(--green); color: #fff; }
.mk-conf-plausible { background: var(--yellow); color: #1a1208; }
.mk-conf-stretch { background: var(--bg-3); color: var(--ink-mute); }

/* doctrine card grid */
.mk-doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.mk-doc { border: 1px solid var(--line); border-radius: 5px; padding: 8px 10px; background: var(--bg-1); }
.mk-doc-obs { opacity: 0.6; }
.mk-gloss { color: var(--ink-dim); font-size: 11.5px; margin: 2px 0; }
.mk-app { color: var(--ink-mute); font-size: 11px; }

/* memo library cards */
.mk-card { border-bottom: 1px solid var(--line); padding: 9px 0; }
.mk-card-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.mk-card-title { font-weight: 600; color: var(--ink); text-decoration: none; }
.mk-card-title:hover { color: var(--accent); }
.mk-oneline { color: var(--ink-dim); font-size: 12px; margin: 3px 0; }
.mk-details summary { cursor: pointer; color: var(--ink-mute); font-size: 11px; }
.mk-takeaways { margin: 6px 0; padding-left: 18px; }
.mk-takeaways li { margin: 2px 0; color: var(--ink-dim); font-size: 12px; }
.mk-lens { background: var(--bg-1); border-left: 2px solid var(--accent); padding: 4px 8px; margin: 5px 0; font-size: 12px; }
.mk-anchor { font-family: var(--serif); font-style: italic; color: var(--ink); margin: 5px 0; }

/* comprehensive per-memo summary (on-demand) */
.mk-sumrow { margin: 8px 0 4px; }
.mk-sumbtn { font-size: 11px; }
.mk-sum-body { border-left: 2px solid var(--accent); padding: 6px 12px; margin: 6px 0; background: var(--bg-1); border-radius: 4px; }
.mk-sum-body p { margin: 0 0 8px; color: var(--ink-dim); font-size: 12.5px; line-height: 1.55; }
.mk-sum-body h4 { margin: 10px 0 4px; font-size: 12px; color: var(--ink); text-transform: uppercase; letter-spacing: 0.3px; }
