/* ───────────────────────────────────────────────────────────────
   folio.work — "private investment journal" aesthetic
   dark canvas · editorial serif · warm amber accent
   ─────────────────────────────────────────────────────────────── */

:root {
  --ink:        #0d0d0f;          /* canvas */
  --ink-2:      #141417;          /* surface */
  --ink-3:      #1c1c20;          /* surface raised */
  --rule:       #2a2a2e;          /* hairlines */
  --rule-soft:  #1f1f23;
  --text:       #ebe7df;          /* warm off-white */
  --text-dim:   #8b8782;
  --text-mute:  #5a5752;
  --amber:      #d4a574;          /* accent */
  --amber-deep: #b48655;
  --amber-soft: rgba(212, 165, 116, 0.12);
  --red:        #c45a4e;
  --green:      #6b8e5f;
  --maxw:       1180px;

  --font-display: "Instrument Serif", "Newsreader", Georgia, serif;
  --font-body:    "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 380;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "ss02", "kern";
}

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

code, .mono { font-family: var(--font-mono); font-size: 0.85em; }

/* Subtle paper-grain overlay */
.grain, .login-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ─── Login page ─── */
.page-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse 60% 40% at 50% 30%, rgba(212, 165, 116, 0.04), transparent 70%),
    var(--ink);
}

.login-stage {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 2;
}

.login-header { text-align: center; margin-bottom: 3rem; }

.brandmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}

.brand-glyph {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--amber);
  line-height: 1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: -0.01em;
  font-weight: 400;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-mute);
  text-transform: lowercase;
  margin-left: 0.6rem;
}

.login-tagline {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-dim);
  margin: 1.2rem 0 0;
  font-style: italic;
  font-weight: 360;
}

.login-tagline em {
  color: var(--amber);
  font-style: italic;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: lowercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
}

.field input[type="text"],
.field input[type="password"] {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.05rem;
  outline: none;
  transition: border-color 0.2s;
}

.field input:focus { border-bottom-color: var(--amber); }

.btn-primary {
  background: transparent;
  border: 1px solid var(--amber);
  color: var(--amber);
  padding: 0.7rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: lowercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: background 0.15s, color 0.15s;
}
.btn-primary:hover:not(:disabled) {
  background: var(--amber);
  color: var(--ink);
}
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--text-dim);
  padding: 0.7rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: lowercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-ghost:hover { border-color: var(--text-dim); color: var(--text); }

.btn-arrow { font-family: var(--font-body); font-size: 1rem; }

.link-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: lowercase;
  cursor: pointer;
  padding: 0;
}
.link-btn:hover { color: var(--amber); }

.login-error, .form-error {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--red);
  margin: 0;
}

.login-footer {
  text-align: center;
  margin-top: 3rem;
}

.footnote {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-mute);
  letter-spacing: 0.06em;
}

/* ─── App layout ─── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 13, 15, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.app-nav {
  display: flex;
  gap: 0.2rem;
  flex: 1;
  justify-content: center;
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: lowercase;
  letter-spacing: 0.06em;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  position: relative;
  transition: color 0.15s;
}
.nav-tab:hover { color: var(--text); }
.nav-tab.active { color: var(--amber); }
.nav-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0.6rem;
  right: 0.6rem;
  height: 1px;
  background: var(--amber);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  border: 1px solid var(--rule);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.stats-strip {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  gap: 2rem;
  border-top: 1px solid var(--rule-soft);
  flex-wrap: wrap;
}

.stat {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.stat .stat-label { color: var(--text-mute); text-transform: lowercase; }
.stat .stat-value { color: var(--text); font-weight: 500; }
.stat .stat-accent { color: var(--amber); }

.app-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
  position: relative;
  z-index: 2;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade-in 0.3s ease-out; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}

.lede {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 56ch;
  margin: 0;
  font-weight: 360;
}

.lede code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--amber);
  background: var(--amber-soft);
  padding: 0.05em 0.35em;
  border-radius: 2px;
}

.loading {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-mute);
  text-align: center;
  padding: 3rem;
}

.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  border: 1px solid var(--rule-soft);
  border-radius: 2px;
}

.empty-glyph {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--rule);
  display: block;
  margin-bottom: 0.6rem;
}

.empty-state p {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-mute);
  margin: 0;
}

/* ─── Add channel form ─── */
.add-form {
  background: var(--ink-2);
  border: 1px solid var(--rule);
  padding: 1.8rem;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.form-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.4rem;
  margin: 0 0 0.4rem;
}

.field-group {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field-group legend {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: lowercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  padding: 0;
  margin-bottom: 0.4rem;
}

.radio {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-dim);
}
.radio input { accent-color: var(--amber); }
.radio:hover { color: var(--text); }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

/* ─── Channels list ─── */
.channels-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule);
}

.channel-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 1.2rem;
  align-items: center;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--rule-soft);
  transition: background 0.15s;
}
.channel-row:hover { background: rgba(255, 255, 255, 0.015); }

.channel-row.inactive { opacity: 0.45; }

.channel-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}
.channel-row.inactive .channel-status {
  background: var(--text-mute);
  box-shadow: none;
}

.channel-meta { min-width: 0; }
.channel-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.005em;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.channel-sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-mute);
  margin: 0.15rem 0 0;
  display: flex;
  gap: 0.8rem;
}
.channel-sub a { color: var(--text-mute); }
.channel-sub a:hover { color: var(--amber); }

.channel-stats {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: right;
  white-space: nowrap;
}
.channel-stats strong {
  color: var(--text);
  font-weight: 500;
}

.channel-actions {
  display: flex;
  gap: 0.4rem;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: all 0.15s;
}
.icon-btn:hover { border-color: var(--amber); color: var(--amber); }
.icon-btn.danger:hover { border-color: var(--red); color: var(--red); }

/* ─── Videos list ─── */
.videos-list { display: flex; flex-direction: column; }
.video-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1.2rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.video-title {
  font-family: var(--font-body);
  font-size: 1rem;
  margin: 0;
  font-weight: 420;
}
.video-channel {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-mute);
  margin: 0.15rem 0 0;
}
.video-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
}
.video-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: lowercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--rule);
  color: var(--text-mute);
}
.video-status.done { color: var(--green); border-color: var(--green); }
.video-status.failed { color: var(--red); border-color: var(--red); }
.video-status.processing { color: var(--amber); border-color: var(--amber); }

/* ─── Settings ─── */
.settings-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.setting-card {
  background: var(--ink-2);
  padding: 1.4rem;
}
.setting-card h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: lowercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  margin: 0 0 0.6rem;
  font-weight: 400;
}
.setting-card p {
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin: 0;
  color: var(--text);
}
.setting-card .mono-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--amber);
}

@media (max-width: 720px) {
  .display { font-size: 2.2rem; }
  .app-nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; }
  .header-inner { padding: 0.8rem 1rem; }
  .stats-strip { padding: 0.5rem 1rem; font-size: 0.7rem; gap: 1rem; }
  .channel-row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    row-gap: 0.6rem;
  }
  .channel-stats, .channel-actions { grid-column: 1 / -1; justify-self: start; }
  .settings-list { grid-template-columns: 1fr; }
}

/* ─── Bridge / ingestion panel ─── */
#bridge-pill { font-family: var(--font-mono); }
#bridge-pill.ok    { color: var(--green); border-color: rgba(107, 142, 95, 0.4); }
#bridge-pill.down  { color: var(--red);   border-color: rgba(196, 90, 78, 0.4); }
#bridge-pill.unknown { color: var(--text-mute); }

.ingestion-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-bottom: 1.6rem;
}
.ingestion-row {
  background: var(--ink-2);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.meta-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: lowercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
}

.videos-filter {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
}
.filter-chip {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  text-transform: lowercase;
  letter-spacing: 0.06em;
  transition: all 0.15s;
}
.filter-chip:hover { color: var(--text); border-color: var(--text-mute); }
.filter-chip.active {
  color: var(--amber);
  border-color: var(--amber);
  background: var(--amber-soft);
}

.video-row {
  cursor: default;
  position: relative;
}
.video-row.clickable { cursor: pointer; }
.video-row.clickable:hover { background: rgba(255, 255, 255, 0.02); }

.video-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.video-title a:hover { color: var(--amber); }

/* Status pip animation when actively processing */
.video-status.downloading,
.video-status.transcribing {
  position: relative;
  overflow: hidden;
}
.video-status.downloading::after,
.video-status.transcribing::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg, transparent, var(--amber-soft), transparent
  );
  animation: status-pulse 1.4s ease-in-out infinite;
}
@keyframes status-pulse {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Toast for manual-trigger feedback */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--ink-3);
  border: 1px solid var(--amber);
  color: var(--amber);
  padding: 0.7rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  z-index: 100;
  animation: toast-in 0.25s ease-out;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.toast.error { border-color: var(--red); color: var(--red); }

/* ─── Transcript modal ─── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 2rem;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-card {
  position: relative;
  background: var(--ink-2);
  border: 1px solid var(--rule);
  width: min(800px, 100%);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: modal-in 0.2s ease-out;
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 1.6rem;
  border-bottom: 1px solid var(--rule);
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  margin: 0 0 0.3rem;
  line-height: 1.2;
}
.modal-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-mute);
  margin: 0;
}
.modal-body {
  overflow-y: auto;
  padding: 1.6rem;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
}
.transcript-segment {
  margin-bottom: 0.8rem;
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1rem;
}
.transcript-segment .ts {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--amber-deep);
  white-space: nowrap;
  align-self: start;
  margin-top: 0.25rem;
}

@media (max-width: 720px) {
  .ingestion-panel { grid-template-columns: 1fr 1fr; }
  .transcript-segment { grid-template-columns: 1fr; gap: 0.1rem; }
}

/* ─── Insights tab ─── */
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.8rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
}

.section-sub {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dim);
  margin: 0 0 1.4rem;
  max-width: 56ch;
}

.window-filter {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 2rem;
  align-items: center;
}
.window-filter .meta-label { margin-right: 0.6rem; }

.leaderboard {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule);
  margin-bottom: 1rem;
}

.lb-row {
  display: grid;
  grid-template-columns: 36px 1.5fr 1fr auto;
  gap: 1.2rem;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule-soft);
}

.lb-rank {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text-mute);
  text-align: center;
}

.lb-name {
  font-family: var(--font-body);
  font-size: 1.05rem;
}
.lb-ticker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--amber);
  margin-left: 0.5rem;
}
.lb-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-mute);
  display: block;
  margin-top: 0.2rem;
}

.sentiment-bar {
  display: flex;
  height: 6px;
  width: 100%;
  background: var(--rule-soft);
  overflow: hidden;
}
.sentiment-bar > span {
  height: 100%;
  transition: width 0.25s;
}
.sentiment-bar .bull { background: var(--green); }
.sentiment-bar .neut { background: var(--text-mute); }
.sentiment-bar .mix  { background: var(--amber); }
.sentiment-bar .bear { background: var(--red); }

.sentiment-legend {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-mute);
  margin-top: 0.4rem;
  display: flex;
  gap: 0.8rem;
}
.sentiment-legend .lc { display: inline-block; width: 8px; height: 8px; margin-right: 0.3rem; vertical-align: middle; }
.sentiment-legend .lc.bull { background: var(--green); }
.sentiment-legend .lc.neut { background: var(--text-mute); }
.sentiment-legend .lc.mix  { background: var(--amber); }
.sentiment-legend .lc.bear { background: var(--red); }

.lb-mentions {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--text);
  white-space: nowrap;
}
.lb-mentions small {
  font-size: 0.7rem;
  color: var(--text-mute);
  display: block;
  text-align: right;
  margin-top: 0.1rem;
}

.themes-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.theme-chip {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--text-dim);
  padding: 0.35rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
}
.theme-chip:hover { color: var(--text); border-color: var(--text-mute); }
.theme-chip.active { color: var(--amber); border-color: var(--amber); background: var(--amber-soft); }
.theme-chip .count {
  color: var(--text-mute);
  font-size: 0.72rem;
}

.insights-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.insight-card {
  background: var(--ink-2);
  border: 1px solid var(--rule-soft);
  padding: 1.2rem 1.4rem;
  transition: border-color 0.15s;
}
.insight-card:hover { border-color: var(--rule); }

.insight-head {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
  cursor: pointer;
}
.insight-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.insight-title a { color: var(--text); }
.insight-title a:hover { color: var(--amber); }

.insight-subline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-mute);
  margin: 0.3rem 0 0;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.insight-expand {
  font-family: var(--font-mono);
  color: var(--amber);
  font-size: 0.85rem;
  flex-shrink: 0;
  user-select: none;
}

.insight-summary {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  margin: 1rem 0 0;
  line-height: 1.6;
  font-style: italic;
  color: var(--text-dim);
}

.insight-body {
  display: none;
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule-soft);
}
.insight-card.expanded .insight-body { display: block; }
.insight-card.expanded .insight-expand { transform: rotate(45deg); }

.kv-block {
  margin-bottom: 1.4rem;
}
.kv-block h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: lowercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  margin: 0 0 0.6rem;
  font-weight: 400;
}

.kv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.kv-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  border: 1px solid var(--rule);
  padding: 0.2rem 0.55rem;
}

.kv-companies {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.kv-company {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 0.8rem;
  align-items: baseline;
  font-size: 0.92rem;
  padding: 0.3rem 0;
  border-bottom: 1px dashed var(--rule-soft);
}
.kv-company .tk {
  font-family: var(--font-mono);
  color: var(--amber);
  font-size: 0.85rem;
}
.kv-company .nm { color: var(--text); }
.kv-company .ctx {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.4;
}
.kv-company .badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid;
  white-space: nowrap;
}
.badge-bull { color: var(--green); border-color: var(--green); }
.badge-bear { color: var(--red);   border-color: var(--red);   }
.badge-mix  { color: var(--amber); border-color: var(--amber); }
.badge-neut { color: var(--text-mute); border-color: var(--text-mute); }

.kv-theses, .kv-plays {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.kv-theses li {
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--text);
  line-height: 1.5;
  padding-left: 1rem;
  position: relative;
}
.kv-theses li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--amber);
}

.kv-quotes {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.kv-quote {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
  padding-left: 1rem;
  border-left: 2px solid var(--amber-deep);
}
.kv-quote .ts {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--amber-deep);
  font-style: normal;
  margin-right: 0.5rem;
}
