/* Reading family — Guides hub, articles (M1, audit §W2 family 3 / §W4).

   One layout contract for every page whose job is "read, understand, then
   act". Tokens come from rc-system.css only (via design-system.css); this
   file declares no custom property and no radius. Desktop ≥1024px: a
   700px text column + a mandatory 300px aside inside the 1200px Front
   width, left aligned, so a narrow column never sits beside dead space.
   Mobile: 16px gutters, 17px body, no aside — the "Use this in RC" card
   appears after the intro and at the end. Text never animates in (§W7). */

.rc-reading {
  max-width: var(--rc-w-front);
  margin: 0 auto;
  padding: var(--rc-section-y) var(--rc-gutter);
  color: var(--rc-ink);
  font: var(--rc-text-body-lg);
}
@media (min-width: 1024px) {
  .rc-reading { padding-left: var(--rc-space-12); padding-right: var(--rc-space-12); }
  .rc-reading-grid {
    display: grid;
    grid-template-columns: minmax(0, var(--rc-w-reading-text)) var(--rc-w-reading-aside);
    justify-content: space-between;
    column-gap: var(--rc-section-gap);
    align-items: start;
  }
  .rc-use.rc-reading-inline { display: none; }
}
@media (max-width: 1023.98px) {
  .rc-reading-aside.rc-reading-aside { display: none; }
}

/* ── Title block ─────────────────────────────────────────────────────── */
.rc-reading-head { margin-bottom: var(--rc-section-gap); }
.rc-reading-head .rc-microlabel { margin-bottom: var(--rc-space-3); }
.rc-reading h1 { margin: 0; font: var(--rc-text-h1); letter-spacing: -.02em; color: var(--rc-ink); max-width: 22ch; }
.rc-reading-lede { margin: var(--rc-space-4) 0 0; font: var(--rc-text-body-lg); color: var(--rc-ink-2); max-width: var(--rc-measure); }
.rc-reading-meta { margin: var(--rc-space-4) 0 0; font: var(--rc-text-small); color: var(--rc-ink-3); }

/* ── Article body ────────────────────────────────────────────────────── */
.rc-reading-body section { margin-bottom: var(--rc-section-gap); }
.rc-reading-body h2 { margin: 0 0 var(--rc-space-4); font: var(--rc-text-h2); letter-spacing: -.015em; color: var(--rc-ink); }
.rc-reading-body h3 { margin: var(--rc-space-6) 0 var(--rc-space-3); font: var(--rc-text-h3); color: var(--rc-ink); }
.rc-reading-body p { margin: 0 0 var(--rc-space-4); color: var(--rc-ink-2); }
.rc-reading-body ul:not(.rc-hub-rows) { margin: var(--rc-space-3) 0 var(--rc-space-4) var(--rc-space-5); padding: 0; color: var(--rc-ink-2); }
.rc-reading-body li { margin-bottom: var(--rc-space-2); }
.rc-reading-body strong { color: var(--rc-ink); font-weight: 500; }
.rc-reading-body a:not(.rc-btn):not(.rc-hub-row) { color: var(--rc-ink); text-decoration: underline; text-underline-offset: 3px; }
.rc-reading-source { font: var(--rc-text-small); color: var(--rc-ink-3); }

/* A data table: hairlines, figures in mono, never a nested card. */
.rc-reading-table { width: 100%; border-collapse: collapse; margin: var(--rc-space-4) 0; font: var(--rc-text-body); }
.rc-reading-table caption { text-align: left; font: 500 15px/1.3 var(--rc-font-ui); color: var(--rc-ink); padding-bottom: var(--rc-space-3); }
.rc-reading-table th { text-align: left; font: var(--rc-type-label); color: var(--rc-ink-3); padding: var(--rc-space-2) var(--rc-space-3) var(--rc-space-2) 0; border-bottom: 1px solid var(--rc-ink); }
.rc-reading-table td { padding: var(--rc-space-3) var(--rc-space-3) var(--rc-space-3) 0; border-bottom: 1px solid var(--rc-line); color: var(--rc-ink-2); vertical-align: top; }
.rc-reading-table td.rc-fig, .rc-reading-table th.rc-fig { text-align: right; padding-right: 0; }
.rc-reading-table td.rc-fig { font-family: var(--rc-font-mono); font-variant-numeric: tabular-nums; color: var(--rc-ink); white-space: nowrap; }
/* M7-C — a figure column cell that holds words ("Per tariff") keeps the column's alignment, in the UI face. */
.rc-reading-table td.rc-fig--words { font-family: var(--rc-font-ui); white-space: normal; hyphens: manual; }
.rc-reading-table tr.is-total td { border-top: 1px solid var(--rc-ink); border-bottom: 0; font-weight: 500; color: var(--rc-ink); }
.rc-reading-note { margin: var(--rc-space-2) 0 0; font: var(--rc-text-small); color: var(--rc-ink-3); }

/* FAQ: question + answer rows on hairlines. */
.rc-reading-faq > div { border-top: 1px solid var(--rc-line); padding: var(--rc-space-5) 0; }
.rc-reading-faq h3 { margin: 0 0 var(--rc-space-2); font: 500 17px/1.35 var(--rc-font-ui); }
.rc-reading-faq p { margin: 0; }

/* ── Aside: "Use this in RC", contents, sources ─────────────────────── */
.rc-reading-aside { display: grid; gap: var(--rc-space-8); align-content: start; }
.rc-reading-aside nav ol { list-style: none; margin: var(--rc-space-3) 0 0; padding: 0; border-top: 1px solid var(--rc-line); }
.rc-reading-aside nav li { border-bottom: 1px solid var(--rc-line); }
.rc-reading-aside nav a { display: flex; align-items: center; min-height: var(--rc-control-h); font: var(--rc-text-small); color: var(--rc-ink-2); text-decoration: none; }
.rc-reading-aside nav a:hover { color: var(--rc-ink); text-decoration: underline; }
.rc-reading-aside .rc-reading-sources p { margin: var(--rc-space-2) 0 0; font: var(--rc-text-small); color: var(--rc-ink-3); }

/* The one contextual action (§W4): a square card, one primary. */
.rc-use {
  background: var(--rc-surface);
  border: 1px solid var(--rc-line);
  border-top: 2px solid var(--rc-ink);
  padding: var(--rc-space-5);
  display: grid;
  gap: var(--rc-space-3);
}
.rc-use h2, .rc-use h3, .rc-reading-body .rc-use h2 { margin: 0; font: 500 17px/1.3 var(--rc-font-ui); color: var(--rc-ink); }
.rc-use p { margin: 0; font: var(--rc-text-small); color: var(--rc-ink-2); }
.rc-reading-body .rc-use { margin: var(--rc-section-gap) 0; }

/* ── Hub: square rows, no navy hero, no rounded cards (§I8) ─────────── */
.rc-hub-group { margin-bottom: var(--rc-section-gap); }
.rc-reading-body .rc-hub-group > h2 { margin: 0; padding-bottom: var(--rc-space-3); font: var(--rc-type-h3); color: var(--rc-ink); border-bottom: 2px solid var(--rc-ink); }
/* Hub rows: the hairline sits on the item; the row is inset by one step and
   outdented by the same step, so its text keeps the heading's left edge
   while the hover ground and focus ring clear the title and the date. */
.rc-hub-rows { list-style: none; margin: var(--rc-space-1) 0 0; padding: 0; }
.rc-hub-rows > li { border-bottom: 1px solid var(--rc-line); }
.rc-hub-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--rc-space-8);
  align-items: baseline;
  margin-inline: calc(-1 * var(--rc-space-4));
  padding: var(--rc-space-5) var(--rc-space-4);
  color: var(--rc-ink);
  text-decoration: none;
  min-height: var(--rc-control-h);
  transition: background-color var(--rc-dur-press) var(--rc-ease-exit);
}
@media (hover: hover) {
  .rc-hub-row:hover { background: var(--rc-surface); }
  .rc-hub-row:hover .rc-hub-title { text-decoration: underline; text-underline-offset: 3px; }
}
.rc-hub-row:focus-visible { outline-offset: -2px; }
.rc-hub-title { display: block; font: 500 19px/1.3 var(--rc-font-ui); letter-spacing: -.01em; }
.rc-hub-desc { display: block; max-width: 60ch; margin-top: var(--rc-space-1); font: var(--rc-text-small); color: var(--rc-ink-2); }
.rc-hub-meta { font: var(--rc-type-caption); color: var(--rc-ink-3); white-space: nowrap; }

@media (max-width: 767.98px) {
  .rc-reading { font-size: 17px; }
  .rc-reading h1 { font-size: 32px; line-height: 1.1; }
  .rc-reading-body h2 { font-size: 24px; line-height: 1.15; }
  .rc-reading-body h3 { font-size: 18px; }
  .rc-reading-table { font-size: 14px; table-layout: fixed; }
  .rc-reading-table th, .rc-reading-table td { overflow-wrap: anywhere; hyphens: auto; }
  .rc-reading-table td.rc-fig { white-space: normal; }
  /* Half the outdent on a phone: the ring and hover ground stay 8px off the screen edge. */
  .rc-hub-row { grid-template-columns: minmax(0, 1fr); row-gap: var(--rc-space-3); margin-inline: calc(-1 * var(--rc-space-2)); padding-inline: var(--rc-space-2); }
  .rc-hub-title { font-size: 18px; }
  .rc-hub-desc { font-size: 15px; }
  .rc-use { padding: var(--rc-space-4); }
}
.rc-reading-table .rc-fig + td, .rc-reading-table .rc-fig + th { padding-left: var(--rc-space-6); }

/* ── Batch 2B: hub composition ─────────────────────────────────────────
   The "Use this in RC"
   aside is a navy band: RC's next step, the same ground as Compare's
   conclusion and the Plan's "where this stands". */
.rc-reading-aside .rc-use, .rc-use.rc-reading-inline { background: var(--rc-navy); border: 0; color: #fff; padding: var(--rc-space-6); }
.rc-reading-aside .rc-use .rc-microlabel, .rc-use.rc-reading-inline .rc-microlabel { color: rgba(255, 255, 255, .72); }
.rc-reading-aside .rc-use h2, .rc-use.rc-reading-inline h2 { color: #fff; font: 500 20px/1.25 var(--rc-font-ui); }
.rc-reading-aside .rc-use p, .rc-use.rc-reading-inline p { color: rgba(255, 255, 255, .86); }
.rc-reading-aside .rc-use .rc-btn--primary, .rc-use.rc-reading-inline .rc-btn--primary { background: #fff; color: var(--rc-navy); border-color: #fff; }
.rc-reading-aside .rc-use .rc-btn--primary:hover, .rc-use.rc-reading-inline .rc-btn--primary:hover { background: var(--rc-surface-3); border-color: var(--rc-surface-3); }
.rc-reading-aside .rc-use .rc-btn:focus-visible, .rc-use.rc-reading-inline .rc-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Final interaction pass (2026-10-31): reading stays calm. One arrival on
   load: the article's head, then its aside (the "Use this in RC" card)
   a beat later. Body text never animates in. 0ms under reduced motion. */
@keyframes rc-read-in { from { opacity: 0; transform: translateY(var(--rc-move-reveal)); } to { opacity: 1; transform: none; } }
.rc-reading-head { animation: rc-read-in var(--rc-dur-reveal) var(--rc-ease-enter) backwards; }
.rc-reading-aside { animation: rc-read-in var(--rc-dur-reveal) var(--rc-ease-enter) backwards; animation-delay: calc(var(--rc-dur-stagger) * 3); }
@media (prefers-reduced-motion: reduce) { .rc-reading-head, .rc-reading-aside { animation: none; } }

/* ── Hard product closure (2026-11-05): no "line = section" ─────────────
   DESIGN.md § Dividers. Rules stay where they carry structure: tables
   (header, rows, the total). The hub's group headings, its rows, the
   contents list and the FAQ are separated by space and type instead. */
.rc-reading-body .rc-hub-group > h2 { border-bottom: 0; padding-bottom: 0; margin-bottom: var(--rc-space-2); color: var(--rc-ink-3); font: var(--rc-type-label); letter-spacing: .02em; }
.rc-hub-rows > li { border-bottom: 0; }
.rc-hub-row { padding-block: var(--rc-space-4); }
.rc-reading-aside nav ol, .rc-reading-aside nav li { border: 0; }
.rc-reading-faq > div { border-top: 0; padding: var(--rc-space-4) 0; }
.rc-use { border-top-width: 1px; border-top-color: var(--rc-line); }

/* Experience 2.1 — each guide names the RC journey it feeds (word + accent). */
.rc-hub-side { display: grid; justify-items: end; gap: 6px; }
.rc-hub-side .rc-mode-tag { min-height: 0; font-size: 13px; color: var(--rc-ink-2); }
@media (max-width: 767.98px) { .rc-hub-side { justify-items: start; grid-auto-flow: column; justify-content: start; gap: 16px; align-items: center; } }
