/* ==========================================================================
   Terminal Light reader (undesigned screens, EXTEND_TO_ALL_SCREENS.md).
   Shared by the readers /articles/{slug}, /p/{slug} (article), /newsletter/{slug}
   and the /create preview. Built from tl/tokens.css + tl/components.css:
   band with a mono kicker and the H1, one reading column (max 720px, 16px /
   1.6 ink-90), mono captions, 10px media, 2px ink-rule blockquotes, and an
   optional 4-col rail of Team-style content lift cards.
   Owner: the reader/editor slice. Requires tl/*.css.
   ========================================================================== */

/* ---------- Band head ---------- */
.rd-band { padding-bottom: 22px; }
.rd-head { max-width: 860px; }
.rd-back {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px;
  font-family: var(--tl-mono); font-size: 10.5px; letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--tl-ink-45);
}
.rd-back:hover { color: var(--tl-ink); }
.rd-kicker {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px; margin: 0 0 10px;
  font-family: var(--tl-mono); font-size: 10.5px; letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--tl-ink-50);
}
.rd-kicker > * + *::before { content: '·'; margin-right: 8px; color: var(--tl-ink-35); }
.rd-kicker a:hover { color: var(--tl-ink); }
.rd-title {
  margin: 0; padding-bottom: 4px;
  font-size: 34px; font-weight: 600; letter-spacing: -0.9px; line-height: 1.2;
  color: var(--tl-ink); text-wrap: balance; overflow-wrap: anywhere;
}
.rd-dek { margin: 8px 0 0; max-width: 680px; font-size: 15px; line-height: 1.5; color: var(--tl-ink-60); text-wrap: pretty; }
.rd-byline { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 16px 0 0; }
.rd-av {
  width: 26px; height: 26px; flex: none; border-radius: 50%; object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tl-fill-07); box-shadow: 0 0 0 1px var(--tl-line-08);
  font-family: var(--tl-mono); font-size: 10px; color: var(--tl-ink-60);
}
img.rd-av { background: var(--tl-fill-07); }
.rd-author { font-size: 13.5px; font-weight: 600; color: var(--tl-ink); }
a.rd-author:hover { text-decoration: underline; text-underline-offset: 2px; }
.rd-meta { font-family: var(--tl-mono); font-size: 10.5px; letter-spacing: 0.4px; text-transform: uppercase; color: var(--tl-ink-45); }
.rd-byline .spacer { flex: 1; }
.rd-topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; }
.rd-topics .tl-chip { height: 28px; padding: 0 10px; font-size: 12.5px; }
.rd-topics .tl-chip img { width: 16px; height: 16px; object-fit: contain; background: transparent; }
.rd-topics .tl-chip img.is-round { border-radius: 50%; object-fit: cover; }

/* ---------- Layout ---------- */
.rd-col { max-width: 720px; min-width: 0; }
.rd-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rd-main > * { width: 100%; max-width: 720px; }

/* Draft / status notice above the column */
.rd-notice {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 11px 14px; font-size: 13px; color: var(--tl-ink-60);
}
.rd-notice .spacer { flex: 1; }

/* ---------- Hero media ---------- */
.rd-hero { margin: 0; }
.rd-hero img {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--tl-r-card); background: var(--tl-fill-05);
  box-shadow: inset 0 0 0 1px var(--tl-line-07);
}
.rd-hero[hidden] { display: none; }
.rd-cap, .rd-hero figcaption {
  margin: 8px 0 0; font-family: var(--tl-mono); font-size: 10.5px; letter-spacing: 0.4px;
  text-transform: uppercase; color: var(--tl-ink-45); line-height: 1.4;
}

/* ---------- Body copy ---------- */
.rd-body { font-size: 16px; line-height: 1.6; color: var(--tl-ink-90); overflow-wrap: break-word; }
.rd-body > :first-child { margin-top: 0; }
.rd-body p { margin: 0 0 16px; font-size: inherit; line-height: inherit; color: var(--tl-ink-90); }
.rd-body h2 { margin: 30px 0 10px; font-size: 20px; font-weight: 650; letter-spacing: -0.3px; line-height: 1.3; color: var(--tl-ink); }
.rd-body h3 { margin: 24px 0 8px; font-size: 17px; font-weight: 650; letter-spacing: -0.2px; line-height: 1.35; color: var(--tl-ink); }
.rd-body strong, .rd-body b { font-weight: 650; color: var(--tl-ink); }
.rd-body a:not([class]), .rd-link {
  color: var(--tl-ink); font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--tl-line-20); text-underline-offset: 3px;
}
.rd-body a:not([class]):hover, .rd-link:hover { text-decoration-color: var(--tl-ink); }
.rd-body blockquote {
  margin: 24px 0; padding: 2px 0 2px 18px;
  border: 0; border-left: 2px solid var(--tl-ink); border-radius: 0; background: transparent;
  font-size: 17px; font-weight: 500; font-style: normal; line-height: 1.5; letter-spacing: -0.1px; color: var(--tl-ink);
}
.rd-body blockquote p { margin: 0; color: var(--tl-ink); }
.rd-body blockquote cite {
  display: block; margin-top: 8px; font-style: normal;
  font-family: var(--tl-mono); font-size: 10.5px; font-weight: 400; letter-spacing: 0.4px; text-transform: uppercase; color: var(--tl-ink-50);
}
.rd-body hr { width: 72px; height: 0; margin: 30px 0; border: 0; border-top: 2px solid var(--tl-line-18); }
.rd-body figure { margin: 22px 0; }
.rd-body figure img, .rd-body > img {
  display: block; width: 100%; height: auto; border-radius: var(--tl-r-card); background: var(--tl-fill-05);
}
.rd-body figcaption { margin: 8px 0 0; font-family: var(--tl-mono); font-size: 10.5px; letter-spacing: 0.4px; text-transform: uppercase; color: var(--tl-ink-45); line-height: 1.4; }
.rd-body ul, .rd-body ol { margin: 0 0 16px; padding-left: 22px; }
.rd-body li { margin: 0 0 6px; list-style: inherit; }
.rd-body li::marker { color: var(--tl-ink-45); }

/* Inline entity chip (/p articles): a small outline chip, TL chip vocabulary */
.rd-chip {
  display: inline-flex; align-items: center; gap: 5px; margin: 0 1px; padding: 0 7px 0 4px;
  height: 24px; vertical-align: -3px;
  border-radius: var(--tl-r-pill); border: 1px solid var(--tl-line-10); background: var(--tl-control);
  font-size: 14px; font-weight: 600; line-height: 1; color: var(--tl-ink);
}
.rd-chip:hover { border-color: var(--tl-line-18); }
.rd-chip img { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; background: transparent; }

/* Tables inside the body scroll in their own card */
.rd-table-wrap { margin: 20px 0; border-radius: var(--tl-r-card); border: 1px solid var(--tl-line-07); background: var(--tl-card-bg); box-shadow: var(--tl-card-shadow); }
.rd-table-wrap table.tl-table { font-size: 13.5px; }

/* ---------- Rail: content lift cards (Team "content" card) ---------- */
.rd-rail-list { display: flex; flex-direction: column; gap: 14px; }
.rd-lift { display: flex; flex-direction: column; color: var(--tl-ink); }
.rd-lift-media {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--tl-fill-07) center / cover no-repeat;
}
.rd-lift-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: transparent; }
.rd-lift-media.is-empty { display: flex; align-items: center; justify-content: center; }
.rd-lift-media.is-empty img { position: static; width: 34px; height: 34px; opacity: 0.35; filter: grayscale(1); border-radius: 8px; }
.rd-lift-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.rd-lift-kicker { font-family: var(--tl-mono); font-size: 10px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--tl-ink-50); }
.rd-lift-title { font-size: 14.5px; font-weight: 600; line-height: 1.35; text-wrap: pretty; }
.rd-lift-sub { font-size: 12px; line-height: 1.45; color: var(--tl-ink-50); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Numbered source rows ---------- */
.rd-sources { margin: 0; padding: 0; list-style: none; }
.rd-source {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: baseline;
  padding: 9px 18px; border-top: 1px solid var(--tl-line-05); scroll-margin-top: calc(var(--tl-topbar-h) + 16px);
}
.rd-source:first-child { border-top: 0; }
.rd-source:target { background: var(--tl-fill-045); }
.rd-source-title { font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--tl-ink); }
.rd-source-title:hover { text-decoration: underline; text-underline-offset: 2px; }
.rd-source-meta { display: block; margin-top: 2px; font-family: var(--tl-mono); font-size: 10.5px; letter-spacing: 0.4px; text-transform: uppercase; color: var(--tl-ink-45); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .rd-rail { position: static; }
  .rd-rail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 560px) {
  .rd-rail-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .rd-title { font-size: 28px; letter-spacing: -0.7px; }
  .rd-dek { font-size: 14.5px; }
  .rd-band { padding-bottom: 18px; }
  .rd-body { font-size: 16px; }
  .rd-body blockquote { font-size: 16px; }
  .rd-source { padding-left: 14px; padding-right: 14px; }
}
