/* The bounties module: bounty sets, the hub, All bounties, quests, levels, research, skills and pets. Tokens come from /static/site.css (BRAND.md);
   the shared parts (entity header, stat tiles, tables, galleries, charts, pills) come from components.css and charts.css, so this file only adds
   what is particular to these pages. */

/* ---- /wiki/bounties: How it works, the sets by trade, the fine print ---- */
/* 28 Nov 2026: the three steps stand on the ground as the home page's do: a strip between two hairlines, a rule between the cells, the number a
   plain numeral in ember. Before, three boxes with a ringed number each. */
.steps { --pad: 24px; list-style: none; margin: var(--sp-3) 0 var(--sp-4); padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); }
.step { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 14px; align-items: baseline; margin: 0; max-width: none; padding: var(--sp-4) var(--pad); border-left: 1px solid var(--border); }
.step:first-child { padding-left: 0; border-left: 0; }
.step-n { grid-row: 1 / span 2; font: 800 28px/1 var(--display); color: var(--ember); }
.step h3 { margin: 0; font-size: 18px; line-height: 1.3; }
.step p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text-2); max-width: none; }
@media (max-width: 640px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step { padding: var(--sp-3) 0; border-left: 0; }
  .step + .step { border-top: 1px solid var(--border); }
  .step-n { font-size: 24px; min-width: 20px; }
}
.bq-all { margin: 0 0 var(--sp-3); font-size: 15px; }
.gv-h { display: flex; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap; margin: var(--sp-6) 0 var(--sp-2); font-size: 20px; line-height: 1.25; color: var(--text); }
.gv-h::before { content: ""; align-self: center; width: 4px; height: 20px; border-radius: 2px; background: var(--text-3); }
.gv-h-mining::before { background: var(--trade-mining); }
.gv-h-fishing::before { background: var(--trade-fishing); }
.gv-h-gathering::before { background: var(--trade-gathering); }
.gv-h-farming::before { background: var(--trade-farming); }
.gv-n { font: 400 14px var(--sans); letter-spacing: 0; color: var(--text-3); }
/* a giver and their sets: the face once on the left, a row a set on the right, hairlines between givers (no boxes) */
.gv-list { list-style: none; max-width: none; margin: var(--sp-3) 0 var(--sp-5); padding: 0; border-top: 1px solid var(--border-strong); container-type: inline-size; }
.gv-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); margin: 0; max-width: none; padding: var(--sp-4) 0; border-bottom: 1px solid var(--border); }
.gv-who { display: flex; align-items: center; gap: var(--sp-4); min-width: 0; }
.gv-face { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 8px; overflow: hidden; background: var(--surface); }
.gv-face :is(img, .ic) { image-rendering: pixelated; }
.gv-id { min-width: 0; }
.gv-name { font: 600 20px/1.2 var(--display); letter-spacing: .015em; color: var(--text); text-decoration: none; }
a.gv-name:hover { text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; }
.gv-at { margin: 2px 0 0; max-width: none; font-size: 14px; line-height: 1.45; color: var(--text-3); }
.gv-open a { color: var(--text-2); }
.gv-sets { list-style: none; margin: 0; padding: 0; min-width: 0; }
.gv-sets > li { margin: 0; max-width: none; }
.gv-sets > li + li { border-top: 1px solid var(--border); }
.gv-set { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--sp-4); align-items: baseline; min-height: 44px; padding: 10px var(--sp-3); margin: 0 calc(-1 * var(--sp-3));
  border-radius: 8px; color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; }
.gv-set:hover { background: var(--surface); }
.gv-set:hover .gv-set-n { text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; }
.gv-set-n { font-weight: 600; font-size: 16px; }
.gv-set-c { font-size: 14px; color: var(--text-2); text-align: right; white-space: nowrap; }
.gv-set-l { grid-column: 1 / -1; font-size: 13px; color: var(--text-3); }
@container (min-width: 600px) {
  .gv-row { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--sp-6); align-items: start; }
  .gv-sets { margin-top: -6px; }
  .gv-set { grid-template-columns: minmax(0, 1fr) 96px 164px; }
  .gv-set-l { grid-column: auto; font-size: 14px; text-align: right; white-space: nowrap; }
}
.gv-tile { display: inline-grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: var(--radius-sm); background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border); font: 600 30px/1 var(--display); color: var(--text-2); }
.gv-big { width: 80px; height: 80px; font-size: 40px; }
.gv-mining { color: var(--trade-mining); }
.gv-fishing { color: var(--trade-fishing); }
.gv-farming { color: var(--trade-farming); }
.b-initial { display: inline-grid; place-items: center; width: 96px; height: 96px; font: 600 40px/1 var(--display); color: var(--text-3); }
.b-rules { padding-left: var(--sp-5); max-width: var(--read); }
.b-rules li { margin: var(--sp-2) 0; }

/* ---- a set page: what it asks, the bounty table, the cards fold ---- */
.b-ask { margin: 0 0 var(--sp-4); }
.b-ask .c-pill { max-width: 100%; }
.b-ask .c-pill a { color: inherit; }
.b-list { min-width: 0; }
.b-cards { margin: var(--sp-5) 0 var(--sp-2); border-top: 1px solid var(--border); }
.b-cards > summary { cursor: pointer; padding: var(--sp-3) 0; min-height: 44px; display: flex; align-items: center; justify-content: space-between; list-style: none;
  font: 600 15px var(--sans); color: var(--text-2); }
.b-cards > summary::-webkit-details-marker { display: none; }
.b-cards > summary::after { content: "+"; color: var(--ember-soft); font: 400 22px/1 var(--sans); }
.b-cards[open] > summary::after { content: "\2212"; }
.b-cards > summary:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; border-radius: 4px; }
.bq { border-top: 1px solid var(--border); margin: var(--sp-2) 0 var(--sp-5); }
.bq-d { border-bottom: 1px solid var(--border); }
.bq-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 64px 64px; gap: 0 var(--sp-3); align-items: center; min-height: 52px; padding: 6px var(--sp-3);
  cursor: pointer; list-style: none; position: relative; font-size: 15px; }
.bq-row::-webkit-details-marker { display: none; }
.bq-row:hover, .bq-d[open] > .bq-row { background: var(--surface-2); }
.bq-row:focus-visible { outline: 2px solid var(--ember); outline-offset: -2px; }
.bq-n, .bq-x, .bq-e { font-variant-numeric: tabular-nums; }
.bq-n { color: var(--text-3); font-size: 14px; }
.bq-x, .bq-e { text-align: right; }
.bq-t { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.bq-t .ic { --s: 32px; }
.bq-t .ic-off { display: none; }
.bq-w { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.bq-s { color: var(--text); }
.bq-name { color: var(--text-2); font-size: 13px; }
.bq-g { color: var(--text-3); font-size: 13px; }
.bq-none { color: var(--text-3); }
.bq-body { padding: var(--sp-3) var(--sp-3) var(--sp-2) 58px; border-top: 1px solid var(--border); background: var(--bg); }
.bq-body .gc { margin: 0 0 var(--sp-2); gap: var(--sp-2) 22px; align-items: center; }
.bq-body .gc figcaption { flex: 1 1 240px; max-width: var(--read); margin: 0; }
.main .bq-tools { margin: var(--sp-1) 0 var(--sp-2); max-width: none; text-align: right; }
.cl { display: block; line-height: 1.5; }
.cs { color: var(--text); }
@media (max-width: 480px) {
  .bq-row { grid-template-columns: 28px minmax(0, 1fr) 44px 44px; gap: 0 var(--sp-2); padding: 6px var(--sp-3); }
  .bq-t .ic { display: none; }
  .bq-body { padding-left: var(--sp-3); }
}

/* ---- tables that become two-line rows on a phone: the name on top, what it asks beneath, the pay on the right ---- */
@media (max-width: 560px) {
  .b-stack.b-stack .c-table { margin-left: 0; margin-right: 0; overflow-x: visible; }
  .b-stack.b-stack .c-t, .b-stack.b-stack .c-t tbody { display: block; width: 100%; min-width: 0; }
  .b-stack.b-stack .c-t thead { display: none; }
  .b-stack.b-stack .c-t tbody tr { display: grid; gap: 2px var(--sp-3); align-items: baseline; padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
  .b-stack.b-stack .c-t tbody :is(th, td) { display: block; height: auto; min-width: 0; max-width: none; padding: 0; border: 0; box-shadow: none; position: static;
    background: none; white-space: normal; text-align: left; }
  .b-stack.b-stack .c-t tbody th { font-size: 16px; }
  .b-stack.b-stack .c-t tbody th a { display: block; padding: 10px 0; margin: -10px 0; }
  .b-stack.b-stack .c-t tbody td { color: var(--text-2); font-size: 14px; }
  .b-stack.b-stack .c-t tbody tr:hover :is(th, td) { background: none; }
  .b-stack.b-stack .ch-ib { display: none; }
  .b-stack.b-stack .ch-cell { display: inline; }
  .b-stack.b-stack .ch-cn { min-width: 0; text-align: left; }
  /* a set's bounty list: No. | name | XP, then steps | Embers (the bounty level is in the stat tiles and the cards) */
  .b-stack--set.b-stack .c-t tbody tr { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .b-stack--set.b-stack .c-t tbody th { grid-column: 2; grid-row: 1; }
  .b-stack--set.b-stack .c-t tbody td:nth-child(2) { grid-column: 1; grid-row: 1; color: var(--text-3); }
  .b-stack--set.b-stack .c-t tbody td:nth-child(3) { grid-column: 2; grid-row: 2; }
  .b-stack--set.b-stack .c-t tbody td:nth-child(4) { grid-column: 3; grid-row: 1; text-align: right; color: var(--xp); }
  .b-stack--set.b-stack .c-t tbody td:nth-child(4)::after { content: " XP"; }
  .b-stack--set.b-stack .c-t tbody td:nth-child(5) { grid-column: 3; grid-row: 2; text-align: right; color: var(--embers); }
  .b-stack--set.b-stack .c-t tbody td:nth-child(5)::before { content: "Embers "; }
  .b-stack--set.b-stack .c-t tbody td:nth-child(6) { display: none; }
  /* All bounties: name | XP, then steps | Embers; the set and the order are in the set page */
  .b-stack--all.b-stack .c-t tbody tr { grid-template-columns: minmax(0, 1fr) auto; }
  .b-stack--all.b-stack .c-t tbody th { grid-column: 1; grid-row: 1; }
  .b-stack--all.b-stack .c-t tbody td:nth-child(2), .b-stack--all.b-stack .c-t tbody td:nth-child(3), .b-stack--all.b-stack .c-t tbody td:nth-child(7) { display: none; }
  .b-stack--all.b-stack .c-t tbody td:nth-child(4) { grid-column: 1; grid-row: 2; }
  .b-stack--all.b-stack .c-t tbody td:nth-child(5) { grid-column: 2; grid-row: 1; text-align: right; color: var(--xp); }
  .b-stack--all.b-stack .c-t tbody td:nth-child(5)::after { content: " XP"; }
  .b-stack--all.b-stack .c-t tbody td:nth-child(6) { grid-column: 2; grid-row: 2; text-align: right; color: var(--embers); }
  .b-stack--all.b-stack .c-t tbody td:nth-child(6)::before { content: "Embers "; }
}

/* ---- All bounties: the filter, the chips, one table per giver ---- */
.bfilter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin: var(--sp-2) 0 var(--sp-3); }
.bfilter input { flex: 1 1 260px; max-width: 420px; min-height: 44px; font: 16px var(--sans); color: var(--text); background: var(--surface); border: 1px solid var(--control-border);
  border-radius: var(--radius-sm); padding: var(--sp-2) var(--sp-3); }
.bfilter input:focus { outline: 2px solid var(--ember); outline-offset: 1px; }
/* the count is written by bounties.js after the page loads; its room is kept from the start so the Clear button does not wrap, and the chips
   below do not jump down, when "1,247 bounties" arrives (a layout shift of 0.15 on a phone) */
.bfilter .note { min-width: 9.5em; }
.b-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--sp-2) var(--sp-5); margin: 0 0 var(--sp-4); }
.b-fgroup .c-eyebrow { margin: var(--sp-2) 0 var(--sp-1); }
.b-fgroup .chips { margin: 0; }
@media (pointer: coarse) { .chip { min-height: 44px; } }
.b-group { margin: var(--sp-6) 0 0; content-visibility: auto; contain-intrinsic-size: auto 2400px; }
.b-group[hidden], .b-all tr[hidden] { display: none; }
.b-gh { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 44px; margin: 0 0 var(--sp-2); cursor: pointer; list-style: none; }
.b-gh::-webkit-details-marker { display: none; }
.b-gh h3 { display: flex; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap; margin: 0; font-size: 22px; }
.b-gh::after { content: "\2212"; flex: none; color: var(--ember-soft); font: 400 24px/1 var(--sans); }
.b-group:not([open]) > .b-gh::after { content: "+"; }
.b-gh:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; border-radius: 4px; }
.gh-n { color: var(--text); }
.gh-c { font: 400 14px var(--sans); letter-spacing: 0; color: var(--text-3); }

/* ---- quests: the card on the left, the story and steps on the right ---- */
/* two columns once each has 400 px, so the card is drawn at the size of every other card of the site (a 300 px column drew it at half that,
   too small to read, and the card is where the quest's name is); one column below that */
.quest { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: var(--sp-3) 28px; align-items: start; margin: 0; padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--border); }
.quest:first-of-type { padding-top: 6px; }
.quest:last-child { border-bottom: 0; }
.quest .gc { margin: 0; }
.qbody { max-width: var(--read); min-width: 0; }
.qsay { margin: 0 0 var(--sp-2); font-style: italic; color: var(--text-2); }
.qsteps { margin: 0 0 var(--sp-2); padding-left: var(--sp-5); }
.qsteps li { margin: 6px 0; }
.sn { color: var(--text); }
.sd { display: block; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.qmeta { list-style: none; margin: var(--sp-2) 0 0; padding: 0; font-size: 14px; color: var(--text-2); }
.qmeta li { margin: 2px 0; }
@media (max-width: 760px) { .quest { grid-template-columns: minmax(0, 1fr); } }

/* ---- levels: a rank begins on a marked row; the cap closes the table; a phone gets two lines a level with what it opens in full ---- */
.b-lv .c-t tbody tr.rank-start :is(th, td) { border-top: 1px solid var(--border-strong); }
.b-lv .c-t tbody tr.cap :is(th, td) { background: var(--surface-2); font-weight: 600; }
.b-lv .c-t tbody td:last-child { min-width: 280px; white-space: normal; }
.b-lv .op { display: block; line-height: 1.45; color: var(--text-2); }
.b-lv .op .k { color: var(--text-3); margin-right: var(--sp-1); }
.b-lv .op .k::after { content: ":"; }
.b-lv .c-t tbody tr:target :is(th, td) { background: var(--surface-2); }
.chat { white-space: nowrap; }
@media (max-width: 560px) {
  .b-lv.b-lv .c-table { margin-left: 0; margin-right: 0; overflow-x: visible; }
  .b-lv.b-lv .c-t, .b-lv.b-lv .c-t tbody { display: block; width: 100%; min-width: 0; }
  .b-lv.b-lv .c-t thead { display: none; }
  .b-lv.b-lv .c-t tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px var(--sp-4); align-items: baseline; padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
  .b-lv.b-lv .c-t tbody :is(th, td) { display: block; height: auto; min-width: 0; max-width: none; padding: 0; border: 0; box-shadow: none; position: static; background: none;
    white-space: normal; text-align: left; }
  .b-lv.b-lv .c-t tbody td:nth-child(2) { text-align: right; font-size: 14px; }
  .b-lv.b-lv .c-t tbody td:nth-child(2)::before { content: "costs "; color: var(--text-3); }
  .b-lv.b-lv .c-t tbody td:nth-child(3) { text-align: right; font-size: 14px; }
  .b-lv.b-lv .c-t tbody td:nth-child(3)::before { content: "in all "; color: var(--text-3); }
  .b-lv.b-lv .c-t tbody td:nth-child(4) { grid-column: 1 / -1; min-width: 0; }
  .b-lv.b-lv .op a { display: inline-block; padding: 10px 0; margin: -10px 0; }
  .b-lv.b-lv .c-t tbody tr.cap :is(th, td) { background: none; }
  .b-lv.b-lv .c-t tbody tr.rank-start :is(th, td) { border-top: 0; }
  .b-lv.b-lv .c-t tbody tr.rank-start { border-top: 1px solid var(--border-strong); }
}

/* ---- skills ---- */
.cardflow { display: flex; flex-wrap: wrap; gap: var(--sp-1) 28px; align-items: flex-start; }
.cardflow .gc { margin: 10px 0 var(--sp-4); }
.sk-text { flex: 1 1 280px; min-width: 0; max-width: var(--read); }
.sk-text ul { padding-left: var(--sp-5); }
.c-t tbody tr.ms :is(th, td) { background: var(--surface-2); }
.c-t td strong { color: var(--text); font-weight: 700; }

/* ---- pets: the head is the star ---- */
.pcard { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4); }
.pcard .ic { --s: 80px; image-rendering: pixelated; }
.pc-text { min-width: 0; }
.pc-text .wc-name { font-size: 18px; margin-bottom: var(--sp-1); }
.pc-text p { margin: 0; }
.pc-perk { color: var(--text); }
.pc-from { color: var(--text-2); font-size: 13px; }
.pc-perk .sep { color: var(--text-3); margin: 0 var(--sp-1); }
