/* Panacea Insights — White Paper Library (PWB-WO-010 WP §22 §23).
   Consumes the site's design tokens; adds premium editorial cards, featured
   band, filters, reader typography and restrained WO-010 motion grammar.
   All motion is disabled under prefers-reduced-motion. */

/* ---- Hero ---- */
.rl-hero .lead { max-width: 62ch; }
.rl-crumb { margin: 0 0 14px; }
.rl-crumb a { color: inherit; opacity: .75; text-decoration: none; font-size: .9rem; }
.rl-crumb a:hover, .rl-crumb a:focus-visible { opacity: 1; text-decoration: underline; }

/* ---- Meta rows ---- */
.rl-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center;
  font-size: .82rem; letter-spacing: .02em; }
.rl-cat { display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: rgba(37, 99, 235, .1); color: #2563EB; font-weight: 600;
  text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; }
.rl-date, .rl-time { color: inherit; opacity: .65; }
.rl-meta-hero { margin: 6px 0 18px; }
.rl-meta-hero .rl-date, .rl-meta-hero .rl-time { opacity: .8; }

/* ---- Access page ---- */
.rl-access-split { align-items: start; }
.field-error { margin: 6px 0 0; font-size: .85rem; color: #B3261E; }
.form-msg[role="alert"] { background: #FBEAE8; color: #8C2318; border-radius: 10px;
  padding: 12px 16px; margin-bottom: 18px; }
.rl-preview-card .rl-featured-mini { border-left: 3px solid #FFCE1B; padding: 6px 0 6px 16px;
  margin: 14px 0; display: grid; gap: 6px; }

/* ---- Featured band ---- */
.rl-featured { display: grid; grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 40px; align-items: center; background: #0D1B3E; color: #fff;
  border-radius: 18px; padding: 40px; }
.rl-featured .kicker { color: #FFCE1B; }
.rl-featured h2 { color: #fff; margin: 8px 0 10px; }
.rl-featured .lead { color: rgba(255, 255, 255, .82); }
.rl-featured-cover { display: block; border-radius: 12px; overflow: hidden;
  box-shadow: 0 18px 44px rgba(2, 8, 30, .45); }
.rl-featured-cover img { display: block; width: 100%; height: auto; }
.rl-featured-band + .rl-after-featured { padding-top: 0; }

/* ---- Library grid: editorial cards, not a blog grid ---- */
.rl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px; }
.rl-card { display: flex; flex-direction: column; background: #fff;
  border: 1px solid rgba(13, 27, 62, .1); border-radius: 16px; overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease; }
.rl-card:hover, .rl-card:focus-within { border-color: rgba(13, 27, 62, .22);
  box-shadow: 0 16px 40px rgba(13, 27, 62, .12); transform: translateY(-3px); }
.rl-cover { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #EEF1F7; }
.rl-cover img { width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s ease; }
.rl-card:hover .rl-cover img { transform: scale(1.04); }
.rl-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.rl-title { margin: 0; font-size: 1.18rem; line-height: 1.3; }
.rl-title a { color: inherit; text-decoration: none; }
.rl-title a:hover, .rl-title a:focus-visible { color: #2563EB; }
.rl-summary { margin: 0; font-size: .93rem; opacity: .8; line-height: 1.55; }
.rl-actions { margin-top: auto; display: flex; gap: 18px; align-items: center; padding-top: 8px; }
.rl-read { font-weight: 700; color: #2563EB; text-decoration: none; }
.rl-read::after { content: " \2192"; transition: margin-left .2s ease; }
.rl-read:hover::after, .rl-read:focus-visible::after { margin-left: 4px; }
.rl-download { font-size: .88rem; color: inherit; opacity: .7; text-decoration: underline; }
.rl-download:hover, .rl-download:focus-visible { opacity: 1; }
.rl-read:focus-visible, .rl-download:focus-visible, .rl-filter:focus-visible {
  outline: 2px solid #2563EB; outline-offset: 3px; border-radius: 4px; }

/* ---- Filters (§21) ---- */
.rl-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.rl-filter { border: 1px solid rgba(13, 27, 62, .2); background: transparent;
  color: inherit; border-radius: 999px; padding: 8px 18px; font: inherit;
  font-size: .88rem; cursor: pointer; transition: background .2s ease, color .2s ease; }
.rl-filter:hover { background: rgba(13, 27, 62, .06); }
.rl-filter.active { background: #0D1B3E; border-color: #0D1B3E; color: #fff; }
.rl-card.rl-filtered-out { display: none; }

/* ---- Reader (§10): comfortable measure, strong hierarchy ---- */
.rl-reader { max-width: 72ch; margin-inline: auto; font-size: 1.06rem; line-height: 1.75; }
.rl-reader h2 { margin-top: 2.2em; }
.rl-reader h3 { margin-top: 1.8em; }
.rl-reader p { margin: 1em 0; }
.rl-reader ul, .rl-reader ol { padding-left: 1.4em; }
.rl-reader table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .95rem; }
.rl-reader th, .rl-reader td { border: 1px solid rgba(13, 27, 62, .15); padding: 10px 14px; text-align: left; }
.rl-reader th { background: rgba(13, 27, 62, .05); }
.rl-reader blockquote { border-left: 3px solid #FFCE1B; margin: 1.6em 0; padding: 6px 0 6px 20px;
  font-style: italic; opacity: .9; }
.rl-reader figure { margin: 1.8em 0; }
.rl-reader figcaption { font-size: .85rem; opacity: .7; margin-top: 8px; }
.rl-reader img { max-width: 100%; height: auto; }
.rl-detail-cover { border-radius: 14px; box-shadow: 0 14px 36px rgba(13, 27, 62, .16); }

/* ---- Reading progress (§23) ---- */
.rl-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60;
  background: transparent; pointer-events: none; }
.rl-progress span { display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #2563EB, #FFCE1B); }

/* ---- Reveal motion (WO-010 Motion Grammar: enter once, small, purposeful) ---- */
[data-reveal] { opacity: 0; transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease; }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---- Mobile (390px target) ---- */
@media (max-width: 720px) {
  .rl-featured { grid-template-columns: 1fr; padding: 26px 22px; gap: 22px; }
  .rl-grid { grid-template-columns: 1fr; }
  .rl-reader { font-size: 1rem; }
}

/* ---- Reduced motion: no movement, instant visibility ---- */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .rl-card, .rl-cover img, .rl-read::after { transition: none; }
  .rl-card:hover { transform: none; }
  .rl-card:hover .rl-cover img { transform: none; }
  .rl-progress { display: none; }
}
