/* Palette from the game's own pages (tests/fixtures); text shades keep WCAG AA contrast. */
:root {
  --brown-900: #2B160D;
  --brown-700: #452317;
  --brown-500: #5B3021;
  --parchment: #DCBB96;
  --gold: #BA9700;
  --gold-soft: #BFAE54;
  --gold-light: #F0D27A;  /* active sort on the dark table head */
  --serif: Georgia, "Times New Roman", Times, serif;
  --bg: #EFE3CB;
  --surface: #FBF6EC;
  --zebra: #F4EAD6;
  --text: #2B160D;
  --muted: #6B4E3A;
  --border: #D2B98F;
  --accent: #7A2E12;
  --negative: #9B1C0C;
  --positive: #2E6B1E;
  --on-dark: #F3E3C3;
  /* Table column groups: band, cell, alternate row. */
  --stats: #F4E7CC;
  --stats-alt: #ECDCB8;
  --combat: #F4E1D7;
  --combat-alt: #EAD1C3;
  --chances: #EAEBD2;
  --chances-alt: #DEE0BF;
  --score-band: #BA9700;
  --score: #F7EDC2;
  --score-alt: #EEDF9F;
  --cell-tint: rgba(91, 48, 33, .2);
  --brown-400: #6E3B28;
  --shade: rgba(43, 22, 13, .3);
  --glint: rgba(240, 210, 122, .4);
  /* Data age: text shades (AA) and swatches (-mark). */
  --age-fresh: #1F5214;  /* synced: dark green (user, 2026-10-28) */
  --age-fresh-mark: #2A6B1C;
  --live: #2C7520;  /* syncing now: a lighter green */
  --live-mark: #5DBE47;
  --live-bg: #E4F4DA;
  --age-aging: #7D5B00;
  --age-aging-mark: #E0B000;
  --age-old: #A23F00;
  --age-old-mark: #D9620B;
  --age-stale: #9B1C0C;
  --age-stale-mark: #C8200E;
  /* Item quality swatches (the label carries the meaning). */
  --r-common: #FFFFFF;
  --r-green: #00B712;
  --r-blue: #5159F7;
  --r-purple: #E303E0;
  --r-orange: #FF6A00;
  --r-red: #FF0000;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.wrap { padding: 0 24px; }
@media (min-width: 900px) { .wrap { padding: 0 80px; } }
h1, h2, h3, h4, .site-name { font-family: var(--serif); font-weight: 700; line-height: 1.2; color: var(--brown-700); }
h1 { font-size: 1.75rem; margin: 1rem 0 .3rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 .5rem; padding-bottom: .25rem; border-bottom: 2px solid var(--parchment); }
h3 { font-size: 1.05rem; margin: 1rem 0 .4rem; }
h4 { font-size: 1rem; margin: .8rem 0 .3rem; }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--brown-500); outline-offset: 2px; }
.muted, .hint { color: var(--muted); }
.hint { font-size: .875rem; }
ul.hint { padding-left: 1.2rem; }
.marker { color: var(--negative); font-weight: 600; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 4px 8px; z-index: 10; }

/* == loading (site.js; hidden without JavaScript) == */
.loading { display: none; }
.is-loading .loading { display: flex; align-items: center; justify-content: center; position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.loading-text { position: relative; padding: 12px 20px 12px 48px; border-radius: 3px; background: var(--surface); color: var(--brown-700); border: 1px solid var(--gold); font-size: 13px; font-weight: 600; box-shadow: 0 2px 8px var(--shade); }
.loading-text::before { content: ""; position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; margin-top: -11px; border: 2px solid var(--border); border-top-color: var(--brown-700); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.is-loading main { opacity: .45; }

/* == top bar == */
.topbar { background: var(--brown-700); border-bottom: 3px solid var(--gold); color: var(--on-dark); }
.topbar-inner { display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: center; min-height: 56px; padding-block: 8px; }
.site-name { display: inline-flex; align-items: center; gap: 10px; color: var(--parchment); font-size: 1.3rem; text-decoration: none; letter-spacing: .02em; }
.site-name:hover { color: var(--on-dark); }
.topbar nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.topbar nav a, .footer-nav a { color: var(--parchment); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.topbar nav a:hover, .footer-nav a:hover { color: var(--on-dark); border-bottom-color: var(--gold-soft); }
.topbar nav a[aria-current="page"] { color: var(--on-dark); border-bottom-color: var(--gold); font-weight: 600; }
.nav-sep { width: 1px; margin: 7px 0; background: var(--gold-soft); }
.nav-btn { display: none; margin-left: auto; padding: 5px 7px; border: 1px solid var(--gold-soft); border-radius: 3px; color: var(--parchment); cursor: pointer; }
.nav-toggle { display: none; }
.topbar :focus-visible, .footer :focus-visible { outline-color: var(--gold); }
.banner {
  margin: 12px 24px 0; padding: 8px 12px; background: var(--surface);
  border: 1px solid var(--negative); border-left-width: 4px;
}
/* Footer: the top bar's bronze and link style. */
.footer { margin-top: 3rem; background: var(--brown-700); border-top: 3px solid var(--gold); color: var(--parchment); }
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 14px 40px; padding-top: 20px; padding-bottom: 22px; }
.footer p { margin: 6px 0 0; }
.footer-nav { display: flex; flex-direction: column; align-items: flex-start; }
.footer-note { color: var(--gold-soft); }
.footer-ver { font-size: 12px; opacity: .8; }

/* == page head == */
/* Back to top, in the side margin */
.to-top { position: fixed; right: 12px; bottom: 16px; z-index: 15; display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border: 1px solid var(--gold); border-radius: 50%; background: var(--brown-700); color: var(--gold-light); text-decoration: none; box-shadow: 0 2px 6px var(--shade); }
.to-top:hover { background: var(--brown-500); color: var(--on-dark); }
.js .to-top { visibility: hidden; opacity: 0; transition: opacity .2s, visibility .2s; }
.js.scrolled .to-top { visibility: visible; opacity: 1; }
/* Facts in a line, split by bars. */
.facts, .sync-facts { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0; color: var(--muted); }
:is(.facts, .sync-facts) > span + span::before { content: "|"; margin: 0 8px; color: var(--border); }
.facts strong { color: var(--text); }

/* == servers and sync == */
.sync-bar { margin: 12px 0 0; background: var(--surface); border: 1px solid var(--border); font-size: 13px; }
.sync-bar summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 6px 12px; cursor: pointer; list-style: none; }
.sync-bar summary::-webkit-details-marker { display: none; }
.sync-title { font-family: var(--serif); font-weight: 700; color: var(--brown-700); }
.sync-open { margin-left: auto; color: var(--accent); text-decoration: underline; }
details:not([open]) > summary .when-open, details[open] > summary .when-closed { display: none; }
.sync-age { display: inline-flex; align-items: center; gap: 6px; }
.age-bar { display: block; }
.age-track { fill: var(--zebra); stroke: var(--border); stroke-width: 1; }
.age-tick { stroke: var(--border); stroke-width: 1; }
.age-text { font-weight: 600; }
/* Age classes: text and swatch (--mark). */
.age-fresh { color: var(--age-fresh); --mark: var(--age-fresh-mark); }
.age-aging { color: var(--age-aging); --mark: var(--age-aging-mark); }
.age-old { color: var(--age-old); --mark: var(--age-old-mark); }
.age-stale { color: var(--age-stale); --mark: var(--age-stale-mark); }
.age-fill { fill: var(--mark); }
.age-mark, .sync-dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: var(--mark, var(--muted)); }
.sync-live { color: var(--live); font-weight: 600; }
.sync-dot { background: var(--live-mark); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* One box per server, one line each, all of the same height. */
.server-grid { list-style: none; margin: 0; padding: 8px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: 6px 10px; border-top: 1px solid var(--border); }
.srv { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 3px 8px; white-space: nowrap; background: var(--bg); border: 1px solid var(--border); border-radius: 2px; }
.srv-code { font-weight: 700; min-width: 3.6rem; }
.srv-state { white-space: nowrap; font-weight: 600; }
.srv.live { background: var(--live-bg); border-color: var(--live-mark); }
.srv.live .srv-state { color: var(--live); }
.sync-notes { padding: 0 12px 8px; color: var(--muted); }
.sync-notes p { margin: .2rem 0; }
.age-legend { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.age-legend span { white-space: nowrap; }

/* == bracket picker == */
.bracket-nav {
  margin: 16px 0 0; padding: 12px 16px 6px; background: var(--surface);
  border: 1px solid var(--border); border-top: 4px solid var(--gold);
}
.bracket-title { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 1.05rem; color: var(--brown-700); }
.bracket-nav .hint { font-style: italic; }
/* Fixed-width chips; the chosen one beige. */
.bracket-chips { list-style: none; margin: 10px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, 7.6rem); gap: 10px 8px; }
.chip {
  position: relative; top: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 4px 9px;
  border: 1px solid var(--brown-900); border-radius: 3px; color: var(--on-dark); text-decoration: none; font-size: 13px;
  background: linear-gradient(var(--brown-500), var(--brown-700));
  box-shadow: 0 3px 0 var(--brown-900), 0 4px 5px var(--shade), inset 0 1px 0 var(--glint);
  transition: top .12s ease, box-shadow .12s ease;
}
.chip:hover, .chip:focus-visible { top: -1px; color: var(--gold-light); background: linear-gradient(var(--brown-400), var(--brown-500)); box-shadow: 0 4px 0 var(--brown-900), 0 6px 8px var(--shade), inset 0 1px 0 var(--glint); }
.chip:active { top: 2px; box-shadow: 0 1px 0 var(--brown-900), inset 0 1px 2px var(--shade); }
.chip-range { font-weight: 700; white-space: nowrap; }
.metric-chips { grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); }
.chip-count { color: var(--parchment); font-size: 12px; }
.chip-empty { opacity: .45; filter: grayscale(.9); }
.chip[aria-current="page"], .find-form input, .find-close { color: var(--brown-900); background: linear-gradient(var(--gold-light), var(--parchment)); border-color: var(--gold); box-shadow: 0 3px 0 var(--gold), 0 4px 5px var(--shade), inset 0 1px 0 var(--glint); }
.chip[aria-current="page"] .chip-count { color: var(--brown-700); }
.empty-note { padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); }
/* Find your gladiator: light raised controls, one row per result. */
.find-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.find-form :is(input, button), .find-close { font-family: inherit; font-size: 13px; line-height: 20px; }
.find-form input, .find-close { padding: 4px 10px; border: 1px solid var(--gold); border-radius: 3px; text-decoration: none; }
.find-form input { width: min(100%, 18rem); appearance: none; }
.find-form input::placeholder { color: var(--muted); opacity: 1; }
.find-form input:hover, .find-close:hover { border-color: var(--brown-500); }
.find-form button { cursor: pointer; }
.find-close { margin-left: auto; }
.find-results { list-style: none; margin: 0; padding: 0; }
.find-row, .info-note { margin: 0 0 8px; padding: 6px 12px; font-size: 13px; background: var(--zebra); border: 1px solid var(--border); border-left: 4px solid var(--gold); box-shadow: 0 2px 0 var(--border); }
.find-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; margin: 0 0 2px; }
.find-head strong, .find-place b { font-size: 1.05rem; color: var(--brown-700); }
.find-place { margin-left: auto; color: var(--muted); }
.move { font-size: 10px; line-height: 1.1; font-weight: 700; white-space: nowrap; }
.move-up { color: var(--positive); }
.move-down { color: var(--negative); }
.move-new { color: var(--accent); }
.move-same { color: var(--muted); }
.find .move { font-size: inherit; }
/* Climbers: one badge per build, a green edge (the text says "up"). */
.climber-list { list-style: none; margin: 10px 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.climber { flex: 1 1 13rem; display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; font-size: 13px; background: var(--zebra); border: 1px solid var(--border); border-left: 4px solid var(--positive); border-radius: 2px; }
.climber-name { font-weight: 700; }
.climber-move .move-up { font-weight: 700; }
.climber-new { border-left-color: var(--accent); }

.sort-mark { margin-left: 4px; font-size: 11px; color: var(--gold-soft); }

/* == builds board (div rows, raised strips) == */
.board { font-size: 13px; }
.b-row { display: grid; grid-template-columns: 6rem 6.2rem minmax(7.5rem, 1.6fr) 3.8rem 3.4rem 8.6rem repeat(6, minmax(5.2rem, 1fr)) minmax(4.4rem, 1fr) repeat(2, minmax(5.6rem, 1fr)) minmax(5.2rem, 1fr) minmax(4.8rem, 1fr) minmax(5.4rem, 1fr); }
.b-strip { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; }
.b-cell { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 5px 6px; }
.b-cell.num { align-items: flex-end; text-align: right; }
.b-head { position: sticky; top: 0; z-index: 3; }
/* Two bronze heading rows: bands darker, column names lighter. */
.b-band { align-items: center; padding: 4px; font: 700 13px var(--serif); color: var(--gold-light); background: linear-gradient(var(--brown-700), var(--brown-900)); }
.b-head .g-start { border-left-color: var(--gold-soft); }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.b-names .b-strip { background: linear-gradient(var(--brown-400), var(--brown-500)); color: var(--on-dark); font-weight: 600; line-height: 1.15; }
.b-names .b-cell { white-space: nowrap; font-size: 12px; justify-content: flex-end; padding: 6px; }
.b-names a { color: var(--on-dark); text-decoration: none; }
.b-names a:hover { text-decoration: underline; }
.b-names [aria-sort] a, .b-names [aria-sort] .sort-mark { color: var(--gold-light); }
/* Flat rows (user, 2026-10-29); hover: gold lines over every cell, nothing moves. */
.b-body .b-strip { position: relative; background: var(--surface); border-bottom: 1px solid var(--border); }
.b-body .b-row:nth-child(even) .b-strip { background: var(--zebra); }
.b-body .b-row:hover .b-strip::after { content: ""; position: absolute; inset: 0; z-index: 2; border-block: 1.4px solid var(--gold); pointer-events: none; }
.b-body [role=rowheader] { font-weight: 700; }
.b-body :is(.g-stats, .g-combat, .g-chances, .num.g-player):hover { background-image: linear-gradient(var(--cell-tint), var(--cell-tint)); }
.b-body .g-stats { background-color: var(--stats); }
.b-body .g-combat { background-color: var(--combat); }
.b-body .g-chances { background-color: var(--chances); }
.b-body .g-score { background-color: var(--score); }
.b-body .b-row:nth-child(even) .g-stats { background-color: var(--stats-alt); }
.b-body .b-row:nth-child(even) .g-combat { background-color: var(--combat-alt); }
.b-body .b-row:nth-child(even) .g-chances { background-color: var(--chances-alt); }
.b-body .b-row:nth-child(even) .g-score { background-color: var(--score-alt); }
.b-cell.g-start { border-left: 1px solid var(--border); }
.b-cell.sticky { position: sticky; left: 0; z-index: 1; background-color: inherit; }
.board .main-col { position: relative; font-weight: 700; }
/* Top three medals (SVG symbols in the board macro) */
.medal { position: absolute; left: 5px; top: 50%; margin-top: -12px; filter: drop-shadow(0 1px 1.5px var(--shade)); }
.na { position: relative; color: var(--muted); cursor: help; }
.na:hover::after { content: attr(data-tip); }
.board .prof { padding: 4px 10px; justify-content: center; }
/* Ratio under a value; hover note (site.js). */
.board .ratio { font-size: 10px; line-height: 1.1; color: var(--muted); font-weight: 400; }
[data-pct] { position: relative; }
.crown { position: absolute; left: 5px; top: 5px; }
.tip, .na:hover::after { position: absolute; z-index: 6; right: 0; bottom: 100%; margin-bottom: 4px; width: 11rem; padding: 6px 9px; border-radius: 3px; background: var(--brown-900); color: var(--on-dark); font: 12px/1.35 system-ui, sans-serif; text-align: left; white-space: normal; box-shadow: 0 3px 10px var(--shade); pointer-events: none; }
.tip.below { bottom: auto; top: 100%; margin: 4px 0 0; }
.tip.start { right: auto; left: 0; }
.tip-avg { display: block; margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--brown-500); }
/* Where supported, the note is fixed above its cell (site.js), never clipped. */
@supports (anchor-name: --tip) {
  .tip-at { anchor-name: --tip; }
  .tip { position: fixed; position-anchor: --tip; right: anchor(right); bottom: anchor(top); position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline; }
}
.button-link {
  display: inline-block; padding: 3px 10px; border: 1px solid var(--brown-700); border-radius: 2px;
  background: var(--brown-500); color: var(--on-dark); font-weight: 600; font-size: 12px; text-decoration: none; white-space: nowrap;
}
.button-link:hover { background: var(--brown-700); color: var(--on-dark); }
/* Raised button: lifts on hover, presses down when clicked. */
.profile-button {
  position: relative; top: 0; padding: 4px 14px; border-color: var(--brown-900); border-radius: 3px;
  background: linear-gradient(var(--brown-500), var(--brown-700));
  box-shadow: 0 3px 0 var(--brown-900), 0 4px 5px var(--shade), inset 0 1px 0 var(--glint);
  transition: top .12s ease, box-shadow .12s ease, background .12s ease;
}
.board .profile-button { box-shadow: 0 1px 0 var(--brown-900); }
.profile-button:hover, .profile-button:focus-visible {
  top: -1px; color: var(--gold-light);
  background: linear-gradient(var(--brown-400), var(--brown-500));
  box-shadow: 0 4px 0 var(--brown-900), 0 6px 8px var(--shade), inset 0 1px 0 var(--glint);
}
.profile-button:active { top: 2px; box-shadow: 0 1px 0 var(--brown-900), inset 0 1px 2px var(--shade); }
.ext { margin-left: 6px; vertical-align: -1px; }
/* Notes under the table: italic, a decorative star per sentence. */
.table-note { margin: 16px 0 4px; font-style: italic; }
.table-note p { margin: 0; }
.table-note p::before, .sync-notes p + p::before { content: "\2731" / ""; margin-right: 7px; color: var(--gold); font-style: normal; }
.sync-notes p + p { font-style: italic; }
/* "How builds are scored", and each About section in the same box. */
.scoring, .about-box {
  margin: 16px 0 0; padding: 4px 18px 6px;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--gold);
}
.scoring h2, .about-box h2 { border: 0; margin: .6rem 0 .2rem; font-size: 1.15rem; }
.about-box :is(.sv-row, .rv-row):not(.sv-head, .rv-head) { background: var(--zebra); }
.scoring h3 { margin: .4rem 0 .2rem; font-size: 1rem; }
.scoring h4 { margin: .7rem 0 .1rem; font-size: .95rem; }
.scoring p { margin: .25rem 0; }

.scoring-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 4px 0 8px; }
.scoring-part { padding: 2px 22px; }
.scoring-part:first-child { padding-left: 0; }
.scoring-part + .scoring-part { border-left: 2px solid var(--parchment); }
.weights-list { list-style: none; padding: 0; margin: .3rem 0; }
.weights-list li { display: flex; align-items: baseline; gap: 10px; padding: 3px 0; border-bottom: 1px dotted var(--border); }
.weight { flex: none; min-width: 2.8rem; padding: 0 6px; text-align: center; background: var(--score); border: 1px solid var(--score-band); border-radius: 2px; color: var(--brown-700); }

/* == equipment == */

.builds, .equipment, .values { margin-top: 24px; padding: 2px 16px 14px; background: var(--zebra); border: 1px solid var(--border); border-top: 4px solid var(--brown-500); }
.builds h2, .equipment h2, .values h2 { border: 0; margin: .7rem 0 .3rem; }
/* Across brackets: centred, at least 90% wide. */
.values-grid { width: max(90%, min(100%, 98rem)); margin-left: auto; margin-right: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.values .trend { width: 100%; height: auto; }
.builds-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 16px; }
.updated { margin: 0 0 4px; font-size: .875rem; }
.h-sub { margin-left: 8px; font: 400 .9rem system-ui, sans-serif; color: var(--muted); }
/* Row lists: Equipment, About servers and weights. */
.eq-list { position: relative; overflow-x: auto; container-type: inline-size; }
.eq-row, .sv-row, .tv-row, .rv-row { display: grid; gap: 4px 12px; align-items: start; margin-bottom: 6px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; }
.eq-row { grid-template-columns: 8rem repeat(3, minmax(8.5rem, 1fr)); align-items: center; text-align: center; }
.sv-row { grid-template-columns: minmax(11rem, 2fr) 6rem 7rem 9rem 1.3fr; align-items: center; }
.tv-list { overflow-x: auto; }
.tv-row { grid-template-columns: minmax(8rem, 1.3fr) repeat(5, minmax(4.5rem, 1fr)); align-items: center; margin-bottom: 4px; padding: 5px 10px; }
.eq-row:not(.eq-head):hover, .sv-row:not(.sv-head):hover, .tv-row:not(.tv-head):hover, .rv-row:not(.rv-head):hover { background: var(--r-common); border-color: var(--brown-500); }
.eq-head, .sv-head, .tv-head, .rv-head { margin: 0; padding-bottom: 0; background: none; border: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
/* About, Scores: half and half; compact rows (after the shared row rules). */
.scores-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.scores-grid h4 { margin: 1rem 0 .4rem; font-size: 1.05rem; }
.rv-row { grid-template-columns: 1.6fr 1fr 1fr; gap: 8px; margin: 0; border-width: 0 0 1px; padding: 3px 10px; font-size: 13px; }
.rv-row .num { text-align: right; }
.eq-slot { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.eq-icon { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--brown-500); stroke-width: 1.6; }
.badge { padding: 1px 8px; border: 1px solid var(--positive); border-radius: 10px; color: var(--positive); font-size: 12px; }
.badge.off { border-color: var(--muted); color: var(--muted); }
.sv-label { display: none; }
.top { display: block; font-weight: 600; }
.top + .top { font-weight: 400; }
.share { color: var(--muted); font-size: 12px; font-weight: 400; }
.rarity { white-space: nowrap; }
.swatch { display: inline-block; width: 11px; height: 11px; margin-right: 5px; border: 1px solid var(--brown-900); vertical-align: baseline; background: var(--r); }
.rarity-common { --r: var(--r-common); }
.rarity-green { --r: var(--r-green); }
.rarity-blue { --r: var(--r-blue); }
.rarity-purple { --r: var(--r-purple); }
.rarity-orange { --r: var(--r-orange); }
.rarity-red { --r: var(--r-red); }
/* Equipment (user, 2026-10-30): each slot a row that opens, its values centred. The slot stays in
   view when the row scrolls sideways, and so does the open part below it, a shade darker. */
.eq-head, .eq-item { min-width: 38rem; }
.eq-head { margin-bottom: 4px; }
.eq-item { margin-bottom: 6px; }
.eq-item > .eq-row { margin: 0; cursor: pointer; list-style: none; }
.eq-item > .eq-row::-webkit-details-marker { display: none; }
.eq-item > .eq-row:focus-visible { outline-offset: -3px; }
.eq-item[open] > .eq-row { border-color: var(--brown-500); }
.eq-row > :first-child { position: sticky; left: 0; z-index: 1; align-self: stretch; margin-right: -12px; padding-right: 12px; text-align: left; background: inherit; }
.eq-head > :first-child { background: var(--zebra); }
.eq-open { display: block; color: var(--accent); font-size: 12px; font-weight: 400; text-decoration: underline; }
.eq-more { position: sticky; left: 0; width: 100cqw; padding: 6px 12px; background: var(--zebra); border: 1px solid var(--brown-500); border-top: 0; font-size: 14px; }
.eq-more p { margin: 3px 0; }

/* == trends chart (stays in view) == */
.chart-col { position: sticky; top: 0; }
.chart-title { display: block; }
.chart-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); }
.trend { display: block; }
.trend .grid { stroke: var(--border); stroke-width: 1; }
.trend .axis { fill: var(--muted); font-size: 12px; }
.trend .line { fill: none; stroke-width: 2; }
.trend .line-1 { stroke: var(--brown-500); }
.trend .dot.line-1 { fill: var(--gold); stroke: var(--brown-700); stroke-width: 1; }

@media (max-width: 900px) {
  .scoring-grid, .values-grid, .scores-grid { grid-template-columns: 1fr; }
  .scoring-part, .scoring-part:first-child { padding: 6px 0; }
  .scoring-part + .scoring-part { border-left: 0; border-top: 2px solid var(--parchment); }
}

/* The board scrolls sideways inside its box whenever it is wider. */
.board-wrap { overflow-x: auto; }
@media (max-width: 640px) {
  .sv-row { grid-template-columns: 1fr 1fr; }
  .sv-head { display: none; }
  .sv-label { display: inline; color: var(--muted); }
  .wrap { padding-inline: 12px; }
  /* Menu: the label toggles the checkbox (base.html). */
  .nav-btn { display: flex; }
  .nav-toggle { display: block; }
  .topbar nav { display: none; flex-basis: 100%; flex-direction: column; padding-bottom: 4px; }
  .nav-toggle:checked ~ nav { display: flex; }
  .nav-toggle:focus-visible + .nav-btn { outline: 2px solid var(--gold); }
  .topbar .nav-sep { width: auto; height: 1px; margin: 4px 0; }
  .bracket-chips { grid-template-columns: repeat(auto-fill, minmax(7.6rem, 1fr)); }
  .banner { margin: 12px 12px 0; }
  h1 { font-size: 1.4rem; }
  :is(.facts, .sync-facts) { flex-direction: column; }
  :is(.facts, .sync-facts) > span + span::before { content: none; }
}

/* Reduced motion: no spinning, pulsing, lifting or sliding. */
@media (prefers-reduced-motion: reduce) {
  .loading-text::before, .sync-dot { animation: none; }
  .chip, .profile-button { transition: none; }
}
