/* Shared styles for every playquads.com page except the homepage (rules,
   guides, blog, support, privacy, 404). The homepage keeps its own inline
   styles. Palette = the app's default "wood" skin (src/theme.js), same tokens
   as web/index.html: a dark espresso band up top (.page-hero) carrying the
   title, then the article on the app's cream. */
:root {
  --screen: #f4ebd9;
  --panel: #ece0c6;
  --chip: #e3d3b0;
  --boardbg: #a37a52;
  --cell: #c99a5c;
  --cell-hi: #ecc37c;
  --ink: #4a3419;
  --sub: #7a5c33;
  --accent: #b5651d;
  --accent-ink: #9a5416;
  --on-accent: #f4ebd9;
  --dark-piece: #43290f;
  --dark-edge: #241505;
  --light-piece: #f0d8ac;
  /* src/components/Piece.js darkens lightEdge (#c19a63) by 35% for light
     pieces so they hold up on the tan cell colour. */
  --light-edge: #7d6440;
  --edge-line: #d9c9ae;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--screen);
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
img { max-width: 100%; }

/* The site header and mobile menu live in /nav.css, shared with the homepage. */

/* ---------------- Page hero ----------------
   The band under the header: breadcrumb, kicker, h1 and the byline or lede.
   Same ground as the homepage hero, so every page opens the same way. */
.page-hero {
  position: relative;
  overflow: hidden;
  color: var(--screen);
  background:
    radial-gradient(44rem 22rem at 85% 0%, rgba(208, 122, 43, .28), transparent 65%),
    linear-gradient(160deg, #3a2410, #241505 70%);
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(244, 235, 217, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 235, 217, .045) 1px, transparent 1px);
  background-size: 4.5rem 4.5rem;
  -webkit-mask-image: radial-gradient(ellipse at 85% 20%, #000 5%, transparent 65%);
  mask-image: radial-gradient(ellipse at 85% 20%, #000 5%, transparent 65%);
  pointer-events: none;
}
.page-hero .inner { position: relative; max-width: 44rem; margin: 0 auto; padding: 2.25rem 1.25rem 2.75rem; }
.page-hero .crumbs { color: rgba(244, 235, 217, .6); margin-bottom: 1.5rem; }
.page-hero .crumbs a { color: rgba(244, 235, 217, .8); text-decoration: none; }
.page-hero .crumbs a:hover { color: #ecc37c; text-decoration: underline; }
.page-hero .kicker { color: #ecc37c; letter-spacing: .14em; }
.page-hero h1 { margin-bottom: 0; text-wrap: balance; }
.page-hero .meta, .page-hero .lede { color: rgba(244, 235, 217, .72); margin: 1rem 0 0; }
.page-hero .lede { font-size: 1.125rem; max-width: 34rem; }
.page-hero .meta a, .page-hero .lede a { color: #ecc37c; }

/* ---------------- Article ---------------- */
main.article { max-width: 44rem; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
main.article > h2:first-child, main.article > article > h2:first-child { margin-top: 0; }
.crumbs { font-size: .8125rem; color: var(--sub); margin: 0 0 1.25rem; }
.crumbs a { color: var(--sub); }
.crumbs span[aria-hidden] { margin: 0 .35rem; }
.kicker {
  display: block;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--sub);
  margin-bottom: .6rem;
}
/* Titles and headings are set in Outfit Black (@font-face in nav.css). */
h1, h2, h3 { font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-weight: 900; }
h1 {
  font-size: clamp(2.1rem, 5.8vw, 3.1rem);
  letter-spacing: -.015em;
  line-height: 1.05;
  margin: 0 0 1rem;
}
h2 { font-size: 1.6rem; line-height: 1.15; letter-spacing: -.01em; margin: 2.75rem 0 .75rem; }
h3 { font-size: 1.2rem; line-height: 1.25; margin: 1.75rem 0 .5rem; }
p { margin: 0 0 1.1rem; }
.lede { font-size: 1.125rem; color: var(--sub); }
ul, ol { margin: 0 0 1.1rem; padding-left: 1.35rem; }
li { margin-bottom: .45rem; }
li::marker { color: var(--accent); }
strong { font-weight: 700; }
.meta { font-size: .875rem; color: var(--sub); margin: -.25rem 0 1.5rem; }

/* Answer-first summary: the paragraph an answer engine is most likely to
   lift, so it sits directly under the H1. */
.answer {
  border-left: 4px solid #e8721c;
  padding: .2rem 0 .2rem 1.4rem;
  margin: 0 0 2.25rem;
  font-size: 1.2rem;
  line-height: 1.55;
}
.answer p:last-child, .note p:last-child { margin-bottom: 0; }
.note {
  font-size: .9375rem;
  color: var(--sub);
  border-top: 1px solid var(--edge-line);
  border-bottom: 1px solid var(--edge-line);
  padding: 1rem 0;
  margin: 1.75rem 0;
}
.note strong { color: var(--ink); }

.toc {
  border: 1px solid var(--edge-line);
  border-radius: 1rem;
  padding: .9rem 1.2rem .5rem;
  margin: 0 0 2rem;
  font-size: .9375rem;
}
.toc strong { display: block; margin-bottom: .35rem; }
.toc ol { margin-bottom: .5rem; }
.toc li { margin-bottom: .2rem; }

.table-wrap { overflow-x: auto; margin: 0 0 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; min-width: 30rem; }
th, td { text-align: left; vertical-align: top; padding: .6rem .7rem; border-bottom: 1px solid var(--edge-line); }
th { color: var(--sub); font-weight: 700; font-size: .8125rem; text-transform: uppercase; letter-spacing: .03em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
/* Our own row in a comparison table: a warm tint and the accent bar the
   .answer block uses, so it reads as "this one is Quads" at a glance. */
tr.ours td { background: rgba(236, 195, 124, .35); }
tr.ours td:first-child { box-shadow: inset 4px 0 0 #e8721c; }

.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.75rem 0; }
/* Buttons: espresso pills on the cream page, the same shape as the header's
   Play pill. Orange is kept for hover so it stays the accent, not the fill. */
.cta, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .9rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  background: #241505;
  color: var(--on-accent);
  border: 2px solid #241505;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}
.cta:hover, .btn:hover { color: #fffaf0; background: #e8721c; border-color: #e8721c; transform: translateY(-2px); }
.cta.secondary, .btn.secondary { background: transparent; color: #241505; }
.cta.secondary:hover, .btn.secondary:hover { background: #241505; border-color: #241505; color: var(--on-accent); }
.btn { padding: .6rem 1.1rem; font-size: .9375rem; }

/* "Play online" card at the top of a post: the blog-card piece strip over a
   title, one line and the play pill. The whole card is the link. */
.play-card {
  display: flex;
  flex-direction: column;
  margin: 0 0 2rem;
  background: var(--panel);
  border: 1px solid var(--edge-line);
  border-radius: 1.4rem;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.play-card:hover { color: var(--ink); border-color: var(--cell); transform: translateY(-3px); box-shadow: 0 16px 30px rgba(36, 21, 5, .1); }
.play-card-body { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; padding: 1.2rem 1.4rem 1.4rem; }
.play-card-title {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 900;
  font-size: 1.45rem;
  line-height: 1.15;
}
.play-card-text { color: var(--sub); font-size: 1rem; line-height: 1.5; }
.play-card .cta { margin-top: .5rem; }
.play-card:hover .cta { color: #fffaf0; background: #e8721c; border-color: #e8721c; }

/* FAQ: an open list on hairlines. The toggle is a ring holding a plus that
   fills and turns to a minus when open. */
.faq { margin: 1.25rem 0 2rem; border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--edge-line); }
.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.2rem 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 900;
  font-size: 1.2rem;
  line-height: 1.2;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background:
    linear-gradient(var(--ink), var(--ink)) center / .75rem 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px .75rem no-repeat;
  transition: background-color .15s ease;
}
.faq summary:hover::after { background-color: var(--chip); }
.faq details[open] summary::after { background: linear-gradient(var(--screen), var(--screen)) center / .75rem 2px no-repeat, var(--ink); }
.faq summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: .25rem; }
.faq details p { margin: -.15rem 3.25rem 1.3rem 0; color: var(--sub); font-size: 1rem; }

/* Keep reading: each link is a row with an arrow, not a bulleted list. */
.related { margin-top: 3.5rem; padding-top: 2.25rem; border-top: 2px solid var(--ink); }
.related h2 { font-size: 1.35rem; margin: 0 0 1rem; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.related li { margin: 0; }
.related a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--edge-line);
  border-radius: 1rem;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.related a::after { content: '\2192'; flex: none; font-weight: 700; transition: transform .15s ease; }
.related a:hover { background: #241505; border-color: #241505; color: var(--on-accent); }
.related a:hover::after { transform: translateX(4px); }

/* ---------------- Board diagrams ----------------
   Markup: .board > [corner, A-D labels, then per row: row label + 4 .cell].
   Cells are numbered left-to-right, top-to-bottom: A1 is top-left, D4 is
   bottom-right. A piece is <i class="pc ..."> with one class per trait that
   is ON: t = tall (drawn big), d = dark, q = square, o = hollow. No class
   means short / light / round / solid. Mirrors src/components/Piece.js. */
.board-fig { margin: 1.5rem auto 1.75rem; max-width: 21rem; }
.board-fig.small { max-width: 15rem; }
.board {
  --hole: var(--cell);
  display: grid;
  grid-template-columns: 1.1rem repeat(4, 1fr);
  gap: 6px;
  padding: 8px 10px 10px 4px;
  background: var(--boardbg);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(36, 21, 5, .18);
}
.board .lbl {
  font-size: .6875rem;
  font-weight: 700;
  color: #f4ebd9;
  display: grid;
  place-items: center;
  line-height: 1;
  min-height: 1rem;
}
.cell {
  aspect-ratio: 1;
  background: var(--cell);
  border-radius: 22%;
  display: grid;
  place-items: center;
  position: relative;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
}
.cell.hi { background: var(--cell-hi); --hole: var(--cell-hi); }
.cell.target { box-shadow: inset 0 0 0 3px var(--accent), 0 0 0 2px #f4ebd9; }
.cell.bad { box-shadow: inset 0 0 0 3px #7c1d12; }
.cell .tag {
  position: absolute;
  font-size: .6875rem;
  font-weight: 800;
  color: var(--ink);
  opacity: .75;
}
.board-fig figcaption { font-size: .875rem; color: var(--sub); text-align: center; margin-top: .6rem; line-height: 1.45; }

/* Pieces are drawn after the two in the app icon, and the same way the app
   draws them (src/components/Piece.js): a thick ring, a soft-cornered square,
   a fill lit from above with a shaded foot, and a slab of shadow beneath. */
.pc {
  display: block;
  position: relative;
  width: 47%;
  aspect-ratio: 1;
  border-radius: 50%;
  background-color: var(--light-piece);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 64%, rgba(0, 0, 0, 0) 78%, rgba(0, 0, 0, .1));
  border: 1.5px solid var(--light-edge);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .2);
}
.pc.t { width: 78%; }
.pc.d { background-color: var(--dark-piece); background-image: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 64%, rgba(0, 0, 0, 0) 78%, rgba(0, 0, 0, .22)); border-color: var(--dark-edge); }
.pc.q { border-radius: 24%; }
.pc.o::after {
  content: '';
  position: absolute;
  inset: 27%;
  border-radius: inherit;
  background: var(--hole);
  border: 1px solid;
  border-color: inherit;
}

/* A piece shown inline in running text or in a row of choices. */
.chip {
  --hole: var(--chip);
  display: inline-grid;
  place-items: center;
  width: 2.1em;
  height: 2.1em;
  vertical-align: middle;
  background: var(--chip);
  border-radius: .5em;
  margin: 0 .1em;
}
.chip .pc.t { width: 82%; }
.chip .pc { width: 52%; }
.pieces-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 1.25rem; align-items: center; }
.pieces-row .chip { width: 3rem; height: 3rem; }

.legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: 1rem 0 1.5rem; }
.legend div { background: var(--panel); border-radius: .9rem; padding: .75rem .9rem; display: flex; gap: .75rem; align-items: center; font-size: .9375rem; }
.legend .pair { display: flex; gap: .3rem; }
.legend .pair .chip { width: 2.4rem; height: 2.4rem; background: var(--cell); --hole: var(--cell); }

/* ---------------- Daily puzzle player ---------------- */
.player { background: var(--panel); border: 1px solid var(--edge-line); border-radius: 1.25rem; padding: 1rem; margin: 0 0 2rem; }
.player .board-fig { margin: .5rem auto 1rem; }
.player .status { font-weight: 700; text-align: center; margin: 0 0 .25rem; min-height: 1.6em; }
.player .hint { font-size: .875rem; color: var(--sub); text-align: center; margin: 0 0 .75rem; }
.player button.cell:not(:disabled) { cursor: pointer; }
.player button.cell:not(:disabled):hover { background: var(--cell-hi); --hole: var(--cell-hi); }
.player button.cell:focus-visible, .player .offer button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.player .offer { display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; margin: 0 0 .75rem; }
.player .offer button {
  --hole: var(--cell);
  width: 4rem; height: 4rem;
  display: grid; place-items: center;
  background: var(--cell);
  border: 2px solid var(--chip);
  border-radius: .8rem;
  cursor: pointer;
  padding: 0;
}
.player .offer button:hover { border-color: var(--accent); }
.player .hand { display: flex; justify-content: center; align-items: center; gap: .75rem; margin: 0 0 .75rem; font-size: .9375rem; }
.player .hand .chip { width: 3.25rem; height: 3.25rem; background: var(--cell); --hole: var(--cell); }
.player .result { text-align: center; }
.player .controls { display: flex; justify-content: center; gap: .6rem; flex-wrap: wrap; }
.day-tabs { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; margin: 0 0 .75rem; }
.day-tabs button { font: inherit; font-size: .875rem; border: 1px solid var(--edge-line); background: var(--screen); color: var(--ink); border-radius: 999px; padding: .3rem .8rem; cursor: pointer; }
.day-tabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------------- Blog index ----------------
   A featured article on the espresso ground, then cards in a grid. Each card
   opens with four of the game's pieces on a strip of board colour, so the
   page has pictures without needing any image files. */
main.blog-index { max-width: 68rem; }
.page-hero.wide .inner { max-width: 68rem; }
main.blog-index > h2 { margin: 3.25rem 0 1.25rem; }
.tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.feature-post {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  align-items: center;
  gap: 2.5rem;
  padding: 2.75rem;
  border-radius: 1.75rem;
  color: var(--screen);
  text-decoration: none;
  background:
    radial-gradient(34rem 20rem at 90% 20%, rgba(208, 122, 43, .32), transparent 65%),
    linear-gradient(160deg, #3a2410, #241505 70%);
  transition: transform .2s ease;
}
.feature-post:hover { color: var(--screen); transform: translateY(-4px); }
.feature-copy { display: grid; gap: .9rem; justify-items: start; }
.feature-post .tag { color: #ecc37c; }
.feature-post strong { font-family: 'Outfit', sans-serif; font-weight: 900; font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.05; letter-spacing: -.01em; text-wrap: balance; }
.feature-desc { color: rgba(244, 235, 217, .75); font-size: 1.0625rem; max-width: 30rem; }
.feature-more { margin-top: .4rem; padding: .7rem 1.3rem; border-radius: 999px; background: #e8721c; border: 2px solid #fffaf0; color: #fffaf0; font-weight: 700; font-size: .9375rem; }
.feature-more::after { content: ' \2192'; }
.feature-board {
  --hole: var(--cell);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 2.4%;
  padding: 2.8%;
  aspect-ratio: 1;
  width: min(100%, 19rem);
  justify-self: center;
  background: #7a4f27;
  border-radius: 8%;
  transform: rotate(-6deg);
  box-shadow: 0 12px 0 #4d3016, 0 30px 50px rgba(8, 4, 0, .5);
}
.feature-board > div { min-height: 0; background: var(--cell); border-radius: 16%; display: grid; place-items: center; }
.feature-board > div.hit { background: var(--cell-hi); --hole: var(--cell-hi); box-shadow: inset 0 0 0 3px #e8721c; }

.post-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.post-grid li {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  background: var(--screen);
  border: 1px solid var(--edge-line);
  border-radius: 1.4rem;
  overflow: hidden;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.post-grid li:hover { border-color: var(--cell); transform: translateY(-4px); box-shadow: 0 16px 30px rgba(36, 21, 5, .1); }
.card-art {
  --hole: var(--cell);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  height: 6.5rem;
  background: var(--cell);
  border-bottom: 4px solid #7a4f27;
}
.card-art .pc { width: 1.7rem; flex: none; }
.card-art .pc.t { width: 2.7rem; }
.post-grid .tag { margin: 1.3rem 1.4rem 0; }
.post-grid a {
  margin: .45rem 1.4rem 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  line-height: 1.15;
  letter-spacing: -.005em;
  color: var(--ink);
  text-decoration: none;
}
/* The whole card is the link. */
.post-grid a::after { content: ''; position: absolute; inset: 0; }
.post-grid li:hover a { color: var(--accent-ink); }
.post-grid a:focus-visible { outline: none; }
.post-grid li:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.post-grid p { margin: .55rem 1.4rem 1.5rem; font-size: .9375rem; line-height: 1.5; color: var(--sub); }

@media (max-width: 900px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-post { grid-template-columns: 1fr; padding: 2rem 1.5rem 2.5rem; }
  .feature-board { width: min(70%, 15rem); order: -1; }
}
@media (max-width: 560px) { .post-grid { grid-template-columns: 1fr; } }

/* ---------------- Support / privacy ----------------
   Short reference pages: their h2s are questions and clause titles, not
   chapter headings, so they sit smaller. */
main.legal h2 { font-size: 1.25rem; letter-spacing: 0; margin: 2.25rem 0 .5rem; }

/* ---------------- 404 ---------------- */
body.lost { min-height: 100vh; display: flex; flex-direction: column; }
body.lost .page-hero { flex: 1; display: grid; align-items: center; text-align: center; }
body.lost .page-hero .inner { padding: 4rem 1.25rem; }
body.lost .cta-row { justify-content: center; margin-bottom: 0; }
body.lost .cta { background: #e8721c; border-color: #fffaf0; color: #fffaf0; border-radius: 1rem; }
body.lost .cta:hover { background: #f58430; }
body.lost .cta.secondary { background: transparent; border-color: rgba(244, 235, 217, .3); color: var(--screen); }
body.lost .cta.secondary:hover { background: rgba(244, 235, 217, .1); border-color: rgba(244, 235, 217, .5); }
/* Three pieces in a row and an empty fourth square. */
.lost-board { display: inline-flex; gap: .5rem; padding: .6rem; background: #7a4f27; border-radius: 1.1rem; margin-bottom: 2rem; }
.lost-board i { width: 3.4rem; height: 3.4rem; border-radius: 16%; background: var(--cell); display: grid; place-items: center; }
.lost-board i::before {
  content: '';
  width: 62%;
  height: 62%;
  border-radius: 50%;
  background-color: var(--dark-piece);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 64%, rgba(0, 0, 0, 0) 78%, rgba(0, 0, 0, .22));
  border: 1.5px solid var(--dark-edge);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .2);
}
.lost-board i:nth-child(2)::before { border-radius: 24%; }
.lost-board i.gap { background: transparent; outline: 2px dashed rgba(236, 195, 124, .75); outline-offset: -3px; }
.lost-board i.gap::before { content: none; }

/* The site footer lives in /nav.css with the header. */

@media (max-width: 560px) {
  body { font-size: 16px; }
  .legend { grid-template-columns: 1fr; }
}

/* ---------------- Charts and stat tiles ----------------
   Charts are inline SVG drawn from the article's own data (no chart
   library). Each one carries its numbers in a table or the text nearby, so
   the figure is never the only place a value lives. */
.chart { margin: 1.75rem 0; }
.chart.narrow { max-width: 24rem; margin-left: auto; margin-right: auto; }
.chart svg { display: block; width: 100%; height: auto; }
.chart-title { font-weight: 700; font-size: .9375rem; margin: 0 0 .5rem; }
.chart figcaption { font-size: .875rem; color: var(--sub); margin-top: .6rem; line-height: 1.45; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .75rem; margin: 0 0 2rem; }
.stat { background: var(--panel); border-radius: 1rem; padding: .9rem 1rem; }
.stat strong { display: block; font-size: 1.6rem; line-height: 1.1; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.stat span { display: block; font-size: .875rem; color: var(--sub); line-height: 1.35; margin-top: .3rem; }
.answer-key { border: 1px dashed var(--edge-line); border-radius: 1rem; padding: .8rem 1.1rem; margin: 0 0 1.75rem; }
.answer-key summary { cursor: pointer; font-weight: 700; color: var(--accent-ink); }

/* Printable sheet (/blog/printable-quarto-board): print only the sheet. */
.print-sheet img { display: block; width: 100%; height: auto; border: 1px solid var(--edge-line); border-radius: .75rem; background: #fff; margin: 0 0 1.5rem; }
@media print {
  .site-header, .page-hero, .site-footer, .related, .cta-row, .no-print { display: none !important; }
  body { background: #fff; }
  .print-sheet { break-after: page; }
  .print-sheet img { border: 0; }
  .print-only-sheets article > :not(.print-sheet) { display: none !important; }
  .print-sheet img { width: 100%; height: auto; }
}
.bars { display: grid; gap: .55rem; }
.bar-row { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr auto; align-items: center; gap: .6rem; font-size: .9375rem; }
.bar-label { color: var(--ink); line-height: 1.25; }
.bar-track { height: 1.1rem; background: var(--panel); border-radius: .35rem; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: .35rem; }
.bar-val { font-weight: 700; font-variant-numeric: tabular-nums; font-size: .875rem; white-space: nowrap; }
@media (max-width: 560px) {
  .bar-row { grid-template-columns: 1fr auto; row-gap: .2rem; }
  .bar-label { grid-column: 1 / -1; }
}
.timeline { list-style: none; padding-left: 0; margin: 0 0 2rem .4rem; border-left: 3px solid var(--cell-hi); }
.timeline li { position: relative; padding-left: 1.3rem; margin-bottom: 1.1rem; }
.timeline li::before { content: ''; position: absolute; left: -.6rem; top: .4rem; width: .85rem; height: .85rem; border-radius: 50%; background: var(--accent); }
.timeline li::marker { content: ''; }
.timeline .yr { display: block; font-weight: 800; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.chart.narrow-wide { max-width: 32rem; margin-left: auto; margin-right: auto; }
.glossary { margin: 0 0 2rem; }
.glossary dt { font-weight: 800; font-size: 1.05rem; margin-top: 1.25rem; scroll-margin-top: 5rem; }
.glossary dd { margin: .25rem 0 0; padding-left: 1rem; border-left: 3px solid var(--cell-hi); }
