/* RipplEffekt Research: Academy section, front-page strip, and reader.
 *
 * Colour tokens come from css/research-tokens.css, which is GENERATED from
 * scripts/research/brand.py. Do not hardcode a chart colour here.
 *
 * Card geometry deliberately matches .ac-blog-card on the Academy page so the
 * research row and the blog rows read as one system.
 */

/* ── Shared ───────────────────────────────────────────────────────────── */

.rr-eyebrow {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--re-blue, #1A3668);
}

.rr-byline {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0;
}
.rr-byline__avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--re-bg-section, #EEF3F8);
  border: 1px solid var(--re-border, #E5E7EB);
  flex-shrink: 0;
}
.rr-byline__name { font-size: .92rem; font-weight: 700; color: var(--re-text, #111827); }
.rr-byline__role { font-size: .8rem; color: var(--re-text-muted, #6B7280); }

.rr-vintage {
  font-size: .78rem;
  color: var(--re-text-muted, #6B7280);
  font-variant-numeric: tabular-nums;
}

/* ── Academy: the research section ────────────────────────────────────── */

.rr-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  padding: 1.6rem;
  border: 1px solid var(--re-border, #dde4ec);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 16px rgba(26, 54, 104, .07);
}
@media (max-width: 860px) {
  .rr-hero { grid-template-columns: 1fr; gap: 1.2rem; }
}
/* No figure yet: one column, so the card never shows an empty half. */
.rr-hero--single { grid-template-columns: 1fr; }

.rr-hero__title {
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin: .5rem 0 .6rem;
  color: var(--re-blue, #1A3668);
}
.rr-hero__sub { font-size: .95rem; color: var(--re-text-muted, #6B7280); margin: 0 0 1rem; line-height: 1.55; }
.rr-hero__figure { width: 100%; height: auto; display: block; border-radius: 10px; }

.rr-progress {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 1rem 0 .2rem;
  font-size: .82rem;
  color: var(--re-text-muted, #6B7280);
}
.rr-progress__track {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--re-bg-section, #EEF3F8);
  overflow: hidden;
}
.rr-progress__fill { height: 100%; background: var(--rr-cat-1, #2352DC); border-radius: 3px; }

/* Chapter list: published chapters live, scheduled ones visible but quiet.
   Showing the unwritten titles is the commitment, so they must not be hidden. */
.rr-chapters { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: .5rem; }
.rr-part-head {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--re-text-muted, #6B7280); margin: 1.1rem 0 .2rem;
}
.rr-chapter {
  display: flex; align-items: baseline; gap: .8rem;
  padding: .72rem .9rem;
  border: 1px solid var(--re-border, #E5E7EB);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s, transform .15s;
}
a.rr-chapter:hover { box-shadow: 0 8px 22px rgba(15, 31, 51, .09); transform: translateY(-1px); }
.rr-chapter--scheduled { background: transparent; border-style: dashed; opacity: .72; }
.rr-chapter__num {
  font-variant-numeric: tabular-nums;
  font-weight: 700; font-size: .82rem;
  color: var(--re-text-muted, #6B7280);
  min-width: 1.6rem;
}
.rr-chapter__title { flex: 1; font-size: .95rem; line-height: 1.4; }
.rr-chapter__when { font-size: .76rem; color: var(--re-text-muted, #6B7280); white-space: nowrap; }

/* ── Front-page strip ─────────────────────────────────────────────────── */

.rr-strip__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 1.1rem;
  align-items: stretch;
}
@media (max-width: 900px) { .rr-strip__grid { grid-template-columns: 1fr; } }

.rr-card {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1.35rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(26, 54, 104, .06);
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s, transform .15s;
}
a.rr-card:hover { box-shadow: 0 10px 28px rgba(15, 31, 51, .10); transform: translateY(-2px); }
.rr-card h3 { font-size: 1rem; font-weight: 700; color: #0f172a; margin: 0; line-height: 1.35; }
.rr-card p { font-size: .85rem; color: #64748b; margin: 0; line-height: 1.55; flex: 1; }
.rr-card__meta { font-size: .75rem; color: #94a3b8; }
.rr-card__figure { width: 100%; height: auto; border-radius: 8px; display: block; }

/* The side column holds one or two cards against a tall hero card. `start`
   left dead space under them whenever the hero was taller, which is most of
   the time. Equal rows + stretch makes the column fill its height, so the
   strip reads as two aligned columns rather than one column and a gap. */
.rr-side {
  display: grid;
  gap: 1.1rem;
  grid-auto-rows: 1fr;
  align-content: stretch;
}

/* ── Chapter navigation (reader) ──────────────────────────────────────── */

.rr-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2.6rem 0 1.2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--re-border, #E5E7EB);
}
@media (max-width: 620px) { .rr-nav { grid-template-columns: 1fr; } }

.rr-nav__slot {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: .95rem 1.1rem;
  border: 1px solid var(--re-border, #E5E7EB);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s, transform .15s;
  min-height: 100%;
}
a.rr-nav__slot:hover { box-shadow: 0 8px 22px rgba(15, 31, 51, .09); transform: translateY(-1px); }
/* Holds the grid column at an end of the series so the remaining button keeps
   its side instead of sliding across. Invisible, not a disabled control. */
.rr-nav__slot--empty { border: 0; background: none; pointer-events: none; }
@media (max-width: 620px) { .rr-nav__slot--empty { display: none; } }

.rr-nav__slot--next { text-align: right; align-items: flex-end; }
.rr-nav__dir { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--re-text-muted, #6B7280); }
.rr-nav__title { font-size: .95rem; font-weight: 600; line-height: 1.4; }
.rr-nav__all { margin: 0; }

/* ── Reader ───────────────────────────────────────────────────────────── */

.rr-reader { max-width: 760px; margin: 0 auto; }
.rr-reader__title {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 800; line-height: 1.17;
  color: var(--re-blue, #1A3668);
  margin: .6rem 0 .9rem;
}
.rr-reader__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  padding-bottom: 1.2rem; margin-bottom: 1.8rem;
  border-bottom: 1px solid var(--re-border, #E5E7EB);
}
.rr-reader p { font-size: 1.02rem; line-height: 1.72; color: var(--re-text, #111827); margin: 0 0 1.15rem; }

.rr-figure { margin: 2rem 0; }
.rr-figure img, .rr-figure object { width: 100%; height: auto; display: block; }
.rr-figure__foot {
  display: flex; flex-wrap: wrap; gap: .8rem; align-items: center;
  margin-top: .7rem; font-size: .8rem; color: var(--re-text-muted, #6B7280);
}
.rr-figure__csv {
  font-weight: 600;
  color: var(--re-link, #2B5CE7);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

/* "What this does not show". Candour is a stated part of the format, so it is
   given a visible block rather than a footnote. */
.rr-limitation {
  margin: 1.8rem 0;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--re-gold, #b3882f);
  background: #FBFAF7;
  border-radius: 0 10px 10px 0;
}
.rr-limitation__label {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--re-gold, #b3882f); margin: 0 0 .35rem;
}
.rr-limitation p { font-size: .92rem; line-height: 1.6; margin: 0; color: var(--re-text-light, #4B5563); }

.rr-note {
  margin: 1.8rem 0;
  padding: 1.2rem 1.35rem;
  background: var(--re-bg-section, #EEF3F8);
  border-radius: 12px;
}
.rr-note__label {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--re-text-muted, #6B7280); margin: 0 0 .5rem;
}
.rr-note p { font-size: .96rem; line-height: 1.65; margin: 0; font-style: italic; }

.rr-empty {
  padding: 1.4rem 1.5rem;
  border: 1px dashed var(--re-border, #cfd8e2);
  border-radius: 12px;
  color: var(--re-text-muted, #5a6673);
  background: #fff;
}

/* ── Corrections ──────────────────────────────────────────────────────── */

.rr-correction {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--re-border, #E5E7EB);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 1rem;
}
.rr-correction__date {
  font-size: .78rem; color: var(--re-text-muted, #6B7280);
  font-variant-numeric: tabular-nums;
}
.rr-correction h3 { font-size: 1rem; margin: .3rem 0 .5rem; }
.rr-correction p { font-size: .92rem; line-height: 1.6; margin: 0; color: var(--re-text-light, #4B5563); }
