/* House of Embers: the shared components (core/components.py; the sheet is /kit). Tokens only, from site.css :root (BRAND.md). Every class starts c-.
   The 4/8 grid: all spacing is a --sp-N step. Phone first; nothing here makes the page scroll sideways (tables scroll inside their own box).
   Hover states are mirrored by .is-hover and focus by .is-focus so the /kit sheet can show them still. Motion is off under reduced motion (site.css). */

.c-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* a table grows to fit its cells whatever width it is given, so a read-aloud table ran 1,400 px off the side of its page and the whole
   page scrolled sideways (the profile's "Level by date"); a fixed layout holds it to the 1 px */
table.c-sr { table-layout: fixed; max-width: 1px; }
.c-eyebrow { font: 600 12px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin: 0 0 var(--sp-3); }
.c-tone-chits { color: var(--chits); }
.c-tone-embers { color: var(--embers); }
.c-tone-xp { color: var(--xp); }
.c-tone-gems { color: var(--gems); }
.c-empty { color: var(--text-3); font-size: 15px; margin: var(--sp-3) 0 var(--sp-5); }
.c-na { color: var(--text-3); }
.c-pix { display: block; image-rendering: pixelated; }

/* ---- pills: 12px Geist 600, text-2 on surface-2, radius 999, padding 2px 10px; rarity and the game colours tint the pill ---- */
.c-pills { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; max-width: none; }
.c-pills > li { margin: 0; max-width: none; display: flex; }
.c-pill { --c: var(--text-2); --dot: var(--text-3); display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1.4 var(--sans); font-variant-numeric: tabular-nums;
  color: var(--text-2); background: var(--surface-2); border-radius: var(--pill); padding: 2px 10px; max-width: 100%; white-space: nowrap; text-decoration: none;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
a.c-pill:hover, a.c-pill.is-hover { color: var(--text); background: color-mix(in srgb, var(--text) 10%, var(--surface-2)); }
.c-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--dot); }
:is(.c-pill--common, .c-pill--uncommon, .c-pill--rare, .c-pill--radiant, .c-pill--legendary, .c-pill--chits, .c-pill--embers, .c-pill--xp, .c-pill--gems) {
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface-2)); }
a:is(.c-pill--common, .c-pill--uncommon, .c-pill--rare, .c-pill--radiant, .c-pill--legendary, .c-pill--chits, .c-pill--embers, .c-pill--xp, .c-pill--gems):hover {
  color: var(--c); background: color-mix(in srgb, var(--c) 22%, var(--surface-2)); }
.c-pill--common { --c: var(--rarity-common); }
.c-pill--uncommon { --c: var(--rarity-uncommon); }
.c-pill--rare { --c: var(--rarity-rare); }
.c-pill--radiant { --c: var(--rarity-radiant); }
.c-pill--legendary { --c: var(--rarity-legendary); }
.c-pill--chits { --c: var(--chits); }
.c-pill--embers { --c: var(--embers); }
.c-pill--xp { --c: var(--xp); }
.c-pill--gems { --c: var(--gems); }
.c-pill--mining { --dot: var(--trade-mining); }
.c-pill--fishing { --dot: var(--trade-fishing); }
.c-pill--farming { --dot: var(--trade-farming); }
.c-pill--gathering { --dot: var(--trade-gathering); }
.c-pill--level { color: var(--text); }
.c-pill--tier { color: var(--ember-soft); background: color-mix(in srgb, var(--ember) 12%, var(--surface-2)); }
.c-pill--plain { color: var(--text-2); }
.c-pill--long { white-space: normal; overflow-wrap: anywhere; }

/* ---- the entity header: art left (192 px, 128 on a phone), then eyebrow, title, one sentence, pills, a quiet meta line ---- */
.c-eh { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-6); align-items: center; margin: 0 0 var(--sp-6); }
.c-eh--bare { grid-template-columns: minmax(0, 1fr); }
.c-eh-art { --art: 192px; position: relative; width: var(--art); height: var(--art); display: grid; place-items: center; overflow: hidden; border-radius: var(--radius);
  background: radial-gradient(120% 120% at 50% 0%, var(--surface-2), var(--surface)); border: 1px solid var(--border); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.c-eh-art > :is(img, svg, canvas, picture) { max-width: 100%; max-height: 100%; }
.c-eh-art :is(.ic, .c-pix) { image-rendering: pixelated; }
.c-poster-pic { display: block; width: 100%; height: 100%; }
.c-poster { display: block; width: 100%; height: 100%; object-fit: cover; }
.c-eh-art .c-poster { transform: scale(1.3); }   /* the poster has a wide margin round the pit; the square slot crops it in */
.c-eh-art .ic, .c-gcard-art .ic { background-color: transparent; box-shadow: none; border-radius: 0; }
.c-eh--mining .c-eh-art { box-shadow: inset 0 -3px 0 var(--trade-mining), inset 0 1px 0 rgba(255,255,255,.04); }
.c-eh--fishing .c-eh-art { box-shadow: inset 0 -3px 0 var(--trade-fishing), inset 0 1px 0 rgba(255,255,255,.04); }
.c-eh--farming .c-eh-art { box-shadow: inset 0 -3px 0 var(--trade-farming), inset 0 1px 0 rgba(255,255,255,.04); }
.c-eh--gathering .c-eh-art { box-shadow: inset 0 -3px 0 var(--trade-gathering), inset 0 1px 0 rgba(255,255,255,.04); }
.c-eh-body { min-width: 0; }
/* the display face as BRAND.md section 1 sets it: H1 800 with -0.01em, the size of an entity page; H3 and card titles 600 with +0.015em (never negative tracking below 32px) */
.c-eh-title { margin: 0 0 var(--sp-3); overflow-wrap: break-word; font-family: var(--display); font-weight: 800; letter-spacing: -.01em;
  font-size: clamp(32px, 4vw, 46px); line-height: 1.05; text-wrap: balance; color: var(--text); }
.c-eh-lead { font-size: 20px; line-height: 1.55; color: var(--text-2); max-width: 60ch; margin: 0 0 var(--sp-4); text-wrap: pretty; }
.c-eh--long .c-eh-title { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.12; }
.c-eh-body > .c-pills { margin-top: var(--sp-4); }
.c-eh-lead + .c-pills { margin-top: 0; }
.c-eh-meta { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-5); list-style: none; margin: var(--sp-4) 0 0; padding: 0; font-size: 14px; color: var(--text-2); }
.c-eh-meta > li { margin: 0; max-width: none; }
.c-eh-k { color: var(--text-3); }

/* ---- stat figures: numbers on the ground, not in boxes (28 Nov 2026). One strip between two hairlines, a thin rule between figures, the
   number in the display face and its label small under it. 2 across on a phone, then as many as the row holds, six at most. The strip is
   pulled left by one cell's padding and clipped, so the first figure of each row lines up with the page and loses its rule. ---- */
.c-statswrap { container-type: inline-size; margin: var(--sp-5) 0 var(--sp-6); overflow: hidden; border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong); }
.c-stats { --k: 2; --pad: 16px; display: grid; grid-template-columns: repeat(var(--k), minmax(0, 1fr)); margin: 0 0 -1px calc(-1px - var(--pad)); padding: 0; }
.c-stat { min-width: 0; margin: 0; display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; padding: 14px var(--pad) 13px;
  border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.c-stat-n { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: 0; font-size: 22px; line-height: 1.2; font-variant-numeric: tabular-nums;
  color: var(--text); overflow-wrap: anywhere; }
.c-stats--l .c-stat-n { font-size: 19px; }
.c-stats--xl .c-stat-n { font-size: 16px; }
.c-stat-u { font: 600 13px/1.3 var(--sans); color: var(--text-2); white-space: nowrap; }
.c-stat-l { margin: 0; font-size: 13px; line-height: 1.4; color: var(--text-3); }
.c-stat.c-tone-chits .c-stat-n { color: var(--chits); }
.c-stat.c-tone-embers .c-stat-n { color: var(--embers); }
.c-stat.c-tone-xp .c-stat-n { color: var(--xp); }
.c-stat.c-tone-gems .c-stat-n { color: var(--gems); }
@container (min-width: 440px) {
  .c-stats { --k: 3; --pad: 20px; }
  .c-stats:where([data-n="2"], [data-n="4"]) { --k: 2; }
  .c-stat-n { font-size: 26px; }
  .c-stats--l .c-stat-n { font-size: 22px; }
  .c-stats--xl .c-stat-n { font-size: 18px; }
}
@container (min-width: 560px) {
  .c-stats[data-n="4"] { --k: 4; }
}
@container (min-width: 720px) {
  .c-stats[data-n="5"] { --k: 5; }
  .c-stats[data-n="6"] { --k: 6; }
  .c-stats:where([data-n="5"], [data-n="6"]) .c-stat-n { font-size: 24px; }
  .c-stats--l:where([data-n="5"], [data-n="6"]) .c-stat-n { font-size: 20px; }
  .c-stats--xl:where([data-n="5"], [data-n="6"]) .c-stat-n { font-size: 17px; }
}
@container (min-width: 960px) {
  .c-stats { --pad: 24px; }
  .c-stat-n, .c-stats:where([data-n="5"], [data-n="6"]) .c-stat-n { font-size: 28px; }
  .c-stats--l .c-stat-n, .c-stats--l:where([data-n="5"], [data-n="6"]) .c-stat-n { font-size: 24px; }
  .c-stats--xl .c-stat-n, .c-stats--xl:where([data-n="5"], [data-n="6"]) .c-stat-n { font-size: 19px; }
}

/* ---- sections: Summary, Visual, Needed for, Full data, Related; the h2 comes from site.css ---- */
.c-sec { margin: 0; }
.c-sec-lead { color: var(--text-2); max-width: var(--read); margin: 0 0 var(--sp-5); }
.c-layer { margin: 0; }
/* The summary reads header, figures, then the quiet Updated line under them: between the header and the figures it stood alone in 80 px of air. */
.c-layer--summary { display: flex; flex-direction: column; margin-bottom: var(--sp-6); }
.c-layer--summary > * { min-width: 0; }
.c-layer--summary > .c-eh { margin-bottom: var(--sp-5); }
.c-layer--summary > .c-statswrap { margin: 0 0 var(--sp-3); }
.c-layer--summary > .updated { order: 9; margin: 0; }
.c-sec--summary, .c-sec--visual, .c-sec--related { margin: 0; }
.c-sec--needed > .c-need { margin-top: var(--sp-3); }
.c-sec--data > .c-table { margin-top: var(--sp-3); }

/* ---- needed for: the bounties that ask for this, by giver ---- */
.c-need { container-type: inline-size; }
.c-need-sum { font-size: 17px; color: var(--text); margin: 0 0 var(--sp-1); }
.c-need-tot { margin: 0 0 var(--sp-4); font-size: 14px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.c-need-g { border-top: 1px solid var(--border); padding: var(--sp-3) 0; }
.c-need > .c-need-g:first-of-type { border-top-color: var(--border-strong); }
.c-need-g--secret { border-top-style: dashed; }
.c-need-h { display: flex; align-items: center; gap: var(--sp-3); min-height: 48px; }
.c-need-face { flex: none; width: 40px; height: 40px; line-height: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.c-need-face :is(img, .ic) { width: 40px; height: 40px; image-rendering: pixelated; border-radius: var(--radius-sm); }
.c-need-id { min-width: 0; }
.c-need-name { font-family: var(--display); font-weight: 600; color: var(--text); font-size: 18px; line-height: 1.3; letter-spacing: .015em; margin: 0; }
.c-need-name a { color: var(--text); text-decoration: none; }
.c-need-name a:hover { text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; }
.c-need-count { margin: 1px 0 0; font-size: 13px; color: var(--text-3); }
/* a giver is one row: who on the left, their sets on the right (as the Bounties page lists a giver); stacked where the row is narrow */
@container (min-width: 640px) {
  .c-need-g { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--sp-6); align-items: start; }
  .c-need-g > .c-need-h { grid-column: 1; grid-row: 1 / span 60; }
  .c-need-g > :not(.c-need-h) { grid-column: 2; min-width: 0; }
  .c-need-g > .c-need-h + .c-need-set { margin-top: 0; border-top: 0; }
  .c-need-g > .c-need-set { margin-top: 0; }
}
.c-need-set { margin: var(--sp-3) 0 0; border-top: 1px solid var(--border); }
.c-need-set > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 48px; cursor: pointer; list-style: none; }
.c-need-set > summary::-webkit-details-marker { display: none; }
.c-need-sn { display: inline-flex; align-items: center; gap: var(--sp-3); font-weight: 600; color: var(--text); }
.c-need-sn::before { content: ""; flex: none; width: 7px; height: 7px; border: solid var(--text-3); border-width: 0 1.75px 1.75px 0; transform: rotate(-45deg);
  transition: transform var(--t-mid) var(--ease); }
.c-need-set[open] .c-need-sn::before { transform: rotate(45deg); }
.c-need-sc { font-size: 14px; color: var(--text-3); text-align: right; }
.c-need-bs { list-style: none; margin: 0 0 var(--sp-2); padding: 0 0 0 var(--sp-5); }
.c-need-bs--flat { padding-left: 0; margin-top: var(--sp-3); }
.c-need-bs > li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: var(--sp-3); align-items: baseline; padding: var(--sp-2) 0; margin: 0; max-width: none;
  border-top: 1px solid var(--border); }
.c-need-bs > li > .spl { grid-column: 1 / -1; }
.c-need-bs .spl-c > * { margin-right: var(--sp-3); }
.c-need-bs > li.c-need-fold { display: block; padding-left: 0; }
.c-need-bs > li.c-need-fold > .spoiler { margin: 0; }
.c-need-n { color: var(--text-3); font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }
.c-need-b { display: flex; flex-direction: column; min-width: 0; }
.c-need-b > a { color: var(--text); font-weight: 500; text-decoration: none; }
.c-need-b > a:hover { text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; }
.c-need-st { color: var(--text-2); font-size: 14px; }
.c-need-x { font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.c-need-all { margin: var(--sp-2) 0 var(--sp-3) var(--sp-5); font-size: 14px; }

/* ---- the data table: eyebrow header, 48 px rows, hairlines, no outer box; scrolls in its own box; the first column sticks ---- */
.c-table { --c-t-bg: var(--bg); position: relative; max-width: none; overflow-x: auto; margin: var(--sp-4) calc(-1 * var(--sp-3)) var(--sp-5); -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(to right, var(--bg) 30%, transparent) 0 0 / 32px 100% no-repeat local,
    linear-gradient(to left, var(--bg) 30%, transparent) 100% 0 / 32px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(255,214,180,.14), transparent) 0 0 / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(255,214,180,.14), transparent) 100% 0 / 12px 100% no-repeat scroll; }
.c-table--narrow { width: fit-content; min-width: min(calc(100% + 2 * var(--sp-3)), 664px); max-width: calc(100% + 2 * var(--sp-3)); }
/* a table of two or three columns is 640 px (and the 12 px it reaches past the column on each side), so short cells do not sit a screen apart;
   it grows as far as the column when a cell holds a sentence, and never scrolls because it was held narrow */
.c-swipe { margin: var(--sp-3) 0 calc(-1 * var(--sp-2)); font-size: 13px; line-height: 1.4; color: var(--text-3); }
.c-swipe::after { content: " \2192"; }
.c-swipe[hidden] { display: none; }
/* a soft fade at the right edge while there is more to scroll to (components.js sets has-more, and clears it at the end) */
.c-table.has-more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.c-table:focus-visible, .c-table.is-focus { outline: 2px solid var(--ember); outline-offset: -2px; border-radius: 4px; }
.c-table .c-t { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; font-variant-numeric: tabular-nums; }
.c-table .c-t :is(th, td) { height: 48px; padding: 10px var(--sp-4); border-bottom: 1px solid var(--border); vertical-align: middle; text-align: left; font-family: var(--sans);
  font-variant-numeric: tabular-nums; background: transparent; }
.c-table .c-t thead th { height: 44px; padding-top: 0; padding-bottom: 0; font: 600 12px/1.35 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3);
  border-bottom-color: var(--border-strong); white-space: nowrap; }
.c-table .c-t tbody th { height: 48px; font: 600 15px/1.35 var(--sans); letter-spacing: 0; text-transform: none; color: var(--text); white-space: normal; }
.c-table .c-t tbody th { padding-top: 0; padding-bottom: 0; }
/* a link in a cell keeps its 44 px target (the padding) without making its row taller than the rows around it (the margin takes the padding back) */
.c-table .c-t tbody td a { display: inline-block; padding: 12px 0; margin: -11px 0; }
.c-table .c-t tbody td a:not(.c-chip, .btn) { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }   /* 28 Nov 2026: a column of names was a column of orange */
.c-table .c-t tbody td a:not(.c-chip, .btn):hover { text-decoration-color: var(--ember); }
.c-table .c-t tbody th a { display: inline-block; padding: 12px 0; color: var(--text); text-decoration: none; }   /* a 44 px target in a 48 px row */
.c-table .c-t tbody th a:hover { text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; }
.c-table .c-t tbody td:not(.c-num) { white-space: normal; min-width: 96px; max-width: 280px; }
.c-table .c-t :is(th, td):first-child { position: sticky; left: 0; z-index: 1; padding-left: var(--sp-3); background: var(--c-t-bg); min-width: 140px; max-width: 220px; }
.c-table .c-t thead th:first-child { z-index: 2; }
.c-table .c-t :is(th, td):last-child { padding-right: var(--sp-3); }
.c-table .c-t .c-num { text-align: right; white-space: nowrap; }
.c-table .c-t tbody tr:last-child :is(th, td) { border-bottom: 0; }
.c-table .c-t tbody tr:hover :is(th, td), .c-table .c-t tbody tr.is-hover :is(th, td) { background-color: var(--surface-2); }
/* The rules line up with the words (28 Nov 2026): the table still reaches 12 px past its column on each side, so a hovered row has room
   round its text, but the hairline under the first and the last cell stops where the text does. Before, every table's rules started
   12 px left of the heading over it. The two end cells draw their rule as a 1 px background, inset; the border keeps its place, unseen. */
.c-table .c-t :is(th, td):first-child, .c-table .c-t :is(th, td):last-child { --rule: var(--border); border-bottom-color: transparent;
  background-image: linear-gradient(var(--rule), var(--rule)); background-repeat: no-repeat; background-size: calc(100% - var(--sp-3)) 1px;
  background-origin: border-box; background-clip: border-box; }
.c-table .c-t :is(th, td):first-child { background-position: 100% 100%; }
.c-table .c-t :is(th, td):last-child { background-position: 0 100%; }
.c-table .c-t thead th:first-child, .c-table .c-t thead th:last-child { --rule: var(--border-strong); }
.c-table .c-t tbody tr:last-child :is(th, td) { background-image: none; }
.c-table.is-scrolled .c-t :is(th, td):first-child { box-shadow: 1px 0 0 var(--border-strong), 10px 0 14px -10px rgba(0,0,0,.7); }
.c-table .c-t .ch-cell { width: 100%; }
/* the sort button the script puts in a sortable header */
.c-sort { appearance: none; -webkit-appearance: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: 0; padding: 0; border: 0; background: none;
  color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; border-radius: 4px; }
.c-sort:hover, .c-sort.is-hover { color: var(--text); }
.c-sort:focus-visible, .c-sort.is-focus { outline: 2px solid var(--ember); outline-offset: -2px; }
.c-num .c-sort { flex-direction: row-reverse; }
.c-sort-i { position: relative; flex: none; width: 8px; height: 12px; }
.c-sort-i::before, .c-sort-i::after { content: ""; position: absolute; left: 0; border: 4px solid transparent; }
.c-sort-i::before { top: 0; border-top-width: 0; border-bottom-color: var(--text-3); }
.c-sort-i::after { bottom: 0; border-bottom-width: 0; border-top-color: var(--text-3); }
.c-t th[aria-sort] .c-sort { color: var(--text); }
.c-t th[aria-sort="ascending"] .c-sort-i::before { border-bottom-color: var(--ember-soft); }
.c-t th[aria-sort="descending"] .c-sort-i::after { border-top-color: var(--ember-soft); }

/* ---- the gallery: every card has art and is one size; 2 up in a narrow box; the counts are set so no lone card closes a row, and a short
   last row is left short (a stretched card was a different size from the rows above it) ---- */
.c-gallery { --gap: 16px; --k: 2; display: flex; flex-wrap: wrap; gap: var(--gap); list-style: none; margin: var(--sp-4) 0 var(--sp-5); padding: 0; }
.c-gallery > .c-gcard { flex: 0 1 calc((100% - (var(--k) - 1) * var(--gap)) / var(--k) - .1px); }
.c-gallerywrap { container-type: inline-size; }
/* two up with an odd count: the last card sits in the middle */
.c-gallery > .c-gcard:last-child:nth-child(odd) { margin-inline: auto; }
@container (min-width: 520px) { .c-gallery > .c-gcard:last-child:nth-child(odd) { margin-inline: 0; } }
@container (min-width: 520px) { .c-gallery { --k: var(--c-m, 3); } }
@container (min-width: 880px) { .c-gallery { --k: var(--c-l, 4); --gap: 16px; row-gap: var(--sp-5); } }
.c-gcard { position: relative; display: flex; flex-direction: column; margin: 0; max-width: none; min-width: 0; overflow: hidden; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  transition: transform var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease); }
.c-gcard:hover, .c-gcard.is-hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-lift), inset 0 1px 0 rgba(255,255,255,.04); }
.c-gcard:has(.c-gcard-a:focus-visible), .c-gcard.is-focus { outline: 2px solid var(--ember); outline-offset: 2px; }
.c-gcard--poster .c-gcard-art { display: block; height: auto; aspect-ratio: 4 / 3; overflow: hidden; }
.c-gcard--poster .c-poster { object-position: 50% 42%; }
.c-gcard-art { display: grid; place-items: center; height: 128px; background: radial-gradient(120% 120% at 50% 0%, var(--surface-2), var(--surface)); }
.c-gcard-art > :is(img, svg, canvas) { max-width: 100%; max-height: 100%; }
.c-gcard-art :is(.ic, .c-pix) { image-rendering: pixelated; }
.c-gcard--mining .c-gcard-art { box-shadow: inset 0 -3px 0 var(--trade-mining); }
.c-gcard--fishing .c-gcard-art { box-shadow: inset 0 -3px 0 var(--trade-fishing); }
.c-gcard--farming .c-gcard-art { box-shadow: inset 0 -3px 0 var(--trade-farming); }
.c-gcard--gathering .c-gcard-art { box-shadow: inset 0 -3px 0 var(--trade-gathering); }
.c-gcard-body { display: flex; flex-direction: column; flex: 1; gap: var(--sp-1); padding: var(--sp-4); min-width: 0; }
.c-gcard-t { font-family: var(--display); font-weight: 600; color: var(--text); font-size: 18px; line-height: 1.25; letter-spacing: .015em; margin: 0; overflow-wrap: anywhere; }
.c-gcard-a { color: var(--text); text-decoration: none; }
.c-gcard-a::after { content: ""; position: absolute; inset: 0; }
.c-gcard:hover .c-gcard-a, .c-gcard.is-hover .c-gcard-a { text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; }
.c-gcard-s { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.c-gcard-body > .c-pills { margin-top: auto; padding-top: var(--sp-3); }
/* 28 Nov 2026, the bold pass: a gallery card is a picture tile with its caption under it on the ground, not a box around both. The tile
   holds the art on the one raised surface; the name, the line and the facts are plain text below. Hover brightens the tile's edge. */
.c-gcard, .c-gcard:hover, .c-gcard.is-hover { background: none; border: 0; border-radius: 0; box-shadow: none; transform: none; overflow: visible; }
.c-gcard-art { border: 1px solid var(--border); border-radius: 14px; background: radial-gradient(120% 120% at 50% 0%, var(--surface-2), var(--surface));
  transition: border-color var(--t-mid) var(--ease), background-color var(--t-mid) var(--ease); }
.c-gcard--mining .c-gcard-art, .c-gcard--fishing .c-gcard-art, .c-gcard--farming .c-gcard-art, .c-gcard--gathering .c-gcard-art { box-shadow: none; }
.c-gcard:hover .c-gcard-art, .c-gcard.is-hover .c-gcard-art { border-color: var(--border-strong); }
.c-gcard--poster .c-gcard-art { overflow: hidden; }
/* one gallery, one tile shape: where a card of the gallery shows a picture, every tile takes the picture's 4 to 3, so a row of captions starts on one line */
.c-gallery:has(.c-gcard--poster) .c-gcard-art { height: auto; aspect-ratio: 4 / 3; }
.c-gcard-body { padding: var(--sp-3) 2px var(--sp-2); }
.c-gcard-body > .c-pills { margin-top: 0; padding-top: 2px; }
/* A gallery card's pills are one quiet line of words (28 Nov 2026): a row of filled pills under every card made an index page a wall of chips.
   The words keep their colours (a rarity, Chits), a dot sits between them, and a trade pill goes where the card's own rule already says it. */
.c-gcard .c-pills { gap: 2px 0; align-items: baseline; margin-left: -15px; clip-path: inset(0 0 0 15px); }
.c-gcard .c-pills > li { position: relative; padding-left: 15px; font: 500 13px/1.5 var(--sans); }   /* the dot of a line's first word falls in the clipped margin */
.c-gcard .c-pills > li::before { content: "\00B7"; position: absolute; left: 5px; top: 50%; transform: translateY(-50%); color: var(--text-3); font: 600 13px/1.5 var(--sans); }
.c-gcard .c-pill { padding: 0; background: none; border-radius: 0; font: 500 13px/1.5 var(--sans); gap: 5px; white-space: normal; }
.c-gcard :is(.c-pill--level, .c-pill--plain, .c-pill--tier) { color: var(--text-2); background: none; }
.c-gcard--mining li:has(> .c-pill--mining), .c-gcard--fishing li:has(> .c-pill--fishing), .c-gcard--farming li:has(> .c-pill--farming),
.c-gcard--gathering li:has(> .c-pill--gathering) { display: none; }

/* ---- related: previous and next on the ladder, then the siblings ---- */
.c-related { margin: var(--sp-7) 0 0; }
.c-rel-ladder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-4); margin: 0 0 var(--sp-5); }
.c-rel-prev, .c-rel-next { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 80px; min-width: 0;
  padding: var(--sp-4) 56px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  transition: transform var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease); }
.c-rel-prev:hover, .c-rel-next:hover, .c-rel-prev.is-hover, .c-rel-next.is-hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-lift), inset 0 1px 0 rgba(255,255,255,.04); }
.c-rel-prev:focus-visible, .c-rel-next:focus-visible, .c-rel-prev.is-focus, .c-rel-next.is-focus { outline: 2px solid var(--ember); outline-offset: 2px; }
.c-rel-next { text-align: right; align-items: flex-end; }
.c-rel-next:only-child { grid-column: 2; }
.c-rel-small { font: 600 12px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.c-rel-title { font-family: var(--display); font-weight: 600; font-size: 18px; line-height: 1.25; letter-spacing: .015em; overflow-wrap: anywhere; }
.c-rel-i { position: absolute; top: 50%; margin-top: -9px; color: var(--text-3); }
.c-rel-prev .c-rel-i { left: var(--sp-5); transform: rotate(180deg); }
.c-rel-next .c-rel-i { right: var(--sp-5); }
.c-rel-sib .c-eyebrow { margin-bottom: var(--sp-2); }
/* 28 Nov 2026, the bold pass: previous and next are two links across one ruled row, not two boxes. */
.c-rel-ladder { gap: 0; border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border); }
.c-rel-prev, .c-rel-next, .c-rel-prev:hover, .c-rel-next:hover, .c-rel-prev.is-hover, .c-rel-next.is-hover { background: none; border: 0; border-radius: 0; box-shadow: none; transform: none; }
.c-rel-prev, .c-rel-next { min-height: 76px; padding: var(--sp-3) var(--sp-4) var(--sp-3) 36px; }
.c-rel-next { padding: var(--sp-3) 36px var(--sp-3) var(--sp-4); }
.c-rel-prev + .c-rel-next, .c-rel-next:only-child { border-left: 1px solid var(--border); }
.c-rel-prev .c-rel-i { left: 0; }
.c-rel-next .c-rel-i { right: 0; }
.c-rel-prev:hover .c-rel-title, .c-rel-next:hover .c-rel-title { text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; }
.c-rel-prev:hover .c-rel-i, .c-rel-next:hover .c-rel-i { color: var(--ember); }
@media (max-width: 599px) { .c-rel-prev + .c-rel-next, .c-rel-next:only-child { border-left: 0; border-top: 1px solid var(--border); } }
.c-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; margin: 0; padding: 0; }
.c-chips > li { margin: 0; max-width: none; }
.c-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; font: 500 14px/1 var(--sans); color: var(--text-2); border: 1px solid var(--border-strong);
  border-radius: var(--pill); text-decoration: none; transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
a.c-chip:hover, a.c-chip.is-hover { color: var(--text); background: var(--surface); }
a.c-chip:focus-visible, a.c-chip.is-focus { outline: 2px solid var(--ember); outline-offset: 2px; }
.c-chip--on { color: var(--text); background: var(--surface-2); border-color: rgba(255,214,180,.3); }

/* ---- charts: a heading, one sentence, the figure (charts.css draws it), a note ---- */
.c-chart { margin: var(--sp-5) 0; min-width: 0; }
.c-chart-t { font-family: var(--display); font-weight: 600; font-size: 18px; line-height: 1.3; letter-spacing: .015em; color: var(--text); margin: 0 0 var(--sp-1); }
.c-chart-c { margin: 0 0 var(--sp-3); color: var(--text-2); font-size: 15px; }
.c-chart-n { margin: var(--sp-2) 0 0; color: var(--text-3); font-size: 14px; }
.c-chartsbox { container-type: inline-size; }
.c-charts { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2) var(--sp-6); }
@container (min-width: 900px) {
  .c-charts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-charts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.c-charts--1 { grid-template-columns: minmax(0, 1fr); }
.c-chart .ch-fig { max-width: 960px; }

/* ---- a wide table: on a docs page 1200 px or wider it runs on to the right over the "On this page" column (200 px and its 32 px gap), and the
   column steps aside while the table is on screen (components.js); everywhere else it is the plain table, scrolling in its own box ---- */
.c-breakout { position: relative; z-index: 2; }
@media (min-width: 1200px) {
  .page.has-side .c-breakout { margin-right: calc(-1 * (200px + var(--sp-6))); background: var(--bg); }
}
.c-breakout .c-table .c-t :is(th, td) { padding-left: var(--sp-3); padding-right: var(--sp-3); }
body.c-wide-view .onpage { opacity: 0; pointer-events: none; transition: opacity var(--t-mid) var(--ease); }

/* ---- touch and phones: 44 px targets with the look unchanged (a pill link grows its hit area, not its size; a chip and a sort header grow), and 13 px small text ---- */
@media (pointer: coarse), (max-width: 760px) {
  a.c-pill { position: relative; }
  a.c-pill::after { content: ""; position: absolute; inset: -12px -2px; }
  .c-chip { min-height: 44px; }
  .c-sort { min-height: 44px; }
  .c-need-h { position: relative; }
  .c-need-name a::after { content: ""; position: absolute; inset: 0; }     /* the whole giver header is the link */
}
@media (max-width: 760px) {
  .c-pill { font-size: 13px; }
  .c-eyebrow, .c-rel-small, .c-table .c-t thead th { font-size: 13px; }
  .c-table .c-t { font-size: 15px; }
}

/* ---- phones ---- */
@media (max-width: 640px) {
  .c-eh { grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
  .c-eh-art { --art: 128px; }
  .c-eh-lead { font-size: 18px; }
  .c-rel-ladder { grid-template-columns: minmax(0, 1fr); }
  .c-rel-next:only-child { grid-column: 1; }
  .c-table .c-t :is(th, td):first-child { min-width: 120px; max-width: 156px; box-shadow: inset -1px 0 0 var(--border); padding-left: var(--sp-3); }
  .c-table.is-scrolled .c-t :is(th, td):first-child { box-shadow: 1px 0 0 var(--border-strong), 10px 0 14px -10px rgba(0,0,0,.7); }
  .c-gcard-art { height: 112px; }
}
@media (max-width: 480px) {
  .c-need-bs { padding-left: 0; }
  .c-need-bs > li { grid-template-columns: 24px minmax(0, 1fr); }
  .c-need-x { grid-column: 2; text-align: left; }
  .c-need-all { margin-left: 0; }
  .c-need-set > summary { flex-wrap: wrap; padding: var(--sp-2) 0; }
}
@media (prefers-reduced-motion: reduce) {
  .c-gcard:hover, .c-gcard.is-hover, .c-rel-prev:hover, .c-rel-next:hover { transform: none; }
}

/* two cards a row on a phone: the pills tighten so "Tier 2" and "250 Chits" share a line and do not stack one a line */
