/* ==========================================================================
   Arclance — production stylesheet for mlbb-core
   Translated from design-system/"Système de design MOBA (1)"/ (readme.md + tokens/).
   The .dc.html screens are preview mockups, not source; this file is the prod
   implementation of the same token values.
   NOTE: legacy design-system/tokens.css (Wild Rift residue) is NOT used here.
   ========================================================================== */

/* --- Tokens: colors (verbatim from tokens/colors.css) -------------------- */
:root {
  --n-950: oklch(14% 0.02 260);
  --n-900: oklch(18% 0.022 260);
  --n-800: oklch(23% 0.024 260);
  --n-700: oklch(29% 0.026 258);
  --n-600: oklch(38% 0.03 258);
  --n-500: oklch(50% 0.03 258);
  --n-400: oklch(62% 0.025 255);
  --n-300: oklch(74% 0.02 255);
  --n-200: oklch(85% 0.014 255);
  --n-100: oklch(93% 0.01 255);
  --n-50: oklch(97% 0.006 255);

  --gold-300: oklch(88% 0.09 85);
  --gold-500: oklch(78% 0.15 85);
  --gold-600: oklch(68% 0.16 80);
  --gold-800: oklch(40% 0.12 75);

  --azure-300: oklch(85% 0.08 220);
  --azure-500: oklch(72% 0.15 220);
  --azure-700: oklch(50% 0.14 222);

  --violet-300: oklch(86% 0.07 300);
  --violet-500: oklch(68% 0.16 300);
  --violet-700: oklch(46% 0.14 300);

  --role-fighter: oklch(66% 0.135 15);
  --role-marksman: oklch(66% 0.135 75);
  --role-support: oklch(66% 0.135 135);
  --role-tank: oklch(66% 0.135 195);
  --role-mage: oklch(66% 0.135 255);
  --role-assassin: oklch(66% 0.135 315);

  --status-success: oklch(70% 0.14 145);
  --status-warning: oklch(78% 0.15 85);
  --status-danger: oklch(62% 0.19 25);

  --bg-app: var(--n-950);
  --bg-stage: radial-gradient(ellipse at 50% -10%, var(--n-800) 0%, var(--n-950) 60%);
  --bg-panel: var(--n-900);
  --bg-card: var(--n-800);
  --bg-card-hover: var(--n-700);
  --bg-overlay: oklch(14% 0.02 260 / 0.72);

  --text-1: var(--n-50);
  --text-2: var(--n-300);
  --text-3: var(--n-400);
  --text-muted: var(--n-600);
  --text-inverse: var(--n-950);

  --line: oklch(85% 0.02 255 / 0.12);
  --line-soft: oklch(100% 0 0 / 0.06);
  --line-strong: oklch(85% 0.02 255 / 0.24);

  --accent: var(--gold-500);
  --accent-strong: var(--gold-600);
  --accent-soft: oklch(78% 0.15 85 / 0.14);
}

:root[data-accent='cyan'] {
  --accent: var(--azure-500);
  --accent-strong: var(--azure-700);
  --accent-soft: oklch(72% 0.15 220 / 0.14);
}
:root[data-accent='violet'] {
  --accent: var(--violet-500);
  --accent-strong: var(--violet-700);
  --accent-soft: oklch(68% 0.16 300 / 0.14);
}

:root[data-theme='light'] {
  --bg-app: var(--n-50);
  --bg-stage: radial-gradient(ellipse at 50% -10%, var(--n-100) 0%, var(--n-50) 60%);
  --bg-panel: var(--n-100);
  --bg-card: oklch(100% 0 0);
  --bg-card-hover: var(--n-100);
  --bg-overlay: oklch(97% 0.006 255 / 0.72);

  --text-1: var(--n-950);
  --text-2: var(--n-700);
  --text-3: var(--n-600);
  --text-muted: var(--n-400);
  --text-inverse: var(--n-50);

  --line: oklch(30% 0.02 260 / 0.12);
  --line-soft: oklch(30% 0.02 260 / 0.06);
  --line-strong: oklch(30% 0.02 260 / 0.22);

  --gold-500: oklch(64% 0.15 85);
  --azure-500: oklch(58% 0.15 222);
  --violet-500: oklch(56% 0.16 300);
}

/* --- Tokens: type / spacing / effects ------------------------------------ */
:root {
  --ff-display: 'Space Grotesk', 'Arial Narrow', sans-serif;
  --ff-ui: 'Plus Jakarta Sans', system-ui, sans-serif;

  --fs-2xs: 0.75rem;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  --fs-3xl: clamp(1.875rem, 1.4rem + 2.5vw, 3rem);
  --fs-hero: clamp(2.25rem, 1.6rem + 3.5vw, 4rem);

  --lh-tight: 1.15;
  --lh-heading: 1.25;
  --lh-body: 1.6;
  --ls-eyebrow: 0.08em;
  --ls-tight: -0.01em;

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 9999px;
  --facet: 24px;

  --sh-soft: 0 10px 28px oklch(10% 0.02 260 / 0.38);
  --sh-hard: 0 20px 48px oklch(10% 0.02 260 / 0.5);
  --glow-gold: 0 0 24px oklch(78% 0.15 85 / 0.35);
  --glow-cyan: 0 0 24px oklch(72% 0.15 220 / 0.32);
  --glow-violet: 0 0 24px oklch(68% 0.16 300 / 0.32);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 140ms;
  --dur-mid: 220ms;
  --dur-slow: 360ms;

  --wrap: 1180px;
}

/* --- Base ---------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-app);
  color: var(--text-1);
  font-family: var(--ff-ui);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--gold-500);
  text-decoration: none;
}
a:hover {
  color: var(--gold-300);
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3 {
  font-family: var(--ff-display);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-tight);
  margin: 0;
}

*:focus-visible {
  outline: 2px solid var(--azure-500);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--sp-8);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Signature motif: single-cut faceted corner. Any focus ring on a faceted
   element must be INSET — an outset ring gets clipped off at the diagonal. */
.fac {
  clip-path: polygon(0 0, calc(100% - var(--facet)) 0, 100% var(--facet), 100% 100%, 0 100%);
}

.eyebrow {
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--n-600);
  margin-bottom: var(--sp-4);
}

/* --- Header -------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  padding: 14px var(--sp-8);
  background: color-mix(in oklab, var(--bg-panel) 72%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: var(--fs-base);
  color: var(--text-1);
  letter-spacing: var(--ls-tight);
}

.site-nav {
  display: flex;
  gap: var(--sp-6);
  flex-wrap: wrap;
}

.site-nav a {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-2);
  transition: color var(--dur-fast) var(--ease);
}
.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--text-1);
}

.theme-toggle {
  font-family: var(--ff-ui);
  font-size: var(--fs-2xs);
  font-weight: 700;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 7px 14px;
  cursor: pointer;
  transition:
    color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
}
.theme-toggle:hover {
  color: var(--text-1);
  border-color: var(--azure-500);
}

/* --- Role tags ----------------------------------------------------------- */
.tag-row {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.role-tag {
  --role: var(--n-400);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--role);
  background: color-mix(in oklab, var(--role) 14%, transparent);
  border: 1px solid var(--role);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  white-space: nowrap;
}

.role-tank {
  --role: var(--role-tank);
}
.role-fighter {
  --role: var(--role-fighter);
}
.role-assassin {
  --role: var(--role-assassin);
}
.role-mage {
  --role: var(--role-mage);
}
.role-marksman {
  --role: var(--role-marksman);
}
.role-support {
  --role: var(--role-support);
}

/* --- Hero list page ------------------------------------------------------ */
.page-head {
  background: var(--bg-stage);
  padding: var(--sp-12) 0 var(--sp-10);
  border-bottom: 1px solid var(--line-soft);
}

.page-head h1 {
  font-size: var(--fs-3xl);
  color: var(--text-1);
}

.page-head .lede {
  font-size: var(--fs-md);
  color: var(--text-2);
  max-width: 62ch;
  margin: var(--sp-4) 0 0;
}

.count-note {
  font-size: var(--fs-sm);
  color: var(--text-3);
  margin-top: var(--sp-5);
}
.count-note strong {
  font-family: var(--ff-display);
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}

.filters {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin: var(--sp-8) 0 var(--sp-6);
}

.filter-chip {
  font-family: var(--ff-ui);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-2);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 8px 16px;
  cursor: pointer;
  transition: all var(--dur-mid) var(--ease);
}
.filter-chip:hover {
  color: var(--text-1);
  border-color: var(--line-strong);
}
.filter-chip[aria-pressed='true'] {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--text-inverse);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: var(--sp-4);
  padding-bottom: var(--sp-16);
  list-style: none;
  margin: 0;
  padding-inline: 0;
}

.hero-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: inherit;
  transition:
    transform var(--dur-mid) var(--ease),
    background var(--dur-mid) var(--ease),
    box-shadow var(--dur-mid) var(--ease);
}
.hero-card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  box-shadow: var(--sh-soft);
  color: inherit;
}
/* Faceted + focusable → inset ring, see .fac note above */
.hero-card:focus-visible {
  outline: none;
  box-shadow:
    inset 0 0 0 2px var(--bg-app),
    inset 0 0 0 4px var(--azure-500);
}

.hero-card__art {
  /* display:block is required for aspect-ratio to apply — a <span> is inline by
   * default, so an empty one (item with no cross-referenced icon) collapsed to zero
   * height instead of keeping the card's shape. Found reviewing /items/ visually. */
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  background: var(--n-700);
  overflow: hidden;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--text-2);
}
.hero-card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card__body {
  padding: var(--sp-4);
}

.hero-card__name {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--text-1);
  margin-bottom: var(--sp-3);
}

.empty-note {
  background: var(--bg-card);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  font-size: var(--fs-sm);
  color: var(--text-2);
  margin: 0;
}

/* --- Hero detail --------------------------------------------------------- */
.hero-stage {
  background: var(--bg-stage);
  padding: var(--sp-12) 0;
}

.hero-stage__inner {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: var(--sp-12);
  align-items: start;
}

.hero-portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--n-700);
  box-shadow: var(--sh-soft);
}
.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-name {
  font-size: var(--fs-hero);
  color: var(--text-1);
  line-height: 1.05;
  margin: var(--sp-3) 0 0;
}

.hero-sub {
  font-size: var(--fs-base);
  color: var(--text-2);
  max-width: 60ch;
  margin: var(--sp-4) 0 var(--sp-8);
}

.note-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4) var(--sp-8);
  max-width: 620px;
}

.note-row__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--fs-2xs);
  color: var(--text-2);
  margin-bottom: 6px;
}

.note-row__val {
  font-family: var(--ff-display);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}

.meter {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.meter > span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.section {
  padding: var(--sp-12) 0 0;
}
.section:last-of-type {
  padding-bottom: var(--sp-16);
}

.section h2 {
  font-size: var(--fs-xl);
  color: var(--text-1);
  margin-bottom: var(--sp-5);
}

/* Skills */
.skill-list {
  display: grid;
  gap: var(--sp-4);
}

.skill {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--sp-5);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--sp-6);
}

.skill__icon {
  width: 72px;
  height: 72px;
  border-radius: var(--r-md);
  background: var(--n-700);
  overflow: hidden;
}
.skill__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.skill__slot {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-1);
}

.skill__name {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--text-1);
}

.skill__desc {
  font-size: var(--fs-sm);
  line-height: 1.65;
  color: var(--text-2);
  margin: var(--sp-3) 0 0;
}

.skill__tip {
  margin-top: var(--sp-4);
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 10px 14px;
  font-size: var(--fs-xs);
  color: var(--gold-300);
}

/* Inline damage/keyword tokens parsed out of the source <font> markup */
.tk {
  font-weight: 600;
}
.tk--magic {
  color: oklch(70% 0.14 265);
}
.tk--mp {
  color: oklch(75% 0.12 200);
}
.tk--pa {
  color: var(--gold-500);
}
.tk--phys {
  color: oklch(66% 0.16 25);
}
.tk--heal {
  color: var(--status-success);
}
.tk--true {
  color: oklch(85% 0.14 100);
}
.tk--key {
  color: var(--violet-300);
}

/* The pale end of each ramp is tuned for dark surfaces; on the light neutral it
   drops below AA. Darken the affected tokens rather than desaturate them. */
:root[data-theme='light'] .tk--key {
  color: oklch(48% 0.16 300);
}
:root[data-theme='light'] .tk--true {
  color: oklch(56% 0.13 85);
}
:root[data-theme='light'] .tk--mp {
  color: oklch(50% 0.12 200);
}
:root[data-theme='light'] .tk--heal {
  color: oklch(48% 0.14 145);
}
:root[data-theme='light'] .tk--magic {
  color: oklch(50% 0.16 265);
}
:root[data-theme='light'] .tk--phys {
  color: oklch(52% 0.18 25);
}
:root[data-theme='light'] .skill__tip {
  color: oklch(42% 0.11 80);
}

/* Gear */
.gear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-4);
}

.gear-card {
  display: flex;
  gap: var(--sp-3);
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: var(--sp-4);
}

.gear-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--n-700);
  flex-shrink: 0;
  overflow: hidden;
}
.gear-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gear-card__name {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: var(--fs-xs);
  color: var(--text-1);
}

.gear-card__passive {
  font-size: 11px;
  color: var(--text-3);
  margin: var(--sp-1) 0 0;
  line-height: 1.45;
}

/* Counters / matchups */
.counter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-4);
}

.counter-card {
  display: flex;
  gap: var(--sp-3);
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: var(--sp-4);
}

.counter-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-sm);
  background: var(--n-700);
  flex-shrink: 0;
  overflow: hidden;
}
.counter-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.counter-card__role {
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-tight);
  color: var(--text-3);
  margin: 0;
}

.counter-card__name {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: var(--fs-xs);
  color: var(--text-1);
  margin: 2px 0 0;
}

.counter-card__tip {
  font-size: 11px;
  color: var(--text-3);
  margin: var(--sp-1) 0 0;
  line-height: 1.45;
}

/* Damage scaling rows — parsed data, "numbers lead" per the design system */
.ratio-list {
  list-style: none;
  margin: var(--sp-3) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.ratio {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-panel);
  border-left: 2px solid var(--line-strong);
  border-radius: var(--r-sm);
}

.ratio__figure {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}

.ratio__stat {
  font-size: var(--fs-2xs);
  color: var(--text-3);
  flex: 1 1 auto;
}

.ratio__type {
  font-size: var(--fs-2xs);
  font-weight: 600;
  white-space: nowrap;
}

/* Related heroes (role ring) */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--sp-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: var(--sp-3);
  color: var(--text-1);
  transition: background var(--dur-fast) var(--ease);
}
.related-card:hover {
  background: var(--bg-card-hover);
  color: var(--text-1);
}
.related-card img {
  width: 48px;
  height: 48px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.related-card span {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: var(--fs-xs);
}

/* Author page: persona cards carry a heading + full paragraph + quote — .related-card's
 * narrow flex row (built for icon + short name) mangles that much text. Own component. */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-3);
  list-style: none;
  margin: 0;
  padding: 0;
}
.persona-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: var(--sp-4);
}
.persona-card h3 {
  font-family: var(--ff-display);
  font-size: var(--fs-md);
  margin: 0;
}
.persona-card p {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.persona-card__quote {
  font-style: italic;
  color: var(--text-1) !important;
}

.item-title-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.item-title-row img {
  border-radius: var(--r-sm);
  flex-shrink: 0;
}

/* Item pages: "heroes who build this" reuses .related-card but carries a why-quote,
 * not just a name — the plain flex/center layout above overflows unbounded text into
 * neighbouring cards. Wider columns + column layout + clamp keep it contained. */
.item-users-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.item-user-card {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
}
.item-user-card p {
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Breadcrumb */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  list-style: none;
  margin: 0 0 var(--sp-4);
  padding: 0;
  font-size: var(--fs-2xs);
  color: var(--text-3);
}
.breadcrumb li + li::before {
  content: '/';
  margin-right: var(--sp-2);
  color: var(--text-muted);
}
.breadcrumb a {
  color: var(--text-3);
}
.breadcrumb a:hover {
  color: var(--accent);
}

/* Provenance / freshness line — names the upstream source and the fetch date */
.source-note {
  margin: var(--sp-6) 0 0;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  font-size: var(--fs-2xs);
  line-height: 1.55;
  color: var(--text-3);
  max-width: 68ch;
}
.source-note time {
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* Cross-links to other hero pages, inline in generated prose */
a.mlbb-hero {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklch, var(--accent) 40%, transparent);
  text-underline-offset: 2px;
}
a.mlbb-hero:hover {
  text-decoration-color: var(--accent);
}
.counter-card__name a {
  color: inherit;
}
.counter-card__name a:hover {
  color: var(--accent);
}

/* Guide prose (generated copy, merged inline with data sections) */
.guide-copy {
  max-width: 68ch;
  color: var(--text-2);
  margin-top: var(--sp-4);
}
.guide-copy p,
.guide-copy ul,
.guide-copy ol {
  margin: 0 0 var(--sp-3);
}
.guide-copy li {
  margin-bottom: var(--sp-1);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  max-width: 68ch;
}
.faq-item__q {
  font-family: var(--ff-display);
  font-size: var(--fs-sm);
  color: var(--text-1);
  margin: 0 0 var(--sp-1);
}
.faq-item__a {
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.faq-item__a p {
  margin: 0;
}

/* --- Homepage ------------------------------------------------------------ */
.home-hero {
  background: var(--bg-stage);
  padding: var(--sp-24) 0 var(--sp-20);
  text-align: center;
}

.home-hero h1 {
  font-size: var(--fs-hero);
  color: var(--text-1);
  max-width: 18ch;
  margin: var(--sp-4) auto 0;
}

.home-hero p {
  font-size: var(--fs-md);
  color: var(--text-2);
  max-width: 58ch;
  margin: var(--sp-5) auto var(--sp-8);
}

.btn-primary {
  display: inline-block;
  font-family: var(--ff-ui);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-inverse);
  background: var(--gold-500);
  border: none;
  padding: 13px 26px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.btn-primary:hover {
  background: var(--gold-300);
  color: var(--text-inverse);
}
.btn-primary:focus-visible {
  outline: none;
  box-shadow:
    inset 0 0 0 2px var(--bg-app),
    inset 0 0 0 4px var(--azure-500);
}

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--sp-8) 0;
  margin-top: var(--sp-8);
}

.site-footer p {
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  margin: 0;
  max-width: 70ch;
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-stage__inner {
    grid-template-columns: 260px 1fr;
    gap: var(--sp-8);
  }
}

@media (max-width: 640px) {
  .wrap {
    padding-inline: var(--sp-4);
  }
  .site-header {
    padding: 12px var(--sp-4);
  }
  .hero-stage__inner {
    grid-template-columns: 1fr;
  }
  .hero-portrait {
    max-width: 260px;
  }
  .note-grid,
  .skill {
    grid-template-columns: 1fr;
  }
  .skill__icon {
    width: 56px;
    height: 56px;
  }
}

/* --- Table of contents ---------------------------------------------------- */
.toc {
  margin-top: var(--sp-12);
  padding: var(--sp-5) var(--sp-6);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.toc__title {
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--n-600);
  margin-bottom: var(--sp-3);
}

.toc__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-1) var(--sp-5);
  margin: 0;
  padding-left: var(--sp-5);
}

.toc__list a {
  color: var(--text-2);
  text-decoration: none;
  line-height: 1.9;
}

.toc__list a:hover,
.toc__list a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

/* Les ancres du sommaire amènent le titre sous le header collant sans ce décalage. */
.section h2[id],
.toc__title[id] {
  scroll-margin-top: var(--sp-20);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ── Tier list ───────────────────────────────────────────────────────────── */
/* Ajouté 2026-07-30. Réutilise .hero-grid/.hero-card ; n'introduit que la
   colonne de badge de tier et la ligne de chiffres sous le nom. */
.tl-row {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: var(--sp-3, 0.75rem);
  align-items: start;
  margin-block: var(--sp-4, 1rem);
}
.tl-badge {
  display: grid;
  place-items: center;
  margin: 0;
  min-height: 3rem;
  border-radius: 0.6rem;
  font-family: var(--font-display, inherit);
  font-size: 1.35rem;
  font-weight: 700;
  color: #10121a;
  background: var(--tl-c, #8a8f9c);
}
.tl-badge.tier-s { --tl-c: #f2c14e; }
.tl-badge.tier-a { --tl-c: #c084fc; }
.tl-badge.tier-b { --tl-c: #60a5fa; }
.tl-badge.tier-c { --tl-c: #94a3b8; }
.tl-badge.tier-d { --tl-c: #6b7280; }
.tl-stats {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--text-2, #9aa3b2);
  font-variant-numeric: tabular-nums;
}
.tl-trend { margin-left: 0.25rem; font-weight: 600; }
.tl-trend.is-up { color: #4ade80; }
.tl-trend.is-down { color: #f87171; }
@media (max-width: 40rem) {
  .tl-row { grid-template-columns: 2.5rem 1fr; }
  .tl-badge { min-height: 2.4rem; font-size: 1.05rem; }
}

/* ── Build & Counters subpages ───────────────────────────────────────────── */
.build-grid, .matchup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: var(--sp-4, 1rem);
  margin-block: var(--sp-4, 1rem);
}

.build-item, .matchup-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3, 0.75rem);
  padding: var(--sp-4, 1rem);
  border-radius: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--n-700);
}

.build-item__icon, .matchup-card__type {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--n-400);
}

.build-item__icon img {
  border-radius: 0.35rem;
  aspect-ratio: 1;
  object-fit: cover;
}

.build-item__name, .matchup-card__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--n-50);
}

.matchup-card__name a {
  color: var(--gold-300);
  text-decoration: none;
}

.matchup-card__name a:hover {
  text-decoration: underline;
}

.build-item__passive, .matchup-card__tip {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--n-300);
}

.source-note {
  margin-top: var(--sp-4, 1rem);
  padding: var(--sp-3, 0.75rem);
  border-left: 3px solid var(--n-700);
  font-size: 0.875rem;
  color: var(--n-400);
}

/* --- Matchup analysis (pages /heroes/{slug}/counters/) -------------------
   Bloc autonome préfixé .mu-* : n'altère pas .matchup-card, encore utilisé par
   le rendu de repli des héros pas encore enrichis. Toutes les couleurs passent
   par les tokens sémantiques pour suivre :root[data-theme='light'].
   ------------------------------------------------------------------------ */

.mu-overview {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-2);
  max-width: 68ch;
}

.mu-group__count {
  display: inline-block;
  vertical-align: middle;
  margin-left: var(--sp-2, 0.5rem);
  padding: 0.15em 0.6em;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  font-family: var(--ff-ui);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-3);
}

.mu-group__blurb {
  max-width: 72ch;
  margin-block: var(--sp-3, 0.75rem) var(--sp-5, 1.5rem);
  color: var(--text-3);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.mu-card {
  display: grid;
  grid-template-columns: minmax(11rem, 13rem) repeat(3, 1fr);
  gap: var(--sp-4, 1rem);
  align-items: start;
  padding: var(--sp-4, 1rem);
  margin-block: var(--sp-4, 1rem);
  border: 1px solid var(--line);
  border-left: 3px solid var(--mu-accent, var(--line-strong));
  border-radius: 0.5rem;
  background: var(--bg-panel);
}

.mu-card[data-tier='hard']        { --mu-accent: var(--status-danger); }
.mu-card[data-tier='unfavorable'] { --mu-accent: var(--status-warning); }
.mu-card[data-tier='skill']       { --mu-accent: var(--azure-500); }
.mu-card[data-tier='favorable']   { --mu-accent: var(--status-success); }
.mu-card[data-tier='ally']        { --mu-accent: var(--violet-500); }

.mu-card__id {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2, 0.5rem);
  text-align: center;
}

.mu-card__icon {
  width: 72px;
  height: 72px;
  border-radius: 0.5rem;
  object-fit: cover;
  border: 2px solid var(--mu-accent, var(--line-strong));
  background: var(--bg-card);
}

.mu-card__name {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 1rem;
  font-weight: 700;
}

.mu-card__name a {
  color: var(--text-1);
  text-decoration: none;
}

.mu-card__name a:hover,
.mu-card__name a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.mu-card__badge {
  margin: 0;
  padding: 0.2em 0.7em;
  border-radius: 999px;
  background: color-mix(in oklch, var(--mu-accent) 18%, transparent);
  color: var(--mu-accent);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow, 0.08em);
}

.mu-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mu-tag {
  padding: 0.15em 0.55em;
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  background: var(--bg-card);
  font-size: 0.6875rem;
  color: var(--text-3);
}

.mu-card__blocks {
  display: contents;
}

.mu-block {
  padding: var(--sp-3, 0.75rem);
  border-radius: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
}

.mu-block__title {
  margin: 0 0 var(--sp-2, 0.5rem);
  font-family: var(--ff-display);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow, 0.08em);
  color: var(--accent);
}

.mu-block p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-2);
}

/* Sous 60rem la grille 4 colonnes devient illisible : identité en bandeau,
   puis les trois angles empilés. */
@media (max-width: 60rem) {
  .mu-card {
    grid-template-columns: 1fr;
  }

  .mu-card__id {
    flex-direction: row;
    align-items: center;
    text-align: left;
    flex-wrap: wrap;
    gap: var(--sp-3, 0.75rem);
  }

  .mu-tags {
    justify-content: flex-start;
    flex-basis: 100%;
  }
}

/* --- Hero meta strip + build guide ---------------------------------------
   Préfixes .hero-meta/.hm-*/.bo-*/.bld-* : additifs, aucune classe existante
   n'est redéfinie. Tokens sémantiques uniquement (suit le thème clair).
   ------------------------------------------------------------------------ */

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: var(--sp-3, 0.75rem) 0 var(--sp-4, 1rem);
  padding: 0;
  list-style: none;
}

.hm-chip {
  padding: 0.25em 0.75em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-card);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-2);
}

.hm-chip--role {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.hm-chip--spec {
  border-style: dashed;
  color: var(--text-3);
}

.hm-chip--soft {
  background: transparent;
  color: var(--text-3);
}

.bld-overview {
  max-width: 68ch;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-2);
}

/* Build order — chaîne horizontale scrollable, jamais de débordement de page. */
.build-order {
  display: flex;
  gap: var(--sp-2, 0.5rem);
  margin: var(--sp-4, 1rem) 0;
  padding: 0 0 var(--sp-2, 0.5rem);
  list-style: none;
  overflow-x: auto;
  counter-reset: none;
}

.bo-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex: 0 0 auto;
  width: 6.5rem;
  padding: var(--sp-3, 0.75rem) 0.4rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--bg-card);
  text-align: center;
}

/* Chevron de séquence entre les étapes — décoratif, masqué aux lecteurs d'écran. */
.bo-step:not(:last-child)::after {
  content: '';
  position: absolute;
  right: calc(var(--sp-2, 0.5rem) * -1);
  top: 50%;
  width: var(--sp-2, 0.5rem);
  height: 1px;
  background: var(--line-strong);
}

.bo-step__icon {
  border-radius: 0.35rem;
  aspect-ratio: 1;
  object-fit: cover;
}

.bo-step__n {
  font-family: var(--ff-display);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--accent);
}

.bo-step__name {
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--text-2);
}

.bld-items,
.bld-adapts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: var(--sp-4, 1rem);
  margin-block: var(--sp-4, 1rem);
}

.bld-item,
.bld-adapt {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3, 0.75rem);
  padding: var(--sp-4, 1rem);
  border: 1px solid var(--line);
  border-left: 3px solid var(--bld-accent, var(--line-strong));
  border-radius: 0.5rem;
  background: var(--bg-panel);
}

.bld-item[data-timing='early']       { --bld-accent: var(--azure-500); }
.bld-item[data-timing='core']        { --bld-accent: var(--accent); }
.bld-item[data-timing='late']        { --bld-accent: var(--violet-500); }
.bld-item[data-timing='situational'] { --bld-accent: var(--n-500); }

.bld-item__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3, 0.75rem);
}

.bld-item__icon {
  border-radius: 0.35rem;
  aspect-ratio: 1;
  object-fit: cover;
  flex-shrink: 0;
}

.bld-item__name {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-1);
}

.bld-item__timing {
  margin: 0.2rem 0 0;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow, 0.08em);
  color: var(--bld-accent, var(--text-3));
}

.bld-item__why {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-2);
}

/* Le passif brut du jeu est une source, pas du contenu éditorial : il est
   volontairement en retrait typographique par rapport à l'explication. */
.bld-item__passive {
  margin: 0;
  padding-top: var(--sp-3, 0.75rem);
  border-top: 1px solid var(--line-soft);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-3);
}

.bld-item__passive span {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow, 0.08em);
  color: var(--text-muted);
}

.bld-adapt {
  border-left-color: var(--status-warning);
}

.bld-adapt__situation {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-1);
}

.bld-adapt p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-2);
}

/* --- Maillage vers les sous-pages build/counters -------------------------
   Ces liens sont le SEUL chemin de crawl vers /build/ et /counters/ : sans eux
   ces pages sont orphelines. Traitées visuellement comme des actions, pas comme
   des liens de bas de page.
   ------------------------------------------------------------------------ */

.subpage-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2, 0.5rem);
  margin: var(--sp-4, 1rem) 0;
}

.subpage-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5em 1em;
  border: 1px solid var(--line-strong);
  border-radius: 0.4rem;
  background: var(--bg-card);
  color: var(--text-1);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.subpage-nav__link::after {
  content: '→';
  color: var(--accent);
}

.subpage-nav__link:hover,
.subpage-nav__link:focus-visible {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

.subpage-nav--foot {
  margin-top: var(--sp-6, 2rem);
  padding-top: var(--sp-4, 1rem);
  border-top: 1px solid var(--line-soft);
}

/* Lien contextuel en fin de section : l'ancre porte le sujet de la sous-page,
   c'est ce texte que les moteurs associent à la cible. */
.deep-link {
  margin: var(--sp-3, 0.75rem) 0 0;
  padding-left: var(--sp-3, 0.75rem);
  border-left: 2px solid var(--accent);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.deep-link a {
  color: var(--accent);
  text-decoration: none;
}

.deep-link a:hover,
.deep-link a:focus-visible {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .subpage-nav__link { transition: none; }
}
