/* Race pages (T4, scripts/lib/templates/race.mjs; ops/design/templates/race/contract.md).
   The race panel is the answer and sits above the fold at 390 by 844 and 1440 by 900:
   phones stack identity, class board and racials; from 40rem the identity column sits
   beside the board; from 64rem three columns put the racials between them. Component
   styles (panel, sigils, racial rows, fact rows, page head) come from public/components/;
   this file only lays them out and tightens them for the panel. No JavaScript. */

.race-top { padding-bottom: var(--s-5); }
.race-top .wfg-page-head { padding-bottom: var(--s-3); }
/* 2026-10-02: the partner CTA (components/partner-cta.css) follows the race panel. */
.race-top > .wfg-cta { margin-top: var(--s-3); }

/* ---------- The race panel ---------- */

.race-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "id" "classes" "racials";
  gap: 12px 22px;
}
.race-id { grid-area: id; display: grid; grid-template-columns: min(6rem, 30%) minmax(0, 1fr); gap: 12px; align-items: start; align-content: start; min-width: 0; }
.race-id .wfg-portrait { width: 100%; }
/* Identity rows: label and tier icon share a line, the short answer sits under them. The
   label takes the room the icon leaves and wraps inside it, so a long label or larger text
   never pushes the icon onto a line of its own. */
.race-id .wfg-facts.is-compact .wfg-fact { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1px 8px; padding: 4px 0; }
.race-id .wfg-facts.is-compact .wfg-fact-label { order: 0; flex: 1 1 0; min-width: 0; font-size: .68rem; }
.race-id .wfg-fact-tier { order: 1; margin-left: auto; }
.race-id .wfg-fact-value { order: 2; flex: 1 1 100%; font-size: .9rem; line-height: 1.3; }
.race-classes { grid-area: classes; min-width: 0; }
.race-racials { grid-area: racials; min-width: 0; }

/* The board: nine sigils in two rows, then the verdict and the page's one red button. */
.race-classes .wfg-board { gap: 10px; }
/* Five across at normal text size; larger text drops columns instead of overlapping rings. */
.race-classes .wfg-sigils { grid-template-columns: repeat(auto-fill, minmax(max(3.6rem, 17%), 1fr)); gap: 2px 4px; }
.race-classes .wfg-sigils legend { margin-bottom: 4px; padding-bottom: 6px; }
.race-classes .wfg-sigil { padding: 4px 0 2px; gap: 3px; }
.race-classes .wfg-sigil-ring { width: 2.9rem; height: 2.9rem; }
.race-classes .wfg-sigil-ring img { width: 2rem; height: 2rem; }
.race-classes .wfg-sigil b { font-size: .78rem; }
.race-classes .wfg-sigil-new { right: calc(50% - 1.95rem); }
.race-classes .wfg-sigil-only { font-size: .62rem; }
.race-classes .wfg-verdict { padding-top: 6px; border-top: 1px solid var(--hairline); }
.race-verdict-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; font: 400 1.35rem/1.1 var(--font-display); letter-spacing: .02em; color: var(--ink); }
.race-verdict-line b { font-weight: 400; }
.race-verdict-yes, .race-verdict-no { font: 400 .72rem/1.3 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; }
.race-verdict-yes { color: var(--ink-2); }
.race-verdict-no { color: var(--ink-3); }
.race-verdict-note { margin: 2px 0 8px; font-size: .88rem; line-height: 1.45; color: var(--ink-2); }
.race-classes .wfg-btn--enter { width: 100%; }

/* Racials: the shared rows, Skyborne's split row, then the one-line extras. */
.race-sub { margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--hairline); font: 400 .72rem/1.3 var(--font-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.race-sub .wfg-state { margin-left: 6px; letter-spacing: .03em; text-transform: none; vertical-align: .1em; }
.race-racials .wfg-racials { gap: 10px; margin-bottom: 10px; }
.race-racials .wfg-racial { font-size: .86rem; line-height: 1.4; }
.race-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
.race-split-side { padding-left: 10px; border-left: 2px solid var(--line); }
.race-split-side[data-faction="alliance"] { border-left-color: var(--alliance); }
.race-split-side[data-faction="horde"] { border-left-color: var(--horde); }
.race-split-side .wfg-racials { margin: 0; }
.race-split-label { margin: 0 0 6px; font: 400 .72rem/1.3 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.race-line { margin: 6px 0 0; font-size: .84rem; line-height: 1.45; color: var(--ink-2); }
.race-line-label { margin-right: 6px; font: 400 .7rem/1.3 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.race-line .wfg-evidence, .race-src .wfg-evidence { vertical-align: .05em; }
.race-line a, .race-src a { color: var(--ink-2); text-decoration-color: var(--line-control); }
.race-line a:hover, .race-src a:hover { color: var(--ink); }

.race-src { margin: 12px 0 0; padding-top: 8px; border-top: 1px solid var(--hairline); font: 400 .78rem/1.6 var(--font-ui); color: var(--ink-3); }
.race-src-checked { margin-right: 8px; }
.race-src-checked time { color: var(--ink-2); }
/* Inline source links get a 28px tall hit area without moving the line. */
.race-line a, .race-src a { display: inline-block; padding-block: .35rem; margin-block: -.35rem; }

@media (min-width: 40rem) {
  .race-grid { grid-template-columns: 12rem minmax(0, 1fr); grid-template-areas: "id classes" "racials racials"; }
  .race-id { grid-template-columns: minmax(0, 1fr); }
  .race-classes .wfg-sigils { grid-template-columns: repeat(auto-fill, minmax(max(4rem, 17%), 1fr)); }
  .race-id .wfg-portrait { width: 100%; max-width: 12rem; }
  .race-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .race-classes .wfg-sigil-ring { width: 3.2rem; height: 3.2rem; }
  .race-classes .wfg-sigil-ring img { width: 2.2rem; height: 2.2rem; }
  .race-classes .wfg-sigil-new { right: calc(50% - 2.1rem); }
}

@media (min-width: 64rem) {
  .race-grid { grid-template-columns: 13.5rem minmax(0, 1fr) minmax(0, 21.5rem); grid-template-areas: "id racials classes"; }
  .race-id .wfg-portrait { max-width: none; }
  .race-split { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 80rem) {
  .race-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 64rem) {
  .race-more .wfg-fact { grid-template-columns: 15rem minmax(0, 1fr) auto; }
}

/* ---------- Below the panel ---------- */

.race-more { display: grid; gap: var(--s-5); }
.race-more .affiliate-break { margin: 0; }

/* Other races: after the changes panel below 64rem, in the rail under the TOC from 64rem. */
.race-others h2 { margin: 0 0 var(--s-3); font: 400 1rem/1.3 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.race-others ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.race-others .wfg-race { min-height: 2.75rem; }
.race-others .wfg-race small { font-size: .68rem; }
.race-others-rail { margin-top: var(--s-6); }
.guide-aside > .race-others-rail:first-child { margin-top: 0; }
.race-others-rail ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 64rem) {
  .race-others-inline { display: none; }
}

/* Without :has() every verdict shows as a list and its button reads as a link. */
@supports not selector(:has(*)) {
  .race-classes .wfg-btn--enter { width: auto; justify-content: flex-start; }
}
