/* f1gures - page styles, stage 3 group g) Read, blog, guide, 404, feedback.
   Sharp (stage 3): the pages are built from src/components/sharp/; this file
   keeps only page-local layout and the small typography inside library Cards.
   Tokens only, no hex. Only the owning group edits this file
   (docs/redesign/inventory.md section 4). */

/* ── Shared rhythm ──────────────────────────────────────────────────── */
.rd-tabs { margin: 4px 0 18px; }
/* Blog index and category pages put the category tabs first in the markup
   so on phone they sit right under the toolbar. On desktop the header (and
   the trivia board on /blog/) go back above them. */
@media (min-width: 721px) {
  .rd-index { display: flex; flex-direction: column; }
  /* Islands are display: contents, so the trivia board itself is the item. */
  .rd-index > .s-ph, .rd-index > astro-island > .trivia { order: -1; }
  .rd-index > astro-island > .trivia { width: 100%; }
}
@media (max-width: 720px) {
  .rd-index > .rd-tabs { margin: 0 0 16px; }
}
.rd-lede { margin-bottom: 14px; }
.rd-posts { margin-bottom: 8px; }

/* ── Read hub ───────────────────────────────────────────────────────── */
.rd-pillars { margin: 18px 0 28px; align-items: stretch; }
.rd-pillar > .s-card-body { display: grid; gap: 8px; height: 100%; align-content: start; }
.rd-pillar-title, .gd-card-title {
  margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 24px;
  line-height: 1.05; text-transform: uppercase; color: var(--fg-1);
}
.rd-pillar-desc, .gd-card-blurb { margin: 0; color: var(--fg-2); font-size: 14px; line-height: 1.5; }
.rd-pillar-go, .gd-card-foot {
  margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-1);
}
.rd-latest .s-post--lede { margin-bottom: 14px; }

/* ── Blog post ──────────────────────────────────────────────────────── */
.rd-article .s-byline { margin: -6px 0 18px; }
.rd-cat { color: inherit; text-decoration: none; }
.rd-cat:hover { text-decoration: underline; text-underline-offset: 3px; }
.rd-more { margin-top: 36px; }
.rd-article + astro-island { display: block; margin-top: 32px; }
@media (max-width: 720px) {
  /* 46px wrapped long post titles onto five lines on a phone. */
  .rd-article .s-ph-title { font-size: 30px; line-height: 1.05; }
}

/* MDX blocks inside the post body */
.s-prose .rd-block { margin: 1.4em 0; }
.rd-chip { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.rd-cell { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.rd-cell:hover span { text-decoration: underline; text-underline-offset: 3px; }
.rd-race .s-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.rd-race .s-card-title .flag-img { width: 20px; height: auto; }
.rd-race-meta {
  flex-basis: 100%; font-family: var(--f-mono); font-weight: 500; font-size: 11px;
  letter-spacing: 0.06em; color: var(--fg-3); text-transform: none;
}
.rd-race-foot { padding: 4px 16px 12px; border-top: 1px solid var(--line-1); }
.rd-race-foot a { color: var(--fg-1); }
.rd-season-svg { display: block; max-width: 100%; height: auto; }
.rd-season-label { font-family: var(--f-mono); font-size: 9px; fill: var(--chart-tick); }
.rd-storyline .s-card-body > :first-child { margin-top: 0; }
.rd-storyline .s-card-body > :last-child { margin-bottom: 0; }


/* ── Guide ──────────────────────────────────────────────────────────── */
.gd-start { margin: 18px 0 8px; }
.gd-start-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gd-start-meta { margin: 2px 0 0; color: var(--fg-2); font-size: 14px; }
.gd-group, .gd-related { margin-top: 28px; }
.gd-cards { align-items: stretch; }
.gd-card > .s-card-body { display: grid; gap: 8px; height: 100%; align-content: start; }
.gd-card-title { font-size: 20px; }
.gd-card-foot { margin-top: auto; color: var(--fg-3); }

.gd-art { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.gd-rail { display: grid; gap: 22px; position: sticky; top: calc(var(--nav-h) + 16px); }
.gd-rail .s-toc--sticky { position: static; }
.gd-meta { --cols: 1 !important; }
.gd-body { min-width: 0; max-width: var(--w-read); }
@media (max-width: 900px) {
  .gd-art { grid-template-columns: 1fr; gap: 0; }
  .gd-rail { position: static; order: 2; margin-top: 28px; }
  .gd-meta { --cols: 3 !important; }
}
/* Phone: the meta strip sits under the title and Contents opens a sheet
   (guide/[slug].astro); the rail, which stacked after Prev/Next, is hidden. */
.gd-phone { display: none; }
.gd-toc-in .s-toc ol { margin: 0; }
.gd-toc-in .s-toc a { display: flex; align-items: center; min-height: 44px; }
@media (max-width: 720px) {
  .gd-rail { display: none; }
  .gd-phone { display: grid; gap: 12px; justify-items: start; margin: 0 0 20px; }
  .gd-phone-meta { width: 100%; }
}

/* ── 404 ────────────────────────────────────────────────────────────── */
.p404-mark { display: flex; align-items: center; gap: 14px; margin: 8px 0 4px; }
.p404-sugs { margin: 8px 0 22px; }
.p404-sugs .s-card-body { display: grid; gap: 2px; }
.p404-sug-name { font-family: var(--f-display); font-weight: 800; font-size: 16px; text-transform: uppercase; }
.p404-sug-meta { font-size: 12.5px; color: var(--fg-3); }
.p404-search { margin: 8px 0 22px; }
.p404-nav .s-card-body {
  font-family: var(--f-display); font-weight: 700; font-size: 13px;
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* ── Feedback ───────────────────────────────────────────────────────── */
.fbk-form { display: grid; gap: 22px; }
.fbk-turnstile:empty { display: none; }
.fbk-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fbk-privacy { font-size: 12.5px; color: var(--fg-3); }
.fbk-done { display: grid; gap: 14px; justify-items: start; }

/* Small "?" help glyph next to a column label (links to a guide page). Used
   by the standings screens (group b); it sits here with the guide styles.
   Quiet hint-glyph tone (fg-4), accent on hover. */
.th-guide-link { color: var(--fg-4); font-size: 11px; font-weight: 700; margin-left: 4px; text-decoration: none; cursor: pointer; vertical-align: super; }
.th-guide-link:hover, .th-guide-link:focus-visible { color: var(--accent); }
