/**
 * Minescore paper design system
 * Fonts: same stack as mining-minecraft/index.html
 *   Sora · Figtree · JetBrains Mono
 * Colors: dataviz / block palette (lime, copper, lapis, redstone, gold, …)
 * Light “research paper” shell for standalone HTML articles.
 */
:root {
  /* Block library (shared language with styles.css / dataviz) */
  --mc-black: #1d1d21;
  --mc-obsidian: #0f0b18;
  --mc-deepslate: #3a3d42;
  --mc-stone: #7a7a7a;
  --mc-clay: #a0a3a7;
  --mc-quartz: #e7e4dc;
  --mc-calcite: #efe9df;
  --mc-gold: #f1c232;
  --mc-copper: #e06b2c;
  --mc-redstone: #c4302b;
  --mc-pink: #e88bb0;
  --mc-amethyst: #9a5de8;
  --mc-lapis: #3457a8;
  --mc-blue: #3b49b5;
  --mc-diamond: #4fd3e8;
  --mc-warped: #14b8a6;
  --mc-lime: #70b41c;
  --mc-emerald: #2ecc71;
  --mc-moss: #5a8f2a;
  --mc-dirt: #8b5a2b;

  /* Paper UI roles */
  --ink: #1d1d21;
  --muted: #4a4e53; /* ~6.5:1 on paper (was #5c5f63) */
  --paper: #efe9df; /* calcite */
  --card: #faf8f3;
  --line: #d4cfc3;
  --line-strong: #c4bfb2;
  /* Accents for TEXT on light paper — dark enough for AA normal (≥4.5:1) */
  --accent: #345c1a; /* moss dark — links / kickers */
  --accent-bright: #3d6b1f; /* brand “Minecraft” word + large numbers */
  --accent2: #8a4018; /* copper dark — secondary / warn text */
  --pos: #345c1a;
  --neg: #9c2622; /* redstone dark — slightly under #c4302b for AA buffer */
  --highlight: #f1c232;

  /* Data viz series — Minecraft map / block hues (match minescore-paper.js) */
  --dv-day: #7fb238; /* grass */
  --dv-sunset: #e2774a; /* copper */
  --dv-night: #4a80ff; /* lapis */
  --dv-sunrise: #ff3200; /* lit redstone */
  --dv-highlight: #faee4d; /* gold block */
  --dv-emerald: #00d93a;
  --dv-diamond: #5cdbd5;
  --dv-amethyst: #9a5cc6;
  --dv-pink: #e89abf;
  --dv-warped: #14b8a6;
  --dv-purpur: #a35cab;
  --dv-copper: #b87333;
  --dv-redstone: #ab1b09;
  --dv-netherite: #443a3b;
  --dv-water: #3f76e4;
  --dv-steve: #4a80ff;
  --dv-alex: #e2774a;
  --dv-hc: #5a5a5a;
  --dv-cat-1: var(--dv-day);
  --dv-cat-2: var(--dv-diamond);
  --dv-cat-3: var(--dv-highlight);
  --dv-cat-4: var(--dv-night);
  --dv-cat-5: var(--dv-emerald);
  --dv-cat-6: var(--dv-redstone);
  --dv-cat-7: var(--dv-copper);
  --dv-cat-8: var(--dv-amethyst);
  --dv-cat-9: var(--dv-warped);
  --dv-cat-10: var(--dv-netherite);

  --font-display: "Sora", "Figtree", system-ui, sans-serif;
  --font-pixel: var(--font-display); /* legacy alias */
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --list-bullet-icon: url("../img/items/emerald.png");
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 50% at 10% -10%, rgba(112, 180, 28, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 70% 40% at 100% 0%, rgba(224, 107, 44, 0.07) 0%, transparent 50%),
    var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

html {
  overflow-x: clip;
}

main {
  display: block;
  width: 100%;
}

.wrap {
  box-sizing: border-box;
  width: min(100%, 980px);
  max-width: 980px;
  margin-inline: auto;
  padding:
    max(1rem, env(safe-area-inset-top, 0px))
    max(1.25rem, env(safe-area-inset-right, 0px))
    max(4rem, calc(2.5rem + env(safe-area-inset-bottom, 0px)))
    max(1.25rem, env(safe-area-inset-left, 0px));
}
/* Terrain may sit after main (static) or after wp_footer inject (WP).
   Drop the default 4rem bottom pad whenever a terrain strip is on the page. */
.wrap:has(+ .footer-terrain),
article.wrap:has(+ .footer-terrain),
main:has(+ .footer-terrain) .wrap,
main.wrap:has(+ .footer-terrain),
body:has(.footer-terrain) .wrap,
body:has(.footer-terrain) main.wrap {
  padding-bottom: 0.75rem;
}

/* Skip link + focus */
.skip-link {
  position: absolute;
  left: max(0.75rem, env(safe-area-inset-left, 0px));
  top: max(0.75rem, env(safe-area-inset-top, 0px));
  z-index: 1000;
  padding: 0.55rem 0.9rem;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
:where(
  a,
  button,
  summary,
  .home-cta__btn,
  .stat-bubble,
  .related-card,
  .see-also__link,
  .article-list__item,
  .paper-nav a,
  .topic-pill
):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Tables: scroll, never clip */
.table-scroll {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.75rem 0 1rem;
  background:
    linear-gradient(90deg, var(--paper) 40%, transparent) 0 0 / 18px 100% local,
    linear-gradient(270deg, var(--paper) 40%, transparent) 100% 0 / 18px 100% local,
    linear-gradient(90deg, rgba(29, 29, 33, 0.1), transparent 50%) 0 0 / 12px 100% local,
    linear-gradient(270deg, rgba(29, 29, 33, 0.1), transparent 50%) 100% 0 / 12px 100% local;
  background-repeat: no-repeat;
  background-attachment: local, local, scroll, scroll;
}
.table-scroll table {
  margin: 0;
  min-width: 28rem;
}
@media (max-width: 720px) {
  .table-scroll::before {
    content: "Swipe for all columns →";
    display: block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin: 0 0 0.4rem;
  }
}

a { color: var(--accent); }
a:hover { color: var(--pos); }

/* ── Masthead: centered logo + nav ── */
.paper-masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 0 0 2.75rem;
  padding: 0;
  text-align: center;
  width: 100%;
}
.site-brand {
  display: block;
  margin: 0 auto;
  text-decoration: none;
  color: inherit;
  width: fit-content;
  max-width: 100%;
}
.site-brand:hover .site-brand__logo {
  opacity: 0.92;
}
.site-brand__logo,
.site-brand__mark {
  /* Definite size — avoid % of indefinite parent (2120px intrinsic logo) */
  width: min(420px, 88vw);
  height: auto;
  margin-inline: auto;
  margin-bottom: 0;
  border-radius: 0;
  image-rendering: auto;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  object-position: center bottom;
}
/* Legacy text brand — tagline lives in the logo artwork */
.site-brand__name,
.site-brand__text,
.site-brand__tag {
  display: none;
}

.paper-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.2rem 0.15rem;
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
  width: 100%;
}
.paper-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 0.55rem 0.75rem;
  border-radius: 4px;
  position: relative;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.paper-nav a::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.2rem;
  height: 1.5px;
  background: var(--accent);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
  pointer-events: none;
}
.paper-nav a:hover {
  color: var(--accent);
  background: rgba(52, 92, 26, 0.08);
  transform: translateY(-1px);
}
.paper-nav a:hover::after {
  transform: scaleX(1);
}
.paper-nav a:active {
  transform: translateY(0);
}
.paper-nav a[aria-current="page"],
.paper-nav a[aria-current="true"] {
  color: var(--accent);
  background: rgba(52, 92, 26, 0.1);
  font-weight: 600;
}
.paper-nav a[aria-current="page"]::after,
.paper-nav a[aria-current="true"]::after {
  transform: scaleX(1);
  opacity: 0.85;
}
@media (prefers-reduced-motion: reduce) {
  .paper-nav a,
  .paper-nav a::after {
    transition: none;
  }
  .paper-nav a:hover,
  .paper-nav a:active {
    transform: none;
  }
}

/* Extra air between masthead and article body */
.paper-masthead + .hero-lead,
.paper-masthead + .kicker,
.paper-masthead + h1,
.paper-masthead + .home-hero__grid {
  margin-top: 0.25rem;
}

/* ── Hero (type-first + Tycon author mascot) ── */
header.hero {
  padding: 0.25rem 0 2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}
.hero-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 160px);
  gap: 0.75rem 1.15rem;
  align-items: end;
  margin: 0 0 0.25rem;
}
.hero-avatar {
  display: block;
  order: 2;
  width: 100%;
  max-width: 160px;
  height: auto;
  margin: 0 0 -0.2rem auto;
  object-fit: contain;
  object-position: bottom center;
  background: transparent;
  border: none;
  border-radius: 0;
  image-rendering: auto;
  /* Quiet byline mark — not a second hero beside the question */
  filter: drop-shadow(0 6px 12px rgba(29, 29, 33, 0.1));
  pointer-events: none;
  user-select: none;
  opacity: 0.92;
}
.hero-copy {
  order: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 0.15rem;
}
.kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.55rem;
}
h1,
header.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.2vw, 2.65rem);
  line-height: 1.12;
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
}
.deck,
.lede {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 38rem;
  margin: 0;
  font-family: var(--font-body);
  line-height: 1.55;
}
.meta__author {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.45rem 0.65rem;
  font-weight: 600;
  color: var(--ink, #1a1a1a);
}
.meta__author img {
  /* Legacy small chip — prefer .hero-avatar for the Tycon author cutout */
  width: 36px;
  height: 48px;
  border-radius: 0;
  object-fit: contain;
  object-position: bottom center;
  background: transparent;
  border: none;
  image-rendering: auto;
  flex-shrink: 0;
}
.meta__author strong {
  font-weight: 700;
  letter-spacing: -0.01em;
}
.meta__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mc-lime) 22%, var(--card));
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  flex-shrink: 0;
  white-space: nowrap;
}
.meta {
  margin-top: 1.15rem;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
}
.meta > .meta__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding-left: 0.85rem;
  border-left: 1px solid var(--line-strong);
  flex-shrink: 0;
  white-space: nowrap;
}
.meta > .meta__author {
  padding-left: 0;
  border-left: none;
  margin-right: 0.15rem;
  flex-shrink: 0;
  white-space: nowrap;
}
.meta > .meta__scope {
  flex: 0 0 auto;
}
/* Kill the old ::before divider experiment if present */
.meta__item + .meta__item::before,
.meta > .meta__item:not(:first-child)::before,
.meta > span:not(.meta__author):not(:first-child)::before {
  content: none;
  display: none;
}
.meta > * {
  margin-right: 0;
}

/* Desktop/tablet: one unbroken meta line under the full hero (not squeezed beside the avatar) */
@media (min-width: 561px) {
  .hero-lead {
    grid-template-columns: minmax(0, 1fr) minmax(96px, 160px);
    grid-template-areas:
      "kicker avatar"
      "title avatar"
      "deck avatar"
      "meta meta";
    align-items: end;
    column-gap: 1.15rem;
    row-gap: 0.15rem;
  }
  /* Scope to paper .hero-lead only — never flatten homepage .home-hero .hero-copy */
  .hero-lead > .hero-copy {
    display: contents;
  }
  .hero-lead .hero-copy .kicker {
    grid-area: kicker;
    align-self: start;
  }
  .hero-lead .hero-copy h1 {
    grid-area: title;
    align-self: start;
  }
  .hero-lead .hero-copy .deck,
  .hero-lead .hero-copy .lede {
    grid-area: deck;
    align-self: start;
  }
  .hero-avatar {
    grid-area: avatar;
    align-self: end;
  }
  .hero-lead .hero-copy .meta {
    grid-area: meta;
    width: auto;
    max-width: 100%;
    margin-top: 0.55rem;
  }
}

@media (max-width: 720px) and (min-width: 561px) {
  .hero-lead {
    grid-template-columns: minmax(0, 1fr) minmax(80px, 128px);
    column-gap: 0.85rem;
  }
  .hero-avatar {
    max-width: 128px;
    margin: 0 0 -0.15rem auto;
  }
}

@media (max-width: 560px) {
  .hero-lead {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    column-gap: 0.75rem;
    row-gap: 0.65rem;
    align-items: end;
    justify-items: stretch;
  }
  /* Let kicker/h1/deck/meta participate in .hero-lead so avatar can sit beside meta */
  .hero-lead > .hero-copy {
    display: contents;
  }
  .hero-lead .hero-copy .kicker {
    order: 1;
    grid-column: 1 / -1;
  }
  .hero-lead .hero-copy h1 {
    order: 2;
    grid-column: 1 / -1;
  }
  .hero-lead .hero-copy .deck,
  .hero-lead .hero-copy .lede {
    order: 3;
    grid-column: 1 / -1;
  }
  .hero-avatar {
    order: 4;
    grid-column: 1;
    width: 96px;
    max-width: 96px;
    margin: 0;
    justify-self: start;
    align-self: end;
    filter: drop-shadow(0 8px 14px rgba(29, 29, 33, 0.12));
  }
  .hero-lead .hero-copy .meta {
    order: 5;
    grid-column: 2;
    margin-top: 0;
    align-self: center;
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 0.15rem;
    font-size: 0.82rem;
    line-height: 1.35;
    white-space: normal;
  }
  .hero-lead .hero-copy .meta > .meta__item {
    padding-left: 0;
    border-left: none;
    white-space: normal;
    flex-shrink: 1;
  }
  .hero-lead .hero-copy .meta > .meta__author {
    white-space: normal;
    flex-wrap: wrap;
    gap: 0.3rem 0.45rem;
  }
  .hero-lead .hero-copy .meta__badge {
    padding: 0.12rem 0.5rem;
    font-size: 0.68rem;
  }
  header.hero h1 {
    font-size: clamp(1.55rem, 7vw, 1.95rem);
  }
  .site-brand__logo,
  .site-brand__mark {
    width: min(280px, 82vw);
  }
}

/* Featured image / article index / callouts / wow / vs / chips / method:
   mining-minecraft/content.css (load after this file). */

/* ── Type ── */
h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  margin: 2.5rem 0 0.75rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.45rem;
}
p { margin: 0.7rem 0; }

/* Tables (paper ink on paper surface) */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--card);
  border: 1px solid var(--line);
  margin: 1rem 0 0.5rem;
}
th, td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: rgba(90, 143, 42, 0.08);
  font-weight: 600;
}
tr:last-child td { border-bottom: 0; }
td.pos { color: var(--pos); font-weight: 600; }
td.neg { color: var(--neg); font-weight: 600; }
th.num,
td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  font-size: 0.92em;
  white-space: nowrap;
}

/* Lists · sources chrome (paper). Shared icons/policy also in content.css. */
ol.method,
ol {
  padding-left: 1.2rem;
}
ol.method li,
ol li {
  margin: 0.35rem 0;
}

ul.list {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0.65rem 0 1rem;
}
ul.list > li {
  margin: 0.35rem 0;
}

ul.list--icons,
article ul:not([class]),
.math-body ul:not([class]),
.callout ul:not([class]),
.method-box ul:not([class]) {
  list-style: none;
  padding-left: 0;
  margin: 0.75rem 0 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

ul.list--icons > li,
article ul:not([class]) > li,
.math-body ul:not([class]) > li,
.callout ul:not([class]) > li,
.method-box ul:not([class]) > li {
  position: relative;
  padding-left: 1.7rem;
  margin: 0;
}

ul.list--icons > li::before,
article ul:not([class]) > li::before,
.math-body ul:not([class]) > li::before,
.callout ul:not([class]) > li::before,
.method-box ul:not([class]) > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 15px;
  height: 15px;
  background: var(--list-bullet-icon) center / contain no-repeat;
  image-rendering: pixelated;
}

.command {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--line);
  padding: 0.85rem 1rem;
  margin: 0.75rem 0 1rem;
  overflow-x: auto;
  color: var(--pos);
}
.sources {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--ink);
}
.sources h2 { margin-top: 0; }
.sources h3 {
  margin-top: 1.25rem;
  font-size: 1rem;
}
.sources ol { padding-left: 1.2rem; }
.sources li {
  margin: 0.55rem 0;
  font-size: 0.9rem;
}
.sources a { color: var(--accent); }
footer,
.paper-foot {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}
.paper-foot p { margin: 0.35rem 0; }
.paper-foot__nav a { color: var(--accent); }
.paper-foot__nav a:hover { text-decoration: underline; }

/* Terrain strip — full-bleed under page (sibling of main / .wrap) */
.footer-terrain {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  /* Fill iOS home-indicator band with dirt so paper never peeks under the strip */
  padding-bottom: max(0px, env(safe-area-inset-bottom, 0px));
  border: 0;
  line-height: 0;
  background: #5c3018;
  overflow: hidden;
}
.footer-terrain::before {
  display: none;
}
.footer-terrain picture {
  display: block;
  width: 100%;
  line-height: 0;
}
.footer-terrain img,
.footer-terrain__img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: bottom;
  pointer-events: none;
  user-select: none;
  image-rendering: auto;
}
.paper-foot:has(+ .footer-terrain),
.wrap:has(+ .footer-terrain),
main:has(+ .footer-terrain) {
  margin-bottom: 0;
}
/* When terrain follows main, pull paper-foot flush to the strip */
main:has(+ .footer-terrain) .paper-foot {
  margin-bottom: 0;
  padding-bottom: 0;
}
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

@media (max-width: 640px) {
  table { font-size: 0.8rem; }
  th, td { padding: 0.45rem 0.35rem; }
}

/* ── Paper re-theme of dataviz chrome (load this file after dataviz.css) ── */
:root {
  --dv-bg: var(--paper);
  --dv-surface: var(--card);
  --dv-border: var(--line);
  --dv-text: var(--ink);
  --dv-muted: var(--muted);
  --dv-grid: rgba(29, 29, 33, 0.08);
  --dv-font-pixel: var(--font-pixel);
  --dv-font-body: var(--font-body);
  --dv-radius: 10px;
}

.dv-panel,
.chart-card.dv-panel {
  box-shadow: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--dv-radius, 10px);
  color: var(--ink);
  padding: 1rem 1rem 0.9rem;
}

.dv-callout {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}

.dv-callout__value {
  color: var(--ink);
  font-family: var(--font-display);
}

.dv-callout__label {
  color: var(--muted);
}

.dv-canvas {
  min-height: 240px;
}

/* Paper chart legend + series key */
.chart-legend,
.dv-legend {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
}
.chart-legend li,
.dv-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.25;
}
.chart-legend__swatch,
.dv-legend__swatch {
  width: 0.85rem;
  height: 0.85rem;
  flex-shrink: 0;
  border-radius: 0;
  image-rendering: pixelated;
  box-shadow: inset 0 0 0 1px rgba(29, 29, 33, 0.18);
}
.chart-series-key {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.55rem;
  margin: 0.85rem 0 1.25rem;
}
.chart-series-key__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.chart-series-key__item strong {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.78rem;
}
.chart-series-key__swatch {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 0;
  flex-shrink: 0;
  image-rendering: pixelated;
  box-shadow: inset 0 0 0 1px rgba(29, 29, 33, 0.14);
}
/* Blockier chart cards — square corners echo voxel fills */
.chart-box {
  border-radius: 6px;
}
.chart-wrap canvas {
  image-rendering: auto;
}

/* ── Minescore homepage ── */
.wrap--home {
  padding-top: 1.25rem;
}
.home-hero {
  margin-bottom: 2.5rem;
  padding-bottom: 2.25rem;
}
.home-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 1.5rem 1.75rem;
  align-items: center;
}
.home-hero .hero-copy {
  order: 1;
  min-width: 0;
}
.home-hero h1 {
  margin-bottom: 0.12rem;
}
.home-hero__tagline {
  font-family: var(--font-body);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  text-transform: none;
  color: var(--ink);
  margin: 0 0 0.85rem;
  line-height: 1.2;
}
.home-hero .deck {
  max-width: 34rem;
}
.home-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.6rem;
  margin: 1.25rem 0 0;
}
.home-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.65rem 1.05rem;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: transparent;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.home-cta__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(52, 92, 26, 0.06);
}
.home-cta__btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #f7f4ec;
}
.home-cta__btn--primary:hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  color: #f7f4ec;
}
.home-cta-note {
  margin: 0.75rem 0 0;
  max-width: 34rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--muted);
}
.home-cta-note a {
  font-weight: 600;
}

/* Iso + floating callouts — paper fonts; numbers from our papers */
.wrap--home,
.home-hero,
.home-hero__grid,
.paper-iso {
  overflow: visible;
}
.paper-iso {
  position: relative;
  order: 2;
  min-height: 340px;
  padding: 2rem 1.25rem 1.75rem;
  z-index: 1;
}
.paper-iso .home-hero__scene {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: none;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
}
.paper-iso .home-hero__scene img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 40px rgba(29, 29, 33, 0.14));
}
.paper-iso .home-hero__leaders {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.paper-iso .home-hero__leader {
  stroke: #94a3b8;
  stroke-width: 0.35;
  stroke-linecap: round;
  opacity: 0.7;
}
.paper-iso--quiet .home-hero__scene {
  opacity: 0.72;
}
.paper-iso--quiet .home-hero__scene img {
  filter: saturate(0.85);
}
.paper-iso .stat-bubble {
  position: absolute;
  z-index: 5;
  display: flex !important;
  align-items: center;
  gap: 0.65rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: none;
  padding: 0.55rem 0.75rem;
  max-width: 210px;
  color: var(--ink);
  text-decoration: none;
  /* No bobbing — curiosity chips, not toys */
  animation: none;
  pointer-events: auto;
}
.paper-iso .stat-bubble--ask {
  max-width: 200px;
}
.paper-iso .stat-bubble--ask .stat-bubble__copy strong {
  font-size: 0.82rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.paper-iso .stat-bubble--ask .stat-bubble__copy span {
  font-size: 0.72rem;
}
.paper-iso .stat-bubble:hover {
  border-color: var(--accent);
  color: var(--ink);
}
.paper-iso .stat-bubble__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}
.paper-iso .stat-bubble__icon--green {
  background: #e8f8ef;
}
.paper-iso .stat-bubble__icon--amber {
  background: #fffbeb;
}
.paper-iso .stat-bubble__icon img {
  width: 22px;
  height: 22px;
  image-rendering: pixelated;
}
.paper-iso .stat-bubble__copy {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}
.paper-iso .stat-bubble__copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.paper-iso .stat-bubble__copy span {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.25;
  max-width: 12rem;
}
.paper-iso .home-hero__float--1 { top: 4%; left: 0; }
.paper-iso .home-hero__float--2 { top: 2%; right: 0; }
.paper-iso .home-hero__float--3 { bottom: 10%; left: 0; }
.paper-iso .home-hero__float--4 { bottom: 4%; right: 0; }

.home-section {
  margin: 0 0 2.75rem;
}
.home-section__head {
  margin: 0 0 1.15rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.home-section__head h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  color: var(--ink);
}
.home-section__head p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 36rem;
}

.home-spotlight.wow-pair {
  margin: 0;
}
.home-spotlight .wow {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}
.home-spotlight .wow:hover {
  border-color: var(--accent);
  color: inherit;
}
.home-spotlight .wow:hover .sub {
  color: var(--accent);
}

.home-featured {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.home-featured__item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: stretch;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  background: var(--card);
  overflow: hidden;
  border-radius: 4px;
  transition: border-color 0.15s ease;
  min-width: 0;
  min-height: 0;
}
.home-featured__item:hover {
  border-color: var(--accent);
  color: inherit;
}
.home-featured__item img {
  display: block;
  width: 96px;
  height: 100%;
  min-height: 72px;
  max-height: 88px;
  object-fit: cover;
  background: var(--paper);
}
.home-featured__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.55rem 0.7rem;
  min-width: 0;
}
.home-featured__kicker {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.home-featured__body strong {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-featured__body > span:last-child {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-more {
  margin: 1.15rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.home-more a {
  text-decoration: none;
  font-weight: 600;
}
.home-more a:hover {
  text-decoration: underline;
}

.home-browse {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.home-browse li {
  border-bottom: 1px solid var(--line);
}
.home-browse a {
  display: block;
  padding: 0.9rem 0.1rem;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
}
.home-browse a:hover {
  color: var(--accent);
}
.home-browse strong {
  color: var(--ink);
  font-weight: 700;
}
.home-browse a:hover strong {
  color: var(--accent);
}

/* Compact findings strip (home mobile / overflow from hero floats) */
/* Compact findings strip — replaces iso floats under 900px */
.home-findings {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin: 0 0 2rem;
}
.home-findings a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 6px;
  padding: 0.55rem 0.65rem;
  font-size: 0.85rem;
}
.home-findings a:hover {
  border-color: var(--accent);
}
.home-findings strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--accent-bright);
}
.home-findings span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}
.home-findings img {
  width: 22px;
  height: 22px;
  image-rendering: pixelated;
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .home-findings { display: grid; }
}

/* About strip */
.home-about {
  margin: 2rem 0 0;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--line);
}
.home-about h2 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
}
.home-about p {
  margin: 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.home-about + .paper-foot {
  margin-top: 1rem;
}

/* Hub topic jump — match .faq-toc (label on its own row) */
.hub-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  align-items: center;
  margin: 0.25rem 0 1.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius-sm, 8px);
}
.hub-jump__label {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.15rem;
}
.hub-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
  padding: 0.25rem 0.1rem;
  border-radius: 4px;
}
.hub-jump a:hover {
  text-decoration: underline;
  background: transparent;
}
@media (max-width: 640px) {
  .hub-jump {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 0.35rem 0.65rem;
    padding: 0.75rem 0.85rem;
  }
  .hub-jump__label {
    width: 100%;
    margin: 0 0 0.1rem;
  }
  .hub-jump a {
    flex: 0 1 auto;
    white-space: normal;
  }
}

.article-list__thumb--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
}
.article-list__thumb--icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: pixelated;
}

@media (max-width: 900px) {
  .home-hero__grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  /* Flatten copy so we can put the iso between deck and CTA */
  .home-hero .hero-copy {
    display: contents;
    text-align: center;
  }
  .home-hero h1 {
    order: 1;
  }
  .home-hero .home-hero__tagline {
    order: 2;
  }
  .home-hero .deck {
    order: 3;
    margin-inline: auto;
  }
  .home-hero .home-hero__visual {
    order: 4;
  }
  .home-hero .home-cta {
    order: 5;
    justify-content: center;
    margin-top: 0.35rem;
  }
  .home-hero .home-cta-note {
    order: 6;
    margin-inline: auto;
  }
  .paper-iso {
    min-height: 0;
    padding: 0.75rem 0.5rem 0.5rem;
  }
  .paper-iso .home-hero__leaders {
    display: none;
  }
  /* Iso stays visual-only on narrow viewports; questions live in .home-findings */
  .paper-iso .home-hero__float {
    display: none !important;
  }
}
.home-findings--ask strong {
  color: var(--ink);
  font-size: 0.88rem;
  letter-spacing: -0.01em;
}
.home-findings--ask a {
  align-items: flex-start;
}
@media (max-width: 640px) {
  .site-brand__logo,
  .site-brand__mark {
    width: min(300px, 86vw);
  }
  .home-featured {
    grid-template-columns: 1fr;
  }
  .home-featured__item {
    grid-template-columns: 88px minmax(0, 1fr);
  }
  .home-featured__item img {
    width: 88px;
    max-height: 88px;
  }
  .home-findings {
    gap: 0.45rem;
  }
  .home-findings strong {
    font-size: 0.95rem;
  }
  .home-findings span {
    font-size: 0.7rem;
  }
}
@media (max-width: 520px) {
  .home-featured__item {
    grid-template-columns: 80px minmax(0, 1fr);
  }
  .home-featured__item img {
    width: 80px;
    max-height: 80px;
  }
}

/* —— Minecraft Wiki invicons (same assets as dark theme) ——
   Source: assets/img/blocks|items · credits in ASSETS.md
   Use for game content only; Material Symbols stay for chrome. */
.pixel,
.mc-icon {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.mc-icon {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  vertical-align: -0.2em;
  object-fit: contain;
  flex-shrink: 0;
}
.mc-icon--sm { width: 1rem; height: 1rem; }
.mc-icon--md { width: 1.5rem; height: 1.5rem; }
.mc-icon--lg { width: 2rem; height: 2rem; }
.mc-icon--xl { width: 2.5rem; height: 2.5rem; }

.topic-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.7rem 0.3rem 0.45rem;
  text-decoration: none;
}
.topic-pill img {
  width: 1.15rem;
  height: 1.15rem;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.topic-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.topic-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0 1rem;
}

.block-rail {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.45rem 0.55rem;
  padding: 0.35rem 0;
}
.block-rail img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 1px 2px rgba(29, 29, 33, 0.12));
  transition: transform 0.2s ease;
}
.block-rail img:hover {
  transform: translateY(-3px) scale(1.08);
}
.block-rail__credit,
.wiki-credit {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.55rem 0 0;
}
.block-rail__credit a,
.wiki-credit a {
  color: var(--accent);
}

.icon-list {
  list-style: none;
  margin: 0.75rem 0 1.25rem;
  padding: 0;
}
.icon-list li {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin: 0.45rem 0;
  padding-left: 0;
}
.icon-list li::before {
  display: none;
}
.icon-list img {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  flex-shrink: 0;
  position: relative;
  top: 0.15rem;
}
.icon-list strong {
  font-variant-numeric: tabular-nums;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--ink);
}

.mm-cell--version {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.88em;
}
.mm-cell--version img {
  width: 1.1rem;
  height: 1.1rem;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.stat .mc-icon,
.stat > img.mc-icon {
  display: block;
  margin: 0 auto 0.35rem;
}

.series-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 0.65rem 0 1rem;
  padding: 0;
  list-style: none;
}
.series-key li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  padding: 0;
}
.series-key li::before {
  display: none;
}
.series-key img {
  width: 1.15rem;
  height: 1.15rem;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.series-key__swatch {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(29, 29, 33, 0.15);
}
