/* ── Design tokens ─────────────────────────────────────────────────── */
:root {
  --bg-deep:        #0c1220;
  --bg:             #111827;
  --bg-card:        #1a2332;
  --bg-card-hover:  #1f2b3d;
  --border:         rgba(255,255,255,0.08);
  --border-hover:   rgba(255,255,255,0.15);
  --text:           #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --gold:           #d4a017;
  --gold-soft:      #c8961a;
  --gold-glow:      rgba(212,160,23,0.15);
  --green:          #34d399;
  --green-glow:     rgba(52,211,153,0.12);
  --purple:         #a78bfa;
  --rust:           #fb923c;
  --radius:         12px;
  --radius-sm:      8px;
}

/* ── Reset & base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

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

/* ── Site header ───────────────────────────────────────────────────── */
.site-header {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
  letter-spacing: -0.5px;
}
.site-title:hover { text-decoration: none; color: var(--gold); }

.header-search { display: flex; gap: 0.4rem; flex: 1; max-width: 480px; }
.header-search input {
  flex: 1;
  padding: 0.35rem 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.header-search input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(212,160,23,0.2);
}
.header-search button {
  padding: 0.35rem 0.9rem;
  background: var(--gold);
  color: var(--bg-deep);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.header-search button:hover { background: var(--gold-soft); }

/* ── Site wrap / footer ────────────────────────────────────────────── */
.site-wrap { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.site-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
}

/* ── Hero ───────────────────────────────────────────────────────── */
.home-hero {
  position: relative;
  text-align: center;
  padding: 4rem 1rem 3rem;
  margin-bottom: 3rem;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(212,160,23,0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}
.home-title {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 0.75rem;
  letter-spacing: -2.5px;
  line-height: 1;
  position: relative;
  z-index: 1;
}
.home-title-weave {
  background: linear-gradient(135deg, #d4a017 0%, #f59e0b 40%, #d4a017 70%, #c8961a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 100%;
  animation: shimmer 4s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.home-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}
.search-bar-wrap {
  display: flex;
  gap: 0.5rem;
  max-width: 600px;
  margin: 0 auto 0.8rem;
}
.search-bar-wrap input {
  flex: 1;
  padding: 0.65rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-bar-wrap input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,160,23,0.15);
}
.search-bar-wrap button {
  padding: 0.65rem 1.4rem;
  background: var(--gold);
  color: var(--bg-deep);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.search-bar-wrap button:hover { background: var(--gold-soft); }
.search-count { font-size: 0.9rem; color: var(--text-muted); min-height: 1.2em; }

/* ── Surprise me button ─────────────────────────────────────────────── */
.surprise-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.9rem;
  padding: 0.5rem 1.2rem;
  background: transparent;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.surprise-btn:hover {
  background: var(--gold);
  color: var(--bg-deep);
  text-decoration: none;
}

/* ── View toggle ────────────────────────────────────────────────────── */
.view-toggle {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 2rem;
}
.toggle-btn {
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--border-hover);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.toggle-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.toggle-btn--active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg-deep);
  font-weight: 600;
}

/* ── Graph section ──────────────────────────────────────────────────── */
.graph-section {
  margin-bottom: 2.5rem;
}
#graph-container {
  width: 100%;
  height: 600px;
  background: var(--bg-deep);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.graph-hint {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
}

/* ── Tag cloud / chips ─────────────────────────────────────────────── */
.topics-section { margin-bottom: 2.5rem; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ── Chips ──────────────────────────────────────────────────────── */
.chip {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--chip-color, #94a3b8) 40%, transparent);
  color: var(--chip-color, #94a3b8);
  background: color-mix(in srgb, var(--chip-color, #94a3b8) 10%, transparent);
  transition: background 0.15s, color 0.15s;
}
.chip:hover {
  background: var(--chip-color, #94a3b8);
  color: #0c1220;
  text-decoration: none;
}
.chip--lg {
  padding: 0.4rem 1rem;
  font-size: 0.82rem;
  border-radius: 8px;
}
.chip-count { opacity: 0.7; font-weight: 400; margin-left: 0.25rem; }

/* ── Section headings ──────────────────────────────────────────────── */
.section-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin: 1.8rem 0 1rem;
  letter-spacing: -0.2px;
}

/* ── Section headers ────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.5rem 0 1.25rem;
}
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  white-space: nowrap;
}
.section-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Card grid + stagger animation ─────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Cards ──────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
}
.note-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: fadeInUp 0.4s ease both;
  animation-delay: calc(var(--i, 0) * 35ms);
  position: relative;
}
.note-card::before {
  content: '';
  display: block;
  height: 3px;
  background: var(--topic-color, #94a3b8);
  flex-shrink: 0;
}
.note-card:hover {
  transform: translateY(-3px);
  border-color: var(--topic-color, #94a3b8);
  box-shadow: 0 8px 32px color-mix(in srgb, var(--topic-color, #94a3b8) 20%, transparent);
}
.note-card.hidden { display: none; }
.card-title { font-size: 0.97rem; font-weight: 700; line-height: 1.35; padding: 0.9rem 1rem 0.3rem; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--topic-color, var(--gold)); text-decoration: none; }
.card-meta { font-size: 0.72rem; color: var(--text-muted); padding: 0 1rem 0.4rem; }
.card-tldr { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; padding: 0 1rem 0.75rem; flex: 1; }
.card-tags { padding: 0.6rem 1rem 0.9rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* ── Breadcrumb ────────────────────────────────────────────────────── */
.breadcrumb {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--gold); }

/* ── Note page layout ──────────────────────────────────────────────── */
.content-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 660px) 220px;
  gap: 1.5rem;
  align-items: start;
}

/* ── Left sidebar ──────────────────────────────────────────────────── */
.sidebar-left {
  font-size: 0.85rem;
  background: var(--bg-deep);
  border-radius: var(--radius);
  padding: 1rem;
}

/* ── Right sidebar ─────────────────────────────────────────────────── */
.sidebar-right { font-size: 0.85rem; }

/* ── Shared sidebar box ────────────────────────────────────────────── */
.sidebar-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-bottom: 1rem;
}
.sidebar-heading {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.sidebar-list { list-style: none; }
.sidebar-list li { margin-bottom: 0.35rem; }
.sidebar-list--topics { max-height: 70vh; overflow-y: auto; }
.sidebar-link { color: var(--text-secondary); font-size: 0.84rem; }
.sidebar-link:hover { color: var(--gold); text-decoration: none; }
.sidebar-link--active { font-weight: 600; color: var(--gold); }
.sidebar-meta { color: var(--text-muted); font-size: 0.8rem; }

/* ── Note main ─────────────────────────────────────────────────────── */
.note-main { min-width: 0; }

.note-title {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.5rem;
  color: var(--text);
  letter-spacing: -0.5px;
}
.note-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}
.meta-channel { font-weight: 600; color: var(--text-secondary); }
.meta-sep { color: var(--border-hover); }
.source-link { color: var(--gold); }
.source-link:hover { text-decoration: underline; }
.meta-badge {
  background: rgba(212,160,23,0.1);
  color: var(--gold);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  font-size: 0.76rem;
  border: 1px solid rgba(212,160,23,0.25);
}
.note-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1.3rem; }

/* ── TL;DR box ─────────────────────────────────────────────────────── */
.tldr-box {
  background: rgba(212,160,23,0.08);
  border-left: 3px solid var(--gold);
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.tldr-text { font-style: italic; color: var(--text-secondary); line-height: 1.7; }

/* ── Key concepts table ────────────────────────────────────────────── */
.concepts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
.concepts-table th,
.concepts-table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.concepts-table thead tr th {
  background: var(--bg-deep);
  font-weight: 600;
  color: var(--text-secondary);
  font-family: 'Inter', system-ui, sans-serif;
}
.concepts-table tbody tr:nth-child(even) td {
  background: rgba(255,255,255,0.02);
}
.concept-name {
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.84rem;
}

/* ── Note sections ─────────────────────────────────────────────────── */
.note-section { margin-bottom: 1.5rem; }
.empty-state { color: var(--text-muted); font-style: italic; }

/* ── Takeaways (legacy stub — superseded by new rules below) ────────── */

/* ── Quotes (legacy stub — superseded by new rules below) ──────────── */

/* ── Topic page ─────────────────────────────────────────────────── */
.topic-header { margin-bottom: 1.5rem; }
.topic-color-bar {
  height: 4px;
  width: 3rem;
  background: var(--topic-color, #94a3b8);
  border-radius: 99px;
  margin-bottom: 0.75rem;
}
.page-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.topic-count { font-size: 0.85rem; color: var(--text-muted); }

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .content-layout {
    grid-template-columns: 1fr;
  }
  .sidebar-left { order: 2; padding: 0.75rem; }
  .note-main   { order: 1; }
  .sidebar-right { order: 3; }
  .sidebar-list--topics { max-height: 200px; }

  .home-title { font-size: clamp(1.75rem, 8vw, 2.5rem); }
  .card-grid { grid-template-columns: 1fr; }
  .view-toggle { flex-wrap: wrap; }
  #graph-container { height: 400px; }
}

/* ── Hero accent ────────────────────────────────────────────────── */
.hero-accent {
  color: var(--gold);
  font-weight: 700;
}

/* ── Stats bar ──────────────────────────────────────────────────── */
.stats-bar {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin: 0 auto 2rem;
  position: relative;
  z-index: 1;
}
.stat {
  padding: 0.6rem 1.4rem;
  text-align: center;
}
.stat-num {
  display: block;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -1px;
}
.stat-label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 1px;
}
.stat-divider {
  width: 1px;
  height: 2rem;
  background: var(--border);
  flex-shrink: 0;
}

/* ── TL;DR lead section ────────────────────────────────────────── */
.tldr-block {
  margin: 1.5rem 0 2rem;
  padding: 1.25rem 1.5rem;
  background: rgba(212,160,23,0.06);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.tldr-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.6rem;
}
.tldr-lead {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-style: italic;
}

/* ── Concept flashcards ─────────────────────────────────────────── */
.concepts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}
.concept-card {
  perspective: 700px;
  cursor: pointer;
  min-height: 100px;
  border-radius: var(--radius-sm);
}
.concept-inner {
  position: relative;
  width: 100%;
  min-height: 100px;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}
.concept-card.flipped .concept-inner { transform: rotateY(180deg); }
.concept-front, .concept-back {
  position: absolute;
  inset: 0;
  min-height: 100px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  padding: 1rem;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold);
  background: var(--bg-card);
}
.concept-back {
  transform: rotateY(180deg);
  background: rgba(212,160,23,0.07);
  border-top-color: var(--gold-soft);
  justify-content: center;
}
.concept-card:hover .concept-front,
.concept-card:hover .concept-back {
  box-shadow: 0 4px 20px var(--gold-glow);
  border-color: rgba(212,160,23,0.4);
}
.concept-term {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.concept-flip-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.4rem;
}
.concept-def {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── Section marker ────────────────────────────────────────────── */
.note-subsection {
  margin-bottom: 1.5rem;
}
.section-marker {
  color: var(--gold);
  font-weight: 400;
  margin-right: 0.5rem;
  opacity: 0.7;
}
.note-h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.5rem 0 0.6rem;
  letter-spacing: -0.2px;
}

/* ── Note bullets ───────────────────────────────────────────────── */
.note-bullets {
  list-style: none;
  padding-left: 0;
  margin: 0.4rem 0;
}
.note-bullets li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.45rem;
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 0.97rem;
}
.note-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--gold);
  opacity: 0.6;
  font-size: 0.75rem;
  top: 0.2rem;
}

/* ── Takeaways ──────────────────────────────────────────────────── */
.takeaways-block {
  background: rgba(52,211,153,0.05);
  border: 1px solid rgba(52,211,153,0.15);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}
.takeaways-heading {
  color: var(--green) !important;
  border-color: rgba(52,211,153,0.2) !important;
}
.takeaways-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.takeaway-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.takeaway-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid var(--green);
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.takeaway-text {
  padding-top: 0.25rem;
  font-size: 0.97rem;
  color: var(--text);
  line-height: 1.6;
}

/* ── Quote blocks ───────────────────────────────────────────────── */
.quotes-section { margin: 2rem 0; }
.quote-block {
  position: relative;
  padding: 1.2rem 1.5rem 1.2rem 3rem;
  margin: 1rem 0;
  border-left: 3px solid var(--purple);
  background: rgba(167,139,250,0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.quote-mark {
  position: absolute;
  left: 0.7rem;
  top: 0.4rem;
  font-size: 2.2rem;
  color: var(--purple);
  opacity: 0.5;
  font-family: Georgia, serif;
  line-height: 1;
}
.quote-text {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.97rem;
  line-height: 1.7;
}

/* ── Read time badge ────────────────────────────────────────────── */
.read-time {
  background: rgba(212,160,23,0.1);
  color: var(--gold);
  border: 1px solid rgba(212,160,23,0.25);
  border-radius: 99px;
  padding: 0.1rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ── Rabbit hole ────────────────────────────────────────────────── */
.rabbit-hole {
  margin: 2.5rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.rabbit-hole-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.rabbit-hole-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.2rem 1.4rem;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.rabbit-hole-card:hover {
  background: var(--bg-card-hover);
  border-left-color: var(--gold);
  box-shadow: 0 4px 24px var(--gold-glow);
  transform: translateX(4px);
  text-decoration: none;
}
.rh-meta {
  font-size: 0.73rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}
.rh-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: -0.2px;
}
.rh-tldr {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 0.8rem;
  font-style: italic;
}
.rh-cta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
}

/* ── Copy quote button ──────────────────────────────────────────── */
.quote-block { position: relative; }
.quote-copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.2rem 0.45rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  line-height: 1;
}
.quote-copy-btn:hover { color: var(--gold); border-color: rgba(212,160,23,0.4); background: var(--gold-glow); }
.quote-copy-btn.copied { color: var(--green); border-color: rgba(52,211,153,0.4); }

/* ── Takeaway checkboxes ────────────────────────────────────────── */
.takeaway-check { display: contents; cursor: pointer; }
.takeaway-check input[type=checkbox] { display: none; }
.takeaway-item.done .takeaway-text {
  text-decoration: line-through;
  color: var(--text-muted);
}
.takeaway-item.done .takeaway-num {
  background: var(--green);
  border-color: var(--green);
  color: var(--bg-deep);
}
.takeaway-num { cursor: pointer; user-select: none; }

/* ── Reading progress ───────────────────────────────────────────── */
.reading-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem auto 0;
  max-width: 400px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.rp-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.rp-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 99px;
  transition: width 0.6s ease;
  width: 0%;
}

/* ── Scroll reveal ──────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.45s ease, transform 0.45s ease; }
.reveal.visible { opacity: 1; transform: none; }
