/* The Gate: rich blocks in the Musafir Journal reader (HTML, lists, charts in CMS essays).
   Component rules come from journal/post.css (data-essay components), scoped to .mj-rich
   and fed with the Gate tokens. Generated by hand from post.css; keep in step with it. */
html{--blue-bright:#7ab8ff;--blue-mid:#2a7fd4;--gold-mid:#c8a96e;--cyan:#4dd9e8;--text-primary:#dfe8f7;--text-secondary:#9db4d6;--text-muted:#9db4d6;--raised:#0d1b35;--glass-2:rgba(122,184,255,.06);--glass-border:#1c2f55}
html[data-theme=light]{--blue-bright:#1a5fa8;--blue-mid:#1a5fa8;--gold-mid:#7a5a1c;--cyan:#1f6f7a;--text-primary:#0d1b35;--text-secondary:#46587a;--text-muted:#46587a;--raised:#fbf8f2;--glass-2:rgba(13,27,53,.04);--glass-border:#d9d0bf}
.mj-rich{display:flex;flex-direction:column;gap:18px}
.mj-rich>*{margin:0}
.mj-rich p{margin:0}
.mj-rich a{color:var(--blue-bright)}
.mj-rich ul,.mj-rich ol{margin:0;padding-inline-start:1.4em;display:flex;flex-direction:column;gap:8px}
.mj-rich blockquote{margin:0;padding-inline-start:16px;border-inline-start:2px solid var(--glass-border);font-style:italic}
.mj-rich img{max-width:100%;height:auto;border-radius:18px}
.mj-rich table{border-collapse:collapse;width:100%;font-size:15px}
.mj-rich th,.mj-rich td{border-bottom:1px solid var(--glass-border);padding:8px;text-align:start}
/* Eyebrow — small-caps label above a section, e.g. "The AI Paradox" */
.mj-rich .post-eyebrow {
  display: block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 2.75rem 0 1rem;
}
.mj-rich .post-eyebrow:first-child { margin-top: 0; }

/* Shared glass-panel wrapper for stat grids and charts */
.mj-rich .post-datacard {
  margin: 2.5rem 0;
  padding: 1.75rem 1.5rem;
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
  border-radius: 16px;
}
.mj-rich .post-datacard-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.mj-rich .post-datacard-headline {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1.4rem;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}
.mj-rich .post-datacard-note {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: 1.25rem;
}

/* Stat grid */
.mj-rich .post-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.85rem;
}
.mj-rich .post-stat-card {
  background: var(--raised);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 1.25rem 1rem;
  text-align: center;
}
.mj-rich .post-stat-num {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}
.mj-rich .post-stat-num--gold { color: var(--gold-mid); }
.mj-rich .post-stat-num--blue { color: var(--blue-bright); }
.mj-rich .post-stat-num--cyan { color: var(--cyan); }
.mj-rich .post-stat-label {
  display: block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-secondary);
}

/* Chart card */
.mj-rich .post-chart-wrap { position: relative; height: 280px; margin-top: 0.5rem; }
.mj-rich .post-chart-legend {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--text-secondary);
}
.mj-rich .post-chart-legend span { display: inline-flex; align-items: center; gap: 0.5rem; }
.mj-rich .post-chart-legend i {
  display: inline-block;
  width: 18px;
  height: 2px;
  background: currentColor;
}

/* Compare bars — reused for both 2-row "swing" comparisons and
   multi-row engagement comparisons; widths are animated from
   data-value by post-charts.js when scrolled into view */
.mj-rich .post-compare { margin: 2.5rem 0; }
.mj-rich .post-compare-row + .post-compare-row { margin-top: 1rem; }
.mj-rich .post-compare-label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}
.mj-rich .post-compare-label .post-compare-value { color: var(--text-primary); font-weight: 700; }
.mj-rich .post-compare-track {
  height: 34px;
  background: rgba(120, 132, 160, 0.16);
  border-radius: 4px;
  overflow: hidden;
}
.mj-rich .post-compare-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.mj-rich .post-compare-fill--strong { background: var(--blue-mid); }
.mj-rich .post-compare-fill--muted { background: rgba(120, 132, 160, 0.55); }
.mj-rich .post-compare-delta {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.35rem 0.85rem;
  background: var(--raised);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-mid);
}

/* Closing questions */
.mj-rich .post-closing {
  margin: 3rem 0 0;
  padding: 2rem 1.75rem;
  background: var(--raised);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}
.mj-rich .post-closing-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-mid);
  margin-bottom: 1.25rem;
}
.mj-rich .post-closing-list {
  list-style: none;
  counter-reset: post-closing;
  margin: 0;
}
.mj-rich .post-closing-list li {
  counter-increment: post-closing;
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text-primary);
}
.mj-rich .post-closing-list li + li { margin-top: 1rem; }
.mj-rich .post-closing-list li::before {
  content: counter(post-closing, decimal-leading-zero);
  flex-shrink: 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-mid);
  padding-top: 0.2rem;
}
@media (max-width: 600px) {
.mj-rich .post-datacard { padding: 1.25rem 1rem; margin: 2rem 0; }
.mj-rich .post-datacard-headline { font-size: 1.2rem; }
.mj-rich .post-stat-num { font-size: 1.7rem; }
.mj-rich .post-chart-wrap { height: 220px; }
.mj-rich .post-closing { padding: 1.5rem 1.25rem; }
}
