/* Sales Report. One family (Archivo, two widths), a dark neutral ground, and one rule for
   colour: team size wears loot rarity. Solo gold, duo purple, trio blue, full team plain. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0f0f10;
  --panel: #17171a;
  --panel-2: #1e1e21;
  --line: #2a2a2e;
  --line-2: #3a3a3f;
  --text: #ebe9e4;
  --muted: #acaaa6;
  --faint: #8a8884;
  --brand: #ff5a3d;
  --solo: #e6bd3f;
  --duo: #b684ea;
  --trio: #66a8ea;
  --full: #93918d;
  --ring: #5e5e65;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --radius: 6px;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  scrollbar-color: var(--line-2) var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 0.9375rem/1.5 "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  accent-color: var(--brand);
  caret-color: var(--brand);
}

::selection { background: rgba(255, 90, 61, 0.38); color: #fff; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }

h1 { font-size: 1.75rem; line-height: 1.15; font-weight: 650; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: 1.375rem; line-height: 1.2; font-weight: 650; letter-spacing: -0.005em; text-wrap: balance; }
h3 { font-size: 1.125rem; line-height: 1.25; font-weight: 650; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--s5)); margin-inline: auto; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.num { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Small condensed capitals: column heads, tags, the raid names on the art. */
.caps {
  font-stretch: 78%;
  font-weight: 650;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* ---- top bar ---------------------------------------------------------------------------- */

.bar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(15, 15, 16, 0.94);
  border-bottom: 1px solid var(--line);
}
.bar .wrap { display: flex; align-items: center; gap: var(--s5); height: 56px; }
.mark {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-stretch: 72%; font-weight: 800; font-size: 1.125rem; letter-spacing: 0.06em;
  text-transform: uppercase; text-decoration: none; white-space: nowrap;
}
.mark .stamp {
  font-size: 0.6875rem; letter-spacing: 0.12em; color: var(--brand);
  border: 1.5px solid var(--brand); border-radius: 3px; padding: 1px 5px 0;
  transform: rotate(-6deg);
}
.bar nav { display: flex; gap: var(--s1); }
.bar nav a {
  padding: var(--s2) var(--s3); border-radius: var(--radius);
  color: var(--muted); text-decoration: none; font-weight: 550;
}
.bar nav a:hover { color: var(--text); background: var(--panel-2); }
.bar nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--brand); border-radius: 0; }
.find { margin-left: auto; position: relative; }
.find input {
  width: 240px; height: 36px; padding: 0 var(--s3) 0 34px;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  font: inherit;
}
.find input::placeholder { color: var(--faint); }
.find input:hover { border-color: var(--ring); }
.find svg { position: absolute; left: 10px; top: 10px; width: 16px; height: 16px; color: var(--faint); pointer-events: none; }

/* ---- raids or dungeons ------------------------------------------------------------------
   The switch between the two halves of the site: two words in one box, the half you are in
   raised. It sits beside the wordmark in the top bar (the same page in the other half) and
   again in a profile's header (the same player). Only there when the site has a dungeon half. */
.halves, .bar .halves {
  flex: none; display: inline-flex; gap: 2px; padding: 2px;
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel);
}
.halves a, .bar .halves a {
  display: inline-flex; align-items: center; height: 28px; padding: 0 var(--s3); border-radius: 4px;
  color: var(--muted); font-size: 0.875rem; font-weight: 600; white-space: nowrap; text-decoration: none;
}
.halves a[href]:hover { color: var(--text); background: var(--panel-2); }
.halves a[aria-current], .bar .halves a[aria-current] { color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); cursor: default; }
/* With the switch in it the bar is fuller. On a screen too narrow for all of it (a small tablet,
   a phone on its side) the search gives up width first, down to 150px, and if that is still
   not enough it takes a second row rather than push the page wider than the window. (It starts
   from the 150px and grows: a row is filled by what things ask for, before anything shrinks.) */
.halves ~ .find { flex: 1 1 150px; min-width: 150px; max-width: 240px; }
.halves ~ .find input { width: 100%; }
.bar .wrap:has(.halves) { flex-wrap: wrap; height: auto; min-height: 56px; row-gap: var(--s2); padding-block: var(--s2); }
/* In a profile's header it lines up with the links beside it, and keeps its own colours there. */
.who-head .links { align-items: center; }
.who-head .links .halves a { text-shadow: none; }

main { padding-block: var(--s6) var(--s8); }
section + section { margin-top: var(--s7); }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s4); }
.head p { color: var(--muted); }

/* The rule above the footer belongs to the column, not the window: over a raid backdrop a line
   running edge to edge reads as a crack across the picture. */
footer { padding-bottom: var(--s5); color: var(--faint); font-size: 0.8125rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); justify-content: space-between; border-top: 1px solid var(--line); padding-top: var(--s5); }

/* ---- team size marks -------------------------------------------------------------------- */

.t1 { --tier: var(--solo); }
.t2 { --tier: var(--duo); }
.t3 { --tier: var(--trio); }
.t0 { --tier: var(--full); }

/* A run. Filled: cleared. Ring: not finished. Star: flawless. */
.dot {
  flex: none; display: inline-block; width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--ring); color: var(--tier);
}
.dot.t1, .dot.t2, .dot.t3 { border-color: var(--tier); }
.dot.clear { background: var(--tier); border-color: var(--tier); }
.dot.t0.clear { background: #6a6966; border-color: #6a6966; }
.dot.star {
  width: 15px; height: 15px; margin: -2px; border: 0; border-radius: 0;
  background: var(--tier);
  -webkit-mask: url("/assets/star.svg") center / contain no-repeat;
  mask: url("/assets/star.svg") center / contain no-repeat;
}
.dot.t0.star { background: var(--text); }
/* Marked as cheated: a black dot, whatever the team was. */
.dot.cheat, .dot.cheat.clear, .dot.cheat.star {
  width: 11px; height: 11px; margin: 0; border-radius: 50%; border: 2px solid #d7d5cf; background: #000;
  -webkit-mask: none; mask: none;
}
a.dot:hover, a.dot:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 50%; }

.pip { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tier); margin-right: 6px; }
.tier { color: var(--tier); font-weight: 600; white-space: nowrap; }
.tier .dot { margin-right: 7px; vertical-align: -1px; }
.tier .dot.star { margin: -2px 5px -2px -2px; vertical-align: -3px; }
.tier.t0 { color: var(--muted); font-weight: 400; }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 4px;
  background: rgba(15, 15, 16, 0.78); border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text); white-space: nowrap; text-decoration: none; font-weight: 650;
}
.tag.plain { background: var(--panel-2); border-color: var(--line-2); color: var(--muted); }
.tag.bright { color: #fff; border-color: rgba(255, 255, 255, 0.42); }
/* A tag about one run wears that run's team colour. Gold is never "special", only solo. */
.tag.tier { color: var(--tier); border-color: color-mix(in srgb, var(--tier) 55%, transparent); }
/* A tag that opens a run says so when pointed at: it fills with its own colour and lifts. The
   tag keeps its size, so the row never reflows under the pointer. */
a.tag {
  cursor: pointer;
  transition: background-color 0.12s ease-out, color 0.12s ease-out, border-color 0.12s ease-out, transform 0.12s ease-out, box-shadow 0.12s ease-out;
}
a.tag:hover, a.tag:focus-visible {
  background: #fff; border-color: #fff; color: #0f0f10;
  transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
a.tag.tier:hover, a.tag.tier:focus-visible { background: var(--tier); border-color: var(--tier); }
a.tag:active { transform: none; box-shadow: none; }
.tag svg { width: 11px; height: 11px; }
/* A tag that rests on one of Bungie's triumphs (dungeons): the player is credited with it and no
   run on file shows it, so it opens nothing. A dashed edge sets it apart from a tag with a run
   behind it, and the key under the tabs says what the edge means. */
.tag.credit { border-style: dashed; cursor: default; }

/* ---- nameplate -------------------------------------------------------------------------- */

.plate {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  width: 100%; aspect-ratio: 474 / 96; padding: 0 var(--s4) 0 0;
  background: var(--panel-2) center / cover no-repeat; border-radius: 4px; overflow: hidden;
  text-decoration: none; color: #fff;
}
.plate::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0) 14%, rgba(0, 0, 0, 0.42) 34%, rgba(0, 0, 0, 0.58));
}
.plate.bare { padding-left: var(--s4); }
.plate.bare > * { margin-left: 0; }
.plate.bare::before { display: none; }
.plate > * { position: relative; margin-left: 21.5%; }
.plate .name { font-weight: 650; font-size: 1.0625rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plate .name .code { color: rgba(255, 255, 255, 0.7); font-weight: 450; }
.plate .sub { color: rgba(255, 255, 255, 0.82); font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.plate { transition: filter 150ms ease-out; }
a.plate:hover { filter: brightness(1.14); color: #fff; }

/* ---- home ------------------------------------------------------------------------------- */

.intro { display: grid; gap: var(--s2); max-width: 68ch; }
.intro p { color: var(--muted); }

.feed { border-top: 1px solid var(--line); }
.feed li {
  display: grid; grid-template-columns: 7.5rem 5.5rem minmax(0, 1.1fr) minmax(0, 1.4fr) 5rem;
  grid-template-areas: "when tier what who dur";
  gap: var(--s4); align-items: center;
  padding: var(--s3) 0; border-bottom: 1px solid var(--line);
}
.feed .when { grid-area: when; }
.feed .tier { grid-area: tier; }
.feed .what { grid-area: what; }
.feed .who { grid-area: who; }
.feed .dur { grid-area: dur; }
.feed .who { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .who a { color: var(--text); }
.feed .what { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }

.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: var(--s4); }
.member { display: grid; gap: var(--s2); }
.member .line { display: flex; gap: var(--s4); align-items: center; font-size: 0.8125rem; color: var(--muted); padding-inline: 2px; }
.member .line .split { display: inline-flex; gap: var(--s3); margin-left: auto; }
.member .line .split span { display: inline-flex; align-items: center; }

/* ---- profile ---------------------------------------------------------------------------- */

.who-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s5); }
.who-head .plate { width: 474px; max-width: 100%; flex: none; }
.who-head .plate .name { font-size: 1.5rem; }
.who-head .plate .sub { font-size: 0.9375rem; }
.who-head .links { margin-left: auto; display: flex; gap: var(--s4); font-size: 0.8125rem; color: var(--muted); }
/* What they are doing now (filled in by app.js while they are online) and their latest raid:
   two small tiles, each with the activity's own picture behind the words. */
.who-head .lately { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--s3); min-width: 0; flex: 1 1 320px; font-size: 0.875rem; }
.lately [hidden] { display: none; }
.tile {
  position: relative; display: flex; flex-wrap: wrap; align-content: center; align-items: baseline; gap: 1px var(--s2);
  min-height: 78px; margin: 0; padding: 9px 12px; overflow: hidden;
  border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel);
}
.tile > * { position: relative; z-index: 1; }
.tile .tileart { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The picture is kept behind a dark wash, heavier where the words are. */
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15, 15, 16, 0.9) 35%, rgba(15, 15, 16, 0.5)); }
.tile .k { flex-basis: 100%; display: flex; align-items: center; gap: 6px; color: var(--muted); }
.tile .what { display: inline-flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none; }
.tile a.what:hover b { text-decoration: underline; }
.tile .muted { color: var(--muted); }
.tile .mates { flex-basis: 100%; color: var(--muted); font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .mates a { text-decoration: none; }
.tile .mates a:hover { color: var(--text); text-decoration: underline; }
/* Online. Green means nothing else on this site. */
.nowdot { width: 8px; height: 8px; border-radius: 50%; background: #5fd38d; box-shadow: 0 0 0 3px rgba(95, 211, 141, 0.18); }

.figures {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: var(--s5); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.figures > div { padding: var(--s4) var(--s5); border-left: 1px solid var(--line); min-width: 0; }
.figures > div:first-child { border-left: 0; }
.figures dt { color: var(--muted); }
.figures a { text-decoration: none; }
.figures a:hover { text-decoration: underline; }
.figures .n { font-size: 1.75rem; line-height: 1.2; font-weight: 650; letter-spacing: -0.01em; margin-top: 2px; }
.figures .more { display: flex; flex-wrap: wrap; gap: 2px var(--s4); color: var(--muted); font-size: 0.8125rem; margin-top: 2px; }
.figures .more span, .figures .more a { display: inline-flex; align-items: center; white-space: nowrap; }
.figures .rank { color: var(--faint); font-size: 0.8125rem; margin-top: var(--s2); }
.figures .rank a:hover { color: var(--text); }
.rank b { color: var(--text); font-weight: 600; margin-right: 0.3em; }

.note {
  margin-top: var(--s4); padding: var(--s3) var(--s4);
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel); color: var(--muted);
}

.tabs { display: flex; gap: var(--s5); margin-top: var(--s6); box-shadow: inset 0 -1px 0 var(--line); overflow-x: auto; overflow-y: hidden; }
.tabs { scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: var(--s3) 0; color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap;
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--brand); }
.tabs .count { color: var(--faint); font-weight: 450; margin-left: 4px; }
.tabpanel { margin-top: var(--s5); }

.key { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); color: var(--muted); font-size: 0.8125rem; margin-bottom: var(--s4); }
.key span { display: inline-flex; align-items: center; gap: 6px; }

.raids { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
/* On a wide screen the cards take more of it: four to a row, then five, then six. The grid
   steps out past the page column to do it (a negative margin, so nothing inside is transformed),
   and the backdrop's dark band is told to follow (--band-half, read by fx.css). */
@media (min-width: 1700px) {
  .raids {
    --w: min(2360px, 100vw - 160px);
    width: var(--w); margin-left: calc((100% - var(--w)) / 2);
    grid-template-columns: repeat(auto-fill, minmax(372px, 1fr));
  }
  body:has(.raids) { --band-half: calc(min(2360px, 100vw - 160px) / 2 + 6px); }
}
.raid { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.raid .art { position: relative; aspect-ratio: 16 / 7; background: var(--panel-2); }
.raid .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.raid .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 15, 16, 0.1) 30%, rgba(15, 15, 16, 0.86)); }
.raid .art .tags { position: absolute; z-index: 1; top: var(--s3); left: var(--s3); right: var(--s3); display: flex; flex-wrap: wrap; gap: 6px; }
.raid[data-sold] .art .tags { right: 88px; }
.raid .art h2 {
  position: absolute; z-index: 1; left: var(--s4); right: var(--s4); bottom: var(--s3);
  font-stretch: 75%; font-weight: 750; font-size: 1.25rem; letter-spacing: 0.035em; text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.raid .body { padding: var(--s4); display: grid; gap: var(--s4); flex: 1; align-content: start; }
/* The card's figures: a label over each number, four across. */
.raid .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
.raid .stats div { display: grid; gap: 3px; align-content: start; min-width: 0; }
.raid .stats dt { color: var(--faint); }
.raid .stats dd { font-weight: 650; font-size: 1.125rem; line-height: 1.2; white-space: nowrap; }
.raid .stats a { text-decoration: none; }
.raid .stats a:hover { text-decoration: underline; }
.raid .stats .nil { color: var(--line-2); font-weight: 400; }
.raid .also { display: flex; flex-wrap: wrap; gap: 2px var(--s4); margin-top: calc(-1 * var(--s2)); color: var(--muted); font-size: 0.8125rem; }
.raid .also a { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.raid .also a:hover { color: var(--text); text-decoration: underline; }
.raid .also .star { width: 11px; height: 11px; }
/* The member with the most checkpoint clears of a raid is told so. */
.raid .also .cpmost { color: var(--text); font-weight: 650; }
.raid .also .cpmost::before { content: "\00b7"; margin-right: 5px; color: var(--faint); font-weight: 400; }

.ladder { width: 100%; border-collapse: collapse; }
.ladder th, .ladder td { padding: 5px 0; text-align: right; font-weight: 400; }
.ladder thead th { color: var(--faint); padding-bottom: 6px; }
.ladder tbody th { text-align: left; color: var(--muted); font-weight: 550; white-space: nowrap; }
.ladder tbody tr { border-top: 1px solid var(--line); }
.ladder td { width: 24%; color: #57565a; }
.ladder td a { color: var(--tier); font-weight: 650; text-decoration: none; }
.ladder td a:hover { text-decoration: underline; color: var(--tier); }
.ladder .m { margin-left: 5px; padding: 0 4px; border-radius: 3px; border: 1px solid var(--line-2); color: var(--muted); font-size: 0.6875rem; font-weight: 650; }

/* ---- run strip ---------------------------------------------------------------------------- */

/* The marks of a raid's runs along the bottom of its card: every run, newest at the right.
   It scrolls sideways inside the card and never widens it. Three things make that hold:
   - it is laid out right to left (the marks are written newest first), so it opens at the
     newest end with no script; what is inside it reads left to right as usual;
   - it is a scroll box with no bar of its own (wheel, swipe and keyboard move it; fx.js adds
     dragging, fades on the side that has more, and the card about a run);
   - it is position: relative, so the screen-reader text inside each mark stays inside the box
     instead of sitting out in the page and widening it on a phone. */
.strip {
  position: relative; display: flex; align-items: center; gap: 5px; min-width: 0;
  direction: rtl; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none;
  /* room for a mark's focus ring, taken back by the margin so the card's spacing is unchanged:
     a mark is 11px tall, and so is the strip once the margin has taken the padding back */
  min-height: 21px; padding: 5px 4px; margin: -5px -4px;
  /* older runs fade out at the left edge instead of being cut in half */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px); mask-image: linear-gradient(90deg, transparent, #000 18px);
}
.strip::-webkit-scrollbar { display: none; }
.strip > * { direction: ltr; }
/* At the old end, past the last mark: the way to the whole list. Its line is no taller than a
   mark, so the strip (and the card) keeps its height whether or not it shows. */
.strip .all { flex: none; margin: 0 8px 0 18px; color: var(--muted); font-size: 0.8125rem; line-height: 11px; white-space: nowrap; }
.strip .all:hover { color: var(--text); }

/* ---- end of run strip --------------------------------------------------------------------- */

.never { margin-top: var(--s5); color: var(--faint); }

/* ---- sticker book ----------------------------------------------------------------------- */

.book { margin-bottom: var(--s3); max-width: 100ch; }
.book a { text-decoration: none; }
.book a:hover b { text-decoration: underline; }

/* ---- the sticker book on its own page ----------------------------------------------------------
   A book with dark pages, like an old photograph album. Each raid is a spread: on the left page
   its picture, stuck in like a photograph, its name and how much of it is collected; on the
   right its stickers, each with the memory of the run it was first earned in. A title page and
   a contents page come first, and a row of small pictures above the book leads to any raid.

   With scripts off the spreads follow one another down the page. fx.js stacks them into one
   book and turns the pages (the "sticker book" part of fx.css). At 900px and under a spread is
   a single page: the raid, then its stickers. */
.bookbar { height: 6px; max-width: 640px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.bookbar i { display: block; height: 100%; border-radius: 3px; background: var(--brand); }

/* The way round the book. It scrolls sideways when it does not fit, and is position: relative so
   the screen-reader names inside the links stay inside the scrolling box. */
.bookmarks {
  position: relative; display: flex; align-items: center; gap: 6px; margin: 0 -4px var(--s4); padding: 4px;
  overflow-x: auto; scrollbar-width: none;
}
.bookmarks::-webkit-scrollbar { display: none; }
.bookmarks a {
  position: relative; flex: none; width: 46px; height: 28px; border-radius: 3px; overflow: hidden;
  background: var(--panel-2); outline: 1px solid var(--line-2); outline-offset: -1px;
}
.bookmarks a img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.bookmarks a[data-empty] img { filter: grayscale(0.8); opacity: 0.35; }
.bookmarks a:hover img, .bookmarks a[aria-current] img { opacity: 1; }
.bookmarks a[aria-current] { outline: 2px solid var(--brand); outline-offset: 1px; }
.bookmarks a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* a raid that is sold out has the stamp's colour across its corner */
.bookmarks a[data-sold]::after { content: ""; position: absolute; top: 0; right: 0; border: 6px solid; border-color: var(--brand) var(--brand) transparent transparent; }
.bookmarks .toc { width: auto; height: 28px; padding: 0 10px; line-height: 28px; color: var(--muted); text-decoration: none; }
.bookmarks .toc:hover, .bookmarks .toc[aria-current] { color: var(--text); }

.tome { display: grid; gap: var(--s5); }
/* One open spread: two pages and the spine between them. */
.spread {
  position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 560px; margin: 0;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel);
  /* the edges of the pages underneath, and the book lying on the page */
  box-shadow: 0 2px 0 -1px var(--panel-2), 0 5px 0 -2px #19191c, 0 16px 30px rgba(0, 0, 0, 0.45);
  /* a link that jumps here lands clear of the bar at the top of the window */
  scroll-margin-top: 76px;
}
/* the spine, and a ribbon to keep the place */
.spread::before { content: ""; position: absolute; z-index: 4; top: 0; bottom: 0; left: calc(50% - 1px); width: 2px; background: #0c0c0d; pointer-events: none; }
.spread::after {
  content: ""; position: absolute; z-index: 5; top: -1px; left: calc(50% + 5px); width: 11px; height: 40px; pointer-events: none;
  background: var(--brand); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
}
.page { position: relative; min-width: 0; padding: var(--s6) var(--s6) 48px; background-color: var(--panel); }
/* each page darkens toward the spine, as paper curving into a binding does */
.page.left { border-radius: 9px 0 0 9px; background-image: linear-gradient(90deg, transparent 86%, rgba(0, 0, 0, 0.34)); }
.page.right { border-radius: 0 9px 9px 0; background-image: linear-gradient(270deg, transparent 86%, rgba(0, 0, 0, 0.34)); }
.folio { position: absolute; bottom: 16px; color: var(--faint); font-size: 0.75rem; }
.page.left .folio { left: var(--s6); }
.page.right .folio { right: var(--s6); }

/* The left page: the raid. Its picture is stuck in a little squint, with a paper edge. */
.tome .art {
  position: relative; aspect-ratio: 16 / 9; margin: 4px 6px var(--s5) 2px; overflow: hidden; rotate: -1.2deg;
  border: 5px solid #f1efe9; border-radius: 3px; background: var(--panel-2); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}
.tome .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* stamped across the corner of the picture once the raid's page is full */
.tome .art .sold {
  position: absolute; z-index: 2; top: 28px; right: -52px; width: 200px; padding: 7px 0 5px; transform: rotate(35deg); text-align: center;
  background: var(--brand); color: #1c0c08;
  font-stretch: 72%; font-weight: 800; font-size: 1.125rem; line-height: 1; letter-spacing: 0.18em; text-transform: uppercase;
}
.spread[data-empty] .art img { filter: grayscale(0.75) brightness(0.65); }
.page h2 { font-stretch: 75%; font-weight: 750; font-size: 1.5rem; letter-spacing: 0.035em; text-transform: uppercase; }
.spread[data-empty] .page h2 { color: var(--muted); }
.page .count { margin-top: var(--s2); color: var(--muted); }
.page .count b { color: var(--text); font-weight: 650; font-size: 1.0625rem; }
.page .bookbar { max-width: 280px; margin-top: var(--s2); }
.page .since { margin-top: var(--s4); color: var(--muted); font-size: 0.8125rem; }
.page .tally { display: flex; flex-wrap: wrap; gap: 2px var(--s4); margin-top: var(--s1); color: var(--muted); font-size: 0.8125rem; }
.page .tally a { text-decoration: none; }
.page .tally a:hover { text-decoration: underline; }
.page .tally b { color: var(--text); font-weight: 650; }
.page .tally.unentered { color: var(--faint); }

/* The title page and the contents. */
.titlepage { display: flex; flex-direction: column; justify-content: center; }
.titlepage .kicker { color: var(--brand); }
.titlepage h2 { margin-top: var(--s2); font-stretch: normal; font-size: 1.75rem; letter-spacing: -0.01em; text-transform: none; overflow-wrap: anywhere; }
.titlepage .count { margin-top: var(--s5); }
.titlepage .count b { font-size: 1.375rem; }
.titlepage .soldcount { margin-top: var(--s2); color: var(--muted); }
.titlepage .rules { margin-top: var(--s5); max-width: 46ch; color: var(--muted); font-size: 0.8125rem; }
.page h3.caps { margin-bottom: var(--s3); color: var(--faint); font-size: 0.75rem; }
.toc li { border-bottom: 1px dotted var(--line-2); }
.toc a { display: grid; grid-template-columns: minmax(0, 1fr) auto 4.4rem 1.6rem; align-items: baseline; gap: var(--s3); padding: 4px 0; text-decoration: none; }
.toc a:hover .nm { text-decoration: underline; }
.toc .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.toc li[data-empty] .nm { color: var(--muted); font-weight: 400; }
.toc .st { padding: 0 4px; border: 1.5px solid var(--brand); border-radius: 3px; color: var(--brand); font-size: 0.625rem; line-height: 1.5; transform: rotate(-4deg); }
.toc .ct { grid-column: 3; color: var(--muted); font-size: 0.8125rem; text-align: right; white-space: nowrap; }
.toc .pg { grid-column: 4; color: var(--faint); font-size: 0.8125rem; text-align: right; }

/* The right page: the stickers, three to a row under the name of the version, each with its
   memory beneath it. */
.tome .sheet { gap: var(--s5); }
.tome .srow { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5) var(--s3); }
.tome .srow .rowname { grid-column: 1 / -1; padding: 0 0 5px; border-bottom: 1px solid var(--line); }
.keep { display: grid; align-content: start; justify-items: center; gap: 4px; min-width: 0; text-align: center; }
.keep .slot { width: 100%; margin-bottom: 2px; }
.tome .stk { width: min(100%, 150px); }
/* the same squints as on a raid card; there the place is the second, third and fourth in its row too */
.keep:nth-child(3) .stk:not(.none, .unknown) { transform: rotate(2deg); }
.keep:nth-child(4) .stk:not(.none, .unknown) { transform: rotate(-1.5deg); }
.memo { display: grid; justify-items: center; gap: 1px; color: var(--muted); font-size: 0.8125rem; line-height: 1.4; overflow-wrap: anywhere; }
/* the day and how long it took share a line */
.memo .day { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 0 6px; }
.memo .took::before { content: "\00b7"; margin-right: 6px; color: var(--faint); }
.memo a { text-decoration: none; }
.memo a:hover { color: var(--text); text-decoration: underline; }
.memo .when { color: var(--text); font-weight: 600; }
.memo .flawless { display: inline-flex; align-items: center; gap: 4px; color: var(--tier); font-weight: 600; }
.memo .flawless .star { width: 11px; height: 11px; }
.memo.coin { margin-top: 4px; padding-top: 5px; border-top: 1px dotted var(--line-2); }
.memo.none { color: var(--faint); }
/* A place held on the word of a triumph: no run or date, only where it comes from. Its ticket
   has a stitched edge, as the tags that rest on a triumph have a dashed one. */
.memo .cred { color: var(--muted); }
.stk.credit .tkt .edge { stroke-dasharray: 5 3.5; }

@media (max-width: 900px) {
  /* One page to a raid: the picture and name, then the stickers down the page with the memory
     beside each. No spine, so no ribbon and no shading toward it. */
  .spread { grid-template-columns: minmax(0, 1fr); align-content: start; min-height: 0; }
  .spread::before, .spread::after { display: none; }
  .page { padding: var(--s4) var(--s4) var(--s5); }
  .page.left { border-radius: 9px 9px 0 0; background-image: none; padding-bottom: var(--s2); }
  .page.right { border-radius: 0 0 9px 9px; background-image: none; padding-bottom: 40px; }
  .page.left .folio { display: none; }
  .page.right .folio { right: var(--s4); bottom: 12px; }
  .tome .art { aspect-ratio: 16 / 8; margin-bottom: var(--s4); }
  .page h2 { font-size: 1.25rem; }
  .tome .srow { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .keep { grid-template-columns: 118px minmax(0, 1fr); column-gap: var(--s4); justify-items: start; align-items: center; text-align: left; }
  .keep .slot { grid-row: 1 / span 3; margin: 0; }
  .memo { justify-items: start; }
  .memo .day { justify-content: flex-start; }
  .memo:only-of-type, .memo:first-of-type:nth-last-of-type(1) { grid-row: 1 / span 3; }
  .toc a { grid-template-columns: minmax(0, 1fr) auto 3.8rem 1.4rem; gap: var(--s2); padding: 7px 0; }
}

.book .muted { font-size: 0.8125rem; }

/* Stamped across the corner of the art once the raid's page of the book is full. */
.raid .art .sold {
  position: absolute; z-index: 2; top: 22px; right: -48px; width: 176px; padding: 6px 0 4px;
  transform: rotate(35deg); text-align: center;
  background: var(--brand); color: #1c0c08;
  font-stretch: 72%; font-weight: 800; font-size: 1rem; line-height: 1; letter-spacing: 0.18em; text-transform: uppercase;
}

.sheet { display: grid; gap: var(--s3); }
.srow { display: grid; grid-template-columns: 3.75rem repeat(3, minmax(0, 1fr)); align-items: start; gap: var(--s2); }
.srow .rowname { color: var(--faint); padding-top: 14px; }
.slot { display: grid; justify-items: center; gap: 5px; min-width: 0; }
.slot .n { color: var(--muted); font-size: 0.8125rem; min-height: 1.25em; }
.sheetcap { color: var(--faint); font-size: 0.8125rem; }

/* A sticker is a drawn ticket in the team's colour, stuck in a little squint. Whole (with its
   "Full" stub) for a full run; torn in half for a clear from a checkpoint. */
.defs { position: absolute; }
.stk {
  position: relative; display: block; width: min(100%, 112px); text-decoration: none;
  transform: rotate(-3deg);
}
.slot:nth-child(3) .stk { transform: rotate(2deg); }
.slot:nth-child(4) .stk { transform: rotate(-1.5deg); }
.stk .tkt { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.55)); }
a.stk:hover, a.stk:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 8px; }

/* The paper: a pale die-cut edge, the team's colour, and light falling from above. */
.tkt .edge { fill: #f4f2ec; stroke: #f4f2ec; stroke-width: 3; stroke-linejoin: round; }
.tkt .paper { fill: var(--tier); }
.tkt .rule { fill: none; stroke: rgba(0, 0, 0, 0.3); stroke-width: 1; }
.tkt .perf { fill: none; stroke: rgba(0, 0, 0, 0.5); stroke-width: 1.4; stroke-dasharray: 1.5 3; stroke-linecap: round; }
.tkt text { font-stretch: 72%; font-weight: 800; text-anchor: middle; text-transform: uppercase; fill: #141415; }
.tkt .word { font-size: 17px; letter-spacing: 0.08em; }
.tkt .mode { font-size: 7.2px; letter-spacing: 0.2em; }
.tkt .stubword { font-size: 7.6px; letter-spacing: 0.18em; dominant-baseline: central; }

/* The harder version: black paper, with the colour in its edge, rules and lettering. */
.stk.hard .tkt .edge { fill: var(--tier); stroke: var(--tier); stroke-width: 2.4; }
.stk.hard .tkt .paper { fill: #151517; }
.stk.hard .tkt .rule { stroke: color-mix(in srgb, var(--tier) 55%, transparent); }
.stk.hard .tkt .perf { stroke: var(--tier); }
.stk.hard .tkt text { fill: var(--tier); }

/* Not in the book: only the outline of where it goes. Dotted and fainter where nobody on file
   has one yet. The same outline shows the half still to collect on a torn ticket. */
.tkt .ghost { fill: none; stroke: var(--line-2); stroke-width: 1.6; stroke-dasharray: 4 3.5; stroke-linejoin: round; }
.stk.none .tkt, .stk.unknown .tkt { filter: none; }
.stk.none, .stk.unknown { transform: none; }
.stk.none .tkt text { fill: var(--faint); }
.stk.unknown .tkt .ghost { stroke: var(--line); stroke-dasharray: 1.5 3.5; stroke-linecap: round; }
.stk.unknown .tkt text { fill: #5b5b60; }

/* Flawless: a struck coin with the star, sat over the corner of the ticket. */
.stk .foil {
  position: absolute; top: -32%; right: -8%; width: 32%; height: auto; overflow: visible;
  transform: rotate(12deg); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}
.foil .edge { fill: #f4f2ec; }
.foil .metal { fill: var(--tier); }
.foil .ring { fill: none; stroke: rgba(0, 0, 0, 0.32); stroke-width: 1.1; }
.foil .star { fill: rgba(0, 0, 0, 0.74); }
.stk .foil.missing { filter: none; }
.foil .ghost { fill: none; stroke: var(--line-2); stroke-width: 1.5; stroke-dasharray: 3 3; }

/* George, in his plain form. The effects layer turns him into a pop-up with a moving mouth. */
.george {
  display: grid; gap: 2px; margin-top: var(--s5); padding: var(--s3) var(--s4);
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel);
}
.george .who { color: var(--brand); }
.george .say { font-weight: 650; }
.george .why { color: var(--muted); font-size: 0.8125rem; }

/* ---- tables ----------------------------------------------------------------------------- */

.scroll { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
/* A table that may outgrow the page column when the screen has the room (the history list, whose
   Pantheon rows are long): it is as wide as its longest row needs, never narrower than the
   column, never wider than the window, and stays centred on the column. */
@media (min-width: 1300px) {
  .scroll.grow {
    width: fit-content; min-width: 100%; max-width: min(1720px, calc(100vw - 2 * var(--s5) - 16px));
    margin-left: 50%; transform: translateX(-50%);
  }
}
.data { width: 100%; border-collapse: collapse; white-space: nowrap; }
.data th, .data td { padding: 10px var(--s4); text-align: left; }
.data thead th { color: var(--faint); border-bottom: 1px solid var(--line); background: var(--panel); }
.data thead th a { text-decoration: none; color: inherit; }
.data thead th a:hover { color: var(--text); }
.data thead th[aria-sort] { color: var(--text); box-shadow: inset 0 -2px 0 var(--brand); }
.data tbody tr { border-top: 1px solid var(--line); }
.data tbody tr:first-child { border-top: 0; }
.data tbody tr:hover { background: var(--panel-2); }
.data .num { text-align: right; }
.data td.lead a { font-weight: 600; text-decoration: none; }
.data td.lead a:hover { text-decoration: underline; }
.data .fail { color: var(--faint); }
.data .pos { color: var(--faint); width: 1%; }
.data .who { display: inline-flex; align-items: center; gap: var(--s2); vertical-align: middle; }
.data td.cur { font-weight: 650; }
.data .who img { width: 22px; height: 22px; border-radius: 3px; background: var(--panel-2); }
.data .mem { color: var(--brand); font-stretch: 78%; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.data .you { background: rgba(255, 90, 61, 0.07); }
.star { display: inline-block; width: 13px; height: 13px; background: currentColor; vertical-align: -2px;
  -webkit-mask: url("/assets/star.svg") center / contain no-repeat; mask: url("/assets/star.svg") center / contain no-repeat; }
.guns { display: inline-flex; gap: var(--s3); vertical-align: middle; }
.guns span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.guns img, .gun img { width: 24px; height: 24px; border-radius: 3px; background: var(--panel-2); }
.gun { display: inline-flex; align-items: center; gap: var(--s3); }
.barcell { min-width: 140px; }
.barcell i { display: block; height: 6px; border-radius: 3px; background: var(--muted); min-width: 2px; }

/* ---- a clear marked as cheated: the owner's picture behind it, and his badge for a checkpoint ----- */

/* The whole picture shows, on black, rather than a slice of it. */
.report-art[data-cheated] { background: #000; height: clamp(200px, 30vw, 360px); }
/* It is a dark picture: lifted a little, and faded out at its edges so no square shows. */
.report-art img.shame {
  object-fit: contain; filter: brightness(1.75) contrast(1.05);
  -webkit-mask-image: radial-gradient(circle closest-side, #000 58%, transparent 100%); mask-image: radial-gradient(circle closest-side, #000 58%, transparent 100%);
}
.report-art[data-cheated]::after { background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.8)); }
/* Stuck on like a sticker, clear of the title. */
.report-art img.cpbadge {
  z-index: 2; inset: auto var(--s5) var(--s4) auto; width: clamp(130px, 21%, 250px); height: auto;
  border: 3px solid #f1efe9; border-radius: 4px; transform: rotate(4deg);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65);
}
.report-art[data-checkpoint] .over { right: calc(clamp(130px, 21%, 250px) + 2 * var(--s5)); }

/* ---- a player opened in a report: every character and weapon ----------------------------------- */

button.peek { border: 0; padding: 0; cursor: pointer; }
.pdetail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--s5) var(--s6); color: var(--text); }
.pdetail h3 { color: var(--faint); margin-bottom: var(--s2); }
/* (Named apart from the small ticket drawing, .mini, whose size it used to pick up.) */
.chars { width: 100%; border-collapse: collapse; white-space: nowrap; }
.chars th, .chars td { padding: 5px var(--s3) 5px 0; text-align: left; }
.chars th { color: var(--faint); }
.chars .num { text-align: right; }
.chars tbody tr { border-top: 1px solid var(--line); }
.abil { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s3); color: var(--muted); }
.abil b { color: var(--text); font-weight: 650; }
.wlist li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto 6.5rem; gap: var(--s3); align-items: center; padding: 4px 0; border-top: 1px solid var(--line); }
.wlist li:first-child { border-top: 0; }
.wlist img, .wlist .noicon { width: 24px; height: 24px; border-radius: 3px; background: var(--panel-2); }
.wlist .wname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wlist .num { text-align: right; font-size: 0.8125rem; }
.wlist b.num { font-size: inherit; }

/* ---- the kind of run, at a glance ----------------------------------------------------------- */

/* A small ticket beside the words: whole for a full run, torn for a checkpoint. It wears the
   team's colour when the run was cleared and is a plain outline when it was not. */
.runkind { white-space: nowrap; color: var(--text); }
/* A full run reads brightest; a checkpoint or unknown run steps back. */
.runkind.part { color: var(--muted); }
.runkind.off { color: var(--faint); }
.mini { width: 30px; height: 14px; margin-right: 8px; vertical-align: -2px; overflow: visible; }
.mini .paper { fill: var(--tier); stroke: var(--tier); stroke-width: 3; stroke-linejoin: round; }
.mini .cut { fill: none; stroke: rgba(0, 0, 0, 0.55); stroke-width: 4; stroke-dasharray: 3 6; stroke-linecap: round; }
.mini .ghost { fill: none; stroke: var(--ring); stroke-width: 4; stroke-dasharray: 9 8; stroke-linejoin: round; }
.runkind.off .mini .paper { fill: none; stroke: var(--ring); stroke-width: 4; }
.runkind.off .mini .cut { stroke: var(--ring); }
.data td .tag { vertical-align: middle; }

/* ---- the result of a run, in the history list ------------------------------------------------ */

.res {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 4px;
  font-stretch: 78%; font-weight: 700; font-size: 0.75rem; letter-spacing: 0.07em; text-transform: uppercase;
  white-space: nowrap; vertical-align: middle;
}
.res svg { width: 11px; height: 11px; }
/* Cheated: black, and it stays black. */
.tag.cheat { background: #000; border-color: #d7d5cf; color: #f1efe9; }
.res.cheat { color: #f1efe9; background: #000; border: 1px solid #d7d5cf; }
.data tbody tr.cheated td { color: var(--faint); }
.data tbody tr.cheated td.lead a { color: var(--muted); text-decoration: line-through; }
.cheatnote { border-color: #d7d5cf; background: #000; color: #f1efe9; margin-bottom: var(--s4); }
/* Cleared: a soft fill in the team's colour (plain for a full team). */
.res.cleared {
  color: var(--tier); background: color-mix(in srgb, var(--tier) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--tier) 42%, transparent);
}
.res.cleared.t0 { color: var(--text); background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.2); }
/* Flawless: foil. The team's colour under a band of pale, shifting light that keeps sliding
   across it, the way a shiny trading card catches the light. */
.res.flawless {
  color: #121213; border: 1px solid rgba(255, 255, 255, 0.6);
  background:
    linear-gradient(115deg, transparent 18%, rgba(255, 255, 255, 0.8) 36%, rgba(186, 244, 255, 0.7) 45%,
      rgba(255, 212, 246, 0.7) 55%, rgba(255, 255, 255, 0.8) 64%, transparent 82%) 130% 0 / 260% 100% no-repeat,
    var(--tier);
  animation: foil 2.6s linear infinite;
}
.res.flawless.t0 { --tier: #cfcdc7; }
/* Rows do not all flash at once. */
tr:nth-child(3n + 1) .res.flawless, li:nth-child(3n + 1) .res.flawless { animation-delay: -0.9s; }
tr:nth-child(3n + 2) .res.flawless, li:nth-child(3n + 2) .res.flawless { animation-delay: -1.8s; }
.feed .runkind { font-size: 0.8125rem; }
/* How many clears a line stands for, where a day's farm of one boss is one line (dungeons). */
.feed .times { margin-left: 2px; color: var(--text); font-weight: 650; }
@keyframes foil {
  from { background-position: 130% 0, 0 0; }
  to { background-position: -30% 0, 0 0; }
}

/* ---- a history row opened to show its team ------------------------------------------------ */

/* The control: a small chevron before the raid's name. */
.peek {
  display: inline-block; width: 22px; height: 22px; margin: -3px 6px -3px -6px; vertical-align: middle;
  border-radius: 4px; background: var(--muted);
  -webkit-mask: url("/assets/chevron.svg") center / 10px no-repeat; mask: url("/assets/chevron.svg") center / 10px no-repeat;
  transform: rotate(-90deg); transition: transform 150ms ease-out;
}
.peek:hover { background: var(--text); }
.peek[aria-expanded="true"] { transform: rotate(0deg); background: var(--text); }
.data tbody tr.open { background: var(--panel-2); }
.data tbody tr.more, .data tbody tr.more:hover { background: var(--bg); border-top: 0; }
.data tr.more > td { padding: var(--s3) var(--s4) var(--s4); white-space: normal; color: var(--muted); }
.peekbox .scroll { background: var(--panel); }
.peekbox .data tbody tr:hover { background: var(--panel-2); }
.peekbox .out { margin-top: var(--s3); flex-wrap: wrap; }
.peekbox .out a { color: var(--text); }

/* ---- history ---------------------------------------------------------------------------- */

.filters { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s3) var(--s4); margin-bottom: var(--s4); }
.filters label { display: grid; gap: 4px; color: var(--faint); }
.filters select {
  height: 36px; padding: 0 30px 0 var(--s3); min-width: 150px;
  background: var(--panel) url("/assets/chevron.svg") right 10px center / 10px no-repeat;
  color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius);
  font: inherit; appearance: none;
}
.filters select:hover { border-color: var(--ring); }
.filters input[type="search"], .filters input[type="date"] {
  height: 36px; padding: 0 var(--s3); min-width: 150px;
  background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius);
  font: inherit;
}
.filters input:hover { border-color: var(--ring); }
.filters input::placeholder { color: var(--faint); }
.filters .check { display: inline-flex; grid-auto-flow: column; align-items: center; gap: var(--s2); height: 36px; color: var(--text); font: inherit; letter-spacing: 0; text-transform: none; }
.btn {
  display: inline-flex; align-items: center; height: 36px; padding: 0 var(--s4);
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--ring); background: #262629; }
.btn:active { background: var(--panel); }
.btn[aria-disabled="true"] { color: var(--faint); pointer-events: none; background: transparent; }
.js .filters .apply { display: none; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); margin-top: var(--s4); color: var(--muted); }
.pager div { display: flex; gap: var(--s2); }

.cal { margin-bottom: var(--s5); }
.calscroll { position: relative; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.cal .months { display: grid; grid-auto-flow: column; grid-auto-columns: 12px; gap: 3px; width: max-content; height: 18px; color: var(--faint); font-size: 0.75rem; }
.cal .months span { grid-row: 1; white-space: nowrap; }
.cal .grid { display: grid; grid-template-rows: repeat(7, 12px); grid-auto-flow: column; grid-auto-columns: 12px; gap: 3px; width: max-content; }
.cal .grid > *, .cal .legend i:not(.pip) { border-radius: 2px; background: var(--panel-2); }
/* Lighter for more raids; a day with a lowman clear is tinted in that team's colour. */
.cal .l1 { --share: 28%; }
.cal .l2 { --share: 48%; }
.cal .l3 { --share: 72%; }
.cal .l4 { --share: 100%; }
.cal .grid a, .cal .legend i:not(.pip) { background: color-mix(in srgb, var(--day, #d7d5cf) var(--share), var(--panel-2)); }
.cal .grid a.t1 { --day: var(--solo); }
.cal .grid a.t2 { --day: var(--duo); }
.cal .grid a.t3 { --day: var(--trio); }
.cal .grid a:hover, .cal .grid a:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.cal .cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s5); color: var(--faint); font-size: 0.8125rem; margin-top: var(--s3); width: min(100%, 792px); }
.cal .legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s2); }
.cal .legend i { width: 12px; height: 12px; }
.cal .legend .pip { border-radius: 2px; margin-right: 5px; }
.cal .legend span { display: inline-flex; align-items: center; margin-left: var(--s2); color: var(--muted); }
.dayline { margin: 0 0 var(--s4); }
.dayline a { color: var(--text); }

.empty { padding: var(--s6) var(--s5); text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty a { color: var(--text); }

/* ---- report ----------------------------------------------------------------------------- */

/* A height, not an aspect-ratio with a min-height: that pair turns into a min-width (180px tall
   forced 720px wide) and pushed the page wider than a phone. */
.report-art { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--panel-2); height: clamp(180px, 25vw, 300px); }
.report-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.report-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 15, 16, 0.15), rgba(15, 15, 16, 0.9)); }
.report-art .over { position: absolute; z-index: 1; left: var(--s5); right: var(--s5); bottom: var(--s4); display: grid; gap: var(--s2); }
.report-art h1 { font-stretch: 75%; font-weight: 750; letter-spacing: 0.03em; text-transform: uppercase; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); }
.report-art .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.facts { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s6); margin: var(--s5) 0; }
.facts div { display: grid; gap: 2px; }
.facts dt { color: var(--faint); }
.facts dd { font-weight: 600; font-size: 1.0625rem; }
.out { display: flex; gap: var(--s4); color: var(--muted); font-size: 0.8125rem; margin-top: var(--s4); }

/* ---- feats ------------------------------------------------------------------------------ */

/* The feats a run was launched with (The Desert Perpetual, its Epic version, Pantheon: Monument
   of Triumph): a label with each feat under it as a quiet chip carrying Bungie's own icon.
   Neutral on purpose. A feat is about difficulty, and colour here is kept for team size. */
.feats { display: flex; flex-wrap: wrap; gap: 6px var(--s2); margin: calc(-1 * var(--s2)) 0 var(--s5); }
.feats dt { flex-basis: 100%; color: var(--faint); }
.feats dd {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 6px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 4px;
  color: var(--text); font-weight: 600; white-space: nowrap;
}
.feats dd img { width: 20px; height: 20px; }
/* Slots that were all left empty: said in words, not drawn as a chip. */
.feats dd.none { height: auto; padding: 0; background: none; border: 0; color: var(--muted); font-weight: 400; }
/* In the drop-down under a history row it sits above the team. */
.peekbox .feats { margin: 0 0 var(--s3); }
/* On a raid card: the most feats cleared with. The number reads as the figure it is. */
.raid .also .featmost b { color: var(--text); font-weight: 650; }

/* ==== rankings ===============================================================================
   Everything the rankings page needs is in this one section (its smaller-screen rules are at the
   end of it): the picker, one raid's banner, the band of leaders, the table, which is a card per
   member on a phone, and the fastest-run boards. Marks are the site's own: a team's dot, the
   flawless star and foil, a ticket for the book, the Sold stamp, the yellow car. */

.rk-pick { margin-bottom: var(--s4); }
/* The table's headings sort it. The "Sort by" box is for a phone, where they are not shown. */
.rk-pick .rk-sort { display: none; }

/* -- one raid: its picture across the top, as on its reports -- */
.rk-banner {
  position: relative; height: clamp(112px, 12vw, 152px); margin-bottom: var(--s4);
  border-radius: var(--radius); overflow: hidden; background: var(--panel-2);
}
.rk-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.rk-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 15, 16, 0.15), rgba(15, 15, 16, 0.9)); }
.rk-banner .over { position: absolute; z-index: 1; left: var(--s5); right: var(--s5); bottom: var(--s3); display: grid; gap: 2px; }
.rk-banner h2 { font-stretch: 75%; font-weight: 750; letter-spacing: 0.03em; text-transform: uppercase; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); }
.rk-banner p { color: rgba(255, 255, 255, 0.82); font-size: 0.8125rem; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); }
.rk-banner a { color: #fff; }

/* -- who leads: a cell for each headline ranking, in one panel split by lines like the figures on
      a profile. The name of a ranking sorts the table by it. -- */
.rk-leads {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: var(--s4);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.rk-lead {
  display: grid; align-content: start; gap: var(--s2); min-width: 0; padding: var(--s3) var(--s4);
  border-left: 1px solid var(--line); border-top: 1px solid var(--line);
}
.rk-lead:nth-child(4n + 1) { border-left: 0; }
.rk-lead:nth-child(-n + 4) { border-top: 0; }
.rk-cat {
  display: inline-flex; align-items: center; gap: 7px; justify-self: start; min-height: 22px;
  color: var(--muted); text-decoration: none;
}
/* A small chevron says the name is a control; it is lit on the one the table is sorted by. */
.rk-cat::after, .rank thead th a::after {
  content: ""; flex: none; width: 9px; height: 9px; background: currentColor; opacity: 0.4;
  -webkit-mask: url("/assets/chevron.svg") center / contain no-repeat; mask: url("/assets/chevron.svg") center / contain no-repeat;
}
.rk-cat:hover { color: #fff; }
.rk-cat:hover::after, .rk-cat[aria-current]::after { opacity: 1; }
.rk-cat[aria-current] { color: var(--text); box-shadow: inset 0 -2px 0 var(--brand); }
.rk-pips { display: inline-flex; gap: 2px; }
.rk-pips .pip { width: 7px; height: 7px; margin: 0; }
.rk-first { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
/* Every leader's plate is the same size; it only gives way to a long figure. */
.rk-first .plate { flex: 0 1 196px; min-width: 0; }
.rk-lead .plate .name { font-size: 0.9375rem; }
.rk-n {
  display: inline-flex; align-items: center; gap: 7px; margin-left: auto;
  font-size: 1.375rem; line-height: 1.2; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; text-decoration: none;
}
.rk-n:hover { text-decoration: underline; }
.rk-n .res { height: 30px; padding: 0 10px; font-size: 1.25rem; font-stretch: normal; letter-spacing: -0.01em; font-weight: 650; }
.rk-n .res svg { width: 14px; height: 14px; }
.rk-n .rk-sold { font-size: 0.6875rem; }
.rk-next { display: grid; color: var(--muted); font-size: 0.8125rem; }
.rk-next li { display: grid; grid-template-columns: 0.875rem minmax(0, 1fr) auto; gap: var(--s2); align-items: baseline; padding: 1px 0; }
.rk-next .pos { color: var(--faint); }
.rk-next a { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.rk-next a:hover { text-decoration: underline; }
/* Nobody holds it yet: the dotted outline of an empty place in the sticker book. */
.rk-none { padding: var(--s3); border: 1px dashed var(--line-2); border-radius: 4px; color: var(--faint); font-size: 0.8125rem; text-align: center; }

/* -- the member picked out with "Highlight" -- */
.rk-you { margin-bottom: var(--s3); padding-left: var(--s3); box-shadow: inset 2px 0 0 var(--brand); color: var(--muted); font-size: 0.8125rem; }
.rk-you b { color: var(--text); font-weight: 600; }
.rk-you a { color: var(--text); margin-left: var(--s1); }

/* -- the table. It uses the whole screen when it is there, so every column shows without
      scrolling sideways. -- */
.scroll.wide { width: min(1720px, calc(100vw - 2 * var(--s5) - 16px)); margin-left: 50%; transform: translateX(-50%); }
/* Sorting lands on the table and "Go to that row" on the row, both clear of the sticky top bar. */
#ranks { scroll-margin-top: 64px; }
.rank tr.you { scroll-margin-top: 72px; }
.rank th, .rank td { padding-inline: var(--s3); }
.rank td { padding-block: 6px; }
.rank .g { border-left: 1px solid var(--line); }
/* Headings that read as controls: the whole cell is the link, it lights under the pointer, and
   the one in use carries the chevron and the vermilion line. Long names take two lines. */
.rank thead th { vertical-align: bottom; }
.rank thead th.num { padding: 0; }
.rank thead th a {
  position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-height: 46px; padding: 8px var(--s3);
  text-align: right; line-height: 1.25; cursor: pointer;
  transition: background-color 0.12s ease-out, color 0.12s ease-out;
}
/* The chevron sits in the cell's own margin, so it costs the column no width. */
.rank thead th a::after { position: absolute; right: 1px; top: calc(50% - 4px); width: 8px; height: 8px; opacity: 0.32; }
.rank thead th a:hover, .rank thead th a:focus-visible { background: var(--panel-2); color: #fff; }
.rank thead th a:focus-visible { outline-offset: -2px; }
.rank thead th a:hover::after, .rank thead th[aria-sort] a::after { opacity: 1; }
.rank thead th[aria-sort="ascending"] a::after { transform: rotate(180deg); }
.rank thead th[aria-sort] a, .rank td.cur { background: rgba(255, 255, 255, 0.035); }
/* A number with its mark: the mark at the left of the column, the number at the right. */
.rk-v { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); text-decoration: none; }
.rk-v .n { margin-left: auto; }
a.rk-v:hover .n { text-decoration: underline; }
.rk-v.zero { color: #626166; }
.rk-v .of { color: var(--faint); font-weight: 400; }
.rk-v .res { margin-left: auto; height: 22px; padding: 0 7px; font-size: 0.9375rem; font-stretch: normal; letter-spacing: 0; font-weight: 650; }
/* Nobody has more in that column. */
.rank td.top .n { color: #fff; font-weight: 650; }
/* The member, on their own emblem as on their profile. */
.rank td.lead { width: 1%; }
.rank .plate { width: 200px; }
.rank .plate .name { font-size: 0.9375rem; }
.rank td.lead a.plate:hover { text-decoration: none; }
/* Places. The first three are set apart in plain paper tones: gold is for solo only. */
.rank .pos { width: 1%; padding-right: 0; text-align: center; }
.rk-top {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px;
  border: 1px solid var(--line-2); border-radius: 4px; color: var(--text); font-weight: 650;
}
.rk-top.p1 { background: var(--text); border-color: var(--text); color: #121213; }
.rk-top.p2 { border-color: var(--muted); }
.rank tr.you td.pos { box-shadow: inset 3px 0 0 var(--brand); }

/* -- the marks beside the numbers -- */
.mini.rk-tkt { --tier: #cfcdc7; flex: none; width: 26px; height: 12px; margin-right: 0; vertical-align: -1px; }
.rk-sold {
  flex: none; display: inline-block; padding: 1px 4px 0; border: 1.5px solid var(--brand); border-radius: 3px;
  color: var(--brand); font-stretch: 72%; font-weight: 800; font-size: 0.625rem; line-height: 1.3; letter-spacing: 0.12em;
  text-transform: uppercase; transform: rotate(-6deg);
}
/* The yellow car, parked on whoever has the most checkpoint clears. */
.rk-car { flex: none; width: 30px; height: 17px; margin: -3px 0 -2px; overflow: visible; }
.rk-car .y { fill: #f4d63c; }
.rk-car .d { fill: var(--brand); }
.rk-car .w { fill: #232326; }
.rk-car .a { fill: var(--text); }
.rk-car .k { fill: #1c1c1f; stroke: #f1efe9; stroke-width: 0.7; }
.rk-car .h { fill: var(--muted); }

/* -- fastest full runs: a board for each raid under its picture, which opens that raid's ranking -- */
.boards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.board { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.board .rk-art { position: relative; display: block; aspect-ratio: 16 / 4.4; background: var(--panel-2); color: #fff; text-decoration: none; }
.board .rk-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; transition: filter 150ms ease-out; }
.board .rk-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 15, 16, 0.1) 20%, rgba(15, 15, 16, 0.86)); }
.board h3 {
  position: absolute; z-index: 1; left: var(--s4); right: var(--s4); bottom: var(--s2);
  font-stretch: 75%; font-weight: 750; font-size: 1.0625rem; letter-spacing: 0.035em; text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
/* The tag fills and lifts when the picture is pointed at, like every tag that opens something. */
.board .rk-art .tag {
  position: absolute; z-index: 1; top: var(--s2); right: var(--s2);
  transition: background-color 0.12s ease-out, color 0.12s ease-out, border-color 0.12s ease-out, transform 0.12s ease-out, box-shadow 0.12s ease-out;
}
.board .rk-art:hover img { filter: brightness(1.14); }
.board .rk-art:hover .tag, .board .rk-art:focus-visible .tag {
  background: #fff; border-color: #fff; color: #0f0f10; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
/* The raid whose ranking is on the page. */
.board .rk-art[aria-current] { border-bottom: 2px solid var(--brand); }
.board ol { padding: var(--s1) var(--s4) var(--s2); }
.board li { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr) auto; gap: var(--s2); align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.board li:first-child { border-top: 0; }
.board li .pos { color: var(--faint); }
.board li .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board li .nm a { text-decoration: none; }
.board li .nm a:hover { text-decoration: underline; }
.board li .tm { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 600; text-decoration: none; }
.board li .tm:hover { text-decoration: underline; }

/* -- rankings on smaller screens -- */

/* Not wide enough for every column (the widest table, one raid's, needs a 1365px window): the
   table scrolls sideways with the member pinned. */
@media (max-width: 1364px) and (min-width: 681px) {
  .rank th:nth-child(2), .rank td:nth-child(2) { position: sticky; left: 0; z-index: 1; background: var(--panel); box-shadow: 1px 0 0 var(--line); }
  .rank tbody tr:hover td:nth-child(2) { background: var(--panel-2); }
  .rank tr.you td:nth-child(2) { background: #25191a; }
}

/* The leaders become one row to swipe along. */
@media (max-width: 1020px) {
  .rk-leads { display: flex; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
  .rk-lead, .rk-lead:nth-child(n) { flex: 0 0 min(80%, 272px); scroll-snap-align: start; border-top: 0; border-left: 1px solid var(--line); }
  .rk-lead:first-child { border-left: 0; }
}

/* A phone: a card for each member, every figure under its own label, and a box to sort with. */
@media (max-width: 680px) {
  .rk .head { display: grid; gap: var(--s1); }
  /* The top bar does not follow the page on a phone. */
  #ranks, .rank tr.you { scroll-margin-top: var(--s2); }
  .rk-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
  .rk-pick label:first-child, .rk-pick .apply { grid-column: 1 / -1; }
  .rk-pick .rk-sort { display: grid; }
  .rk-pick select { min-width: 0; }
  .rk-banner .over { left: var(--s4); right: var(--s4); }
  .scroll.wide { width: 100%; margin-left: 0; transform: none; overflow: visible; border: 0; border-radius: 0; background: none; }
  .rank, .rank tbody { display: block; white-space: normal; }
  .rank thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  /* Four figures to a line. The first column is the widest, for "Low. flawless". */
  .rank tbody tr, .rank tbody tr:first-child {
    display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.8fr); gap: var(--s3) var(--s2);
    margin-bottom: var(--s3); padding: var(--s3);
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  }
  .data.rank td { padding: 0; }
  .rank td.g { border-left: 0; }
  .rank td.cur { background: none; }
  /* The place and the nameplate share the first line. */
  .rank td.pos { grid-area: 1 / 1; align-self: center; width: auto; text-align: left; }
  .rank td.lead { grid-area: 1 / 1 / 2 / -1; width: auto; padding-left: 38px; }
  .rank .plate { width: 100%; max-width: 264px; }
  .rank td[data-label] { display: grid; align-content: start; gap: 1px; text-align: left; }
  .rank td[data-label]::before {
    content: attr(data-label); justify-self: start; color: var(--faint);
    font-stretch: 78%; font-weight: 650; font-size: 0.6875rem; letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap;
  }
  .rank td.cur::before { color: var(--text); box-shadow: inset 0 -2px 0 var(--brand); }
  .rk-v { justify-content: flex-start; gap: 6px; min-height: 24px; }
  .rk-v .n, .rk-v .res { margin-left: 0; }
  .rank tbody tr.you { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); background: color-mix(in srgb, var(--brand) 7%, var(--panel)); box-shadow: inset 3px 0 0 var(--brand); }
  .rank tr.you td.pos { box-shadow: none; }
  /* A dungeon has eleven figures, not twelve (no trio), so they go three to a line: lowman,
     solo and duo first, as the raids' first line is the lowman sizes. */
  body[data-base="/dungeons"] .rank tbody tr, body[data-base="/dungeons"] .rank tbody tr:first-child { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* The narrowest phones: closer columns and slightly smaller figures, so a time stays in its own cell. */
@media (max-width: 380px) {
  .rank tbody tr, .rank tbody tr:first-child {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 0.9fr); column-gap: 6px; padding-inline: 10px;
  }
  .rank td[data-label]::before { letter-spacing: 0.04em; }
  .rk-v { gap: 5px; font-size: 0.875rem; }
  .rk-v .res { font-size: 0.875rem; padding: 0 5px; }
}

/* ---- smaller screens -------------------------------------------------------------------- */

@media (max-width: 1020px) {
  .raids, .boards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures > div:nth-child(3) { border-left: 0; }
  .figures > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .feed li { grid-template-columns: 6.5rem 5rem minmax(0, 1fr) 4.5rem; grid-template-areas: "when tier what dur" "who who who who"; row-gap: var(--s1); }
}

@media (max-width: 680px) {
  .wrap { width: calc(100% - 2 * var(--s4)); }
  .bar { position: static; }
  .bar .wrap { flex-wrap: wrap; height: auto; padding-block: var(--s2) var(--s3); gap: var(--s2); }
  .mark { font-size: 1rem; }
  .bar nav { margin-left: auto; gap: 0; }
  .bar nav a { padding: var(--s2); }
  .find { order: 3; width: 100%; margin: 0; }
  .find input { width: 100%; }
  /* With the switch, the second row is the switch and then the search in what is left. */
  .bar .halves { order: 2; margin-left: 0; }
  .halves ~ .find { flex: 1 1 0; width: auto; min-width: 0; max-width: none; }
  .bar .wrap:has(.halves) { min-height: 0; padding-block: var(--s2) var(--s3); }
  main { padding-top: var(--s5); }
  .raids, .boards { grid-template-columns: minmax(0, 1fr); }
  .figures > div { padding: var(--s3) var(--s4); }
  .figures .n { font-size: 1.375rem; }
  .tabs { gap: var(--s4); }
  .strip { gap: 8px; }
  .strip .dot { width: 14px; height: 14px; }
  .strip .dot.star { width: 18px; height: 18px; }
  .who-head .links { margin-left: 0; }
  .who-head .lately { flex-basis: 100%; }
  .feed li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "what tier" "who who" "when dur"; gap: var(--s1) var(--s3); }
  .feed .when, .feed .dur { font-size: 0.8125rem; }
  .data th, .data td { padding: 9px var(--s3); }
  .filters label, .filters select, .filters input[type="search"], .filters input[type="date"] { width: 100%; }
}

@media (max-width: 680px) {
  .hist, .hist > tbody { display: block; white-space: normal; }
  .hist > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  /* (Only the history's own rows and cells: the team that opens under a row is a table too.) */
  .hist > tbody > tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "raid team" "result time" "when run";
    gap: 2px var(--s3); padding: var(--s3);
  }
  .data.hist > tbody > tr > td { padding: 0; }
  .hist > tbody > tr > td:nth-child(1) { grid-area: when; font-size: 0.8125rem; }
  .hist > tbody > tr > td:nth-child(2) { grid-area: raid; }
  .hist > tbody > tr > td:nth-child(3) { grid-area: team; text-align: right; }
  .hist > tbody > tr > td:nth-child(4) { grid-area: result; }
  .hist > tbody > tr > td:nth-child(5) { grid-area: run; text-align: right; font-size: 0.8125rem; }
  .hist > tbody > tr > td:nth-child(6) { grid-area: time; }
  .hist > tbody > tr > td:nth-child(n + 7) { display: none; }
  .report-art img.cpbadge { inset: var(--s3) var(--s3) auto auto; width: 112px; border-width: 2px; }
  .report-art[data-checkpoint] .over { right: var(--s5); }
  .pdetail { grid-template-columns: minmax(0, 1fr); }
  .hist > tbody > tr.more { display: block; padding: 0 var(--s3) var(--s3); }
  .hist > tbody > tr.more > td { display: block; padding: 0; font-size: inherit; text-align: left; }
  .hist > tbody > tr.more[hidden] { display: none; }
}

/* ---- phones and touch -----------------------------------------------------------------------
   Two kinds of rule. Under 680px things are laid out again for a narrow screen: tables become
   lists, the filters sit two to a row, controls grow to 40px. And wherever the pointer is a
   finger (pointer: coarse), things to press get more room to be pressed in, mostly without
   moving anything: padding taken back by a negative margin makes a link taller to the finger
   and leaves the line it sits in alone. */

/* What a feat does, inside its chip: shown when the chip is pointed at, pressed or focused. It
   opens under the whole row of chips, so it cannot run off the side of a narrow screen. */
.feats { position: relative; }
.feats dd[tabindex] { cursor: help; }
/* (An iPhone only tells a plain element it was pressed when its cursor is the pointing hand.) */
@media (pointer: coarse) {
  .feats dd[tabindex] { cursor: pointer; height: 36px; }
  .feats { gap: 8px; }
}
.feats .tip {
  display: none; position: absolute; z-index: 5; left: 0; top: calc(100% + 6px); width: min(100%, 420px);
  padding: var(--s2) var(--s3); border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--panel-2); color: var(--muted); font-weight: 400; font-size: 0.8125rem; white-space: normal;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
}
.feats dd:hover .tip, .feats dd:focus .tip { display: block; }
.feats dd:focus { outline: 2px solid var(--brand); outline-offset: 2px; }

/* The diamond in the key under the tabs wears no colour: the tags it marks wear their team's. */
.key .dia svg { width: 11px; height: 11px; color: var(--text); }
.key .cred .tag { height: 20px; }

/* A day picked in the calendar by touch (app.js): what was raided that day, and the way to it. */
.cal .grid a[aria-current] { outline: 2px solid var(--text); outline-offset: 1px; }
.cal .picked { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-top: var(--s3); color: var(--text); }
.cal .picked[hidden] { display: none; }

/* The marks beside the numbers in the rankings, said in words (view.rs, rank_key). A mouse has
   each number's hover title for this; a finger has not. */
.rk-key { display: none; }
@media (max-width: 680px), (hover: none) { .rk-key { display: flex; } }

/* On a narrow screen, and under a finger on any screen (a phone on its side is as wide as a
   small laptop). Controls are 40px tall, and their text is 16px: under that an iPhone zooms
   the whole page in when one is pressed. And nothing is written under 12px, the small stamps
   included. */
@media (max-width: 680px), (pointer: coarse) {
  .find input, .filters select, .filters input[type="search"], .filters input[type="date"], .filters .check, .rk-pick select, .btn { height: 40px; }
  .find input, .filters select, .filters input[type="search"], .filters input[type="date"], .rk-pick select { font-size: 1rem; }
  .find svg { top: 12px; }
  .bar nav a { padding-block: 10px; }
  .halves, .bar .halves { padding: 0; }
  .halves a, .bar .halves a { height: 38px; padding-block: 0; }
  .mark { padding-block: 8px; }
  .data .mem, .toc .st, .mark .stamp, .rk-sold, .rk-n .rk-sold { font-size: 0.75rem; }
  /* A raid's picture grows to hold its tags: on a narrow card, or with the taller tags a
     finger gets, a third row of them lay over the raid's name. So the tags and the name take
     their places in the picture one under the other, with room between for what sits on the
     name, and the picture's shape is the least it can be. */
  .raid .art { display: flex; flex-direction: column; justify-content: space-between; gap: 30px; }
  .raid .art .tags, .raid[data-sold] .art .tags { position: relative; top: auto; left: auto; right: auto; margin: var(--s3) var(--s3) 0; }
  .raid[data-sold] .art .tags { margin-right: 88px; }
  .raid .art h2 { position: relative; left: auto; right: auto; bottom: auto; margin: auto var(--s4) var(--s3); }
}

@media (max-width: 680px) {
  /* The history filters: two to a row, the name box across both. */
  .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
  .filters select, .filters input[type="search"], .filters input[type="date"] { min-width: 0; }
  .filters label:has(input[type="search"]) { grid-column: 1 / -1; }

  /* A raid card's tickets get the whole width of the card: the name of the row goes above it. */
  .raid .srow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .raid .srow .rowname { grid-column: 1 / -1; padding-top: 0; }
  /* The picture's shape as a plain least height (the card is as wide as the column here), so
     it grows for its tags in every browser. */
  .raid .art { aspect-ratio: auto; min-height: calc((100vw - 2 * var(--s4) - 2px) * 7 / 16); }

  /* Tables that are lists on a phone. Each row is laid out again as a few lines, the way the
     history rows are, and nothing scrolls sideways. A number says what it is after itself; the
     words are the column heads, which are kept for screen readers but not shown. */
  .team, .team > tbody, .mates, .mates > tbody, .arsenal, .arsenal > tbody, .found, .found > tbody, .chars, .chars > tbody { display: block; white-space: normal; }
  .team > thead, .mates > thead, .arsenal > thead, .found > thead, .chars > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .data.team > tbody > tr > td, .data.mates td, .data.arsenal td, .data.found td { padding: 0; }
  .team td.num, .mates td.num, .arsenal td.num { text-align: left; }
  .team td.num::after, .mates td.num::after, .mates td.num a::after, .arsenal td.num::after, .chars td.num::after { color: var(--faint); font-size: 0.8125rem; font-weight: 400; }

  /* Everyone in a raid (a report, and under a history row): the name; class, time in the raid
     and how it ended; kills, deaths and assists; then the weapons. Precision and super kills are
     in the drop-down under the name. */
  .team > tbody > tr:not(.more) {
    display: grid; grid-template-columns: auto auto auto minmax(0, 1fr); align-items: baseline; gap: 3px var(--s4); padding: var(--s3);
  }
  .team > tbody > tr > td.lead { grid-column: 1 / -1; display: flex; align-items: center; min-width: 0; }
  .team .who { min-width: 0; }
  .team .who a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .team > tbody > tr > td:nth-child(2) { grid-area: 2 / 1; }
  .team > tbody > tr > td:nth-child(9) { grid-area: 2 / 2; }
  .team > tbody > tr > td:nth-child(3) { grid-area: 2 / 3 / auto / -1; justify-self: end; }
  .team > tbody > tr > td:nth-child(4) { grid-area: 3 / 1; }
  .team > tbody > tr > td:nth-child(5) { grid-area: 3 / 2; }
  .team > tbody > tr > td:nth-child(6) { grid-area: 3 / 3; }
  .team > tbody > tr > td:nth-child(7), .team > tbody > tr > td:nth-child(8) { display: none; }
  .team > tbody > tr > td:nth-child(10) { grid-column: 1 / -1; margin-top: 4px; }
  .team > tbody > tr > td:nth-child(4)::after { content: " kills"; }
  .team > tbody > tr > td:nth-child(5)::after { content: " deaths"; }
  .team > tbody > tr > td:nth-child(6)::after { content: " assists"; }
  .team .guns { flex-wrap: wrap; row-gap: 4px; }
  .team > tbody > tr.more { display: block; }
  .team > tbody > tr.more[hidden] { display: none; }
  .team > tbody > tr.more > td { display: block; padding: 0 var(--s3) var(--s3); }
  /* a player's characters, one to a line, and their weapons with the name in full */
  .chars > tbody > tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s4); padding: 6px 0; }
  .chars td { padding: 0; }
  .chars td:first-child { flex-basis: 100%; font-weight: 600; }
  .chars td:empty { display: none; }
  .chars td:nth-child(2)::after { content: " power"; }
  .chars td:nth-child(3)::after { content: " kills"; }
  .chars td:nth-child(4)::after { content: " deaths"; }
  .chars td:nth-child(5)::after { content: " assists"; }
  .wlist li { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .wlist .wname { white-space: normal; }
  .wlist span.num { grid-column: 2 / -1; margin-top: -6px; text-align: left; }
  .wlist span.num:empty { display: none; }

  /* Teammates: the name, then raids together (the way into them), clears, lowman clears, and
     when they last raided together. */
  .mates > tbody > tr { display: grid; grid-template-columns: auto auto auto minmax(0, 1fr); align-items: baseline; gap: 2px var(--s4); padding: var(--s3); }
  .mates td.lead { grid-column: 1 / -1; }
  .mates td:nth-child(5) { justify-self: end; font-size: 0.8125rem; }
  .mates td:nth-child(2) a::after { content: " raids"; }
  body[data-base="/dungeons"] .mates td:nth-child(2) a::after { content: " dungeons"; }
  .mates td:nth-child(3)::after { content: " clears"; }
  .mates td:nth-child(4)::after { content: " lowman"; }

  /* Weapons: the name, then kills with their bar, precision and raids used in. */
  .arsenal > tbody > tr { display: grid; grid-template-columns: auto minmax(24px, 1fr) auto auto; align-items: center; gap: 4px var(--s3); padding: var(--s3); }
  .arsenal td.lead { grid-column: 1 / -1; }
  .arsenal .gun { flex-wrap: wrap; row-gap: 0; }
  .arsenal td:nth-child(2) { color: var(--text); font-weight: 650; }
  .arsenal .barcell { min-width: 0; }
  .arsenal td:nth-child(4)::after { content: " precision"; }
  .arsenal td:nth-child(5)::after { content: " raids"; }
  body[data-base="/dungeons"] .arsenal td:nth-child(5)::after { content: " dungeons"; }

  /* Search: the name, and under it what is on file. The whole name line is the link. */
  .found > tbody > tr { display: block; padding: 0 var(--s3); }
  .found td { display: block; }
  .found td.lead a { display: block; padding: 10px 0 0; overflow-wrap: anywhere; }
  .found td:nth-child(2) { padding-bottom: 10px; font-size: 0.8125rem; }
}

/* A phone on its side is too short to give 56px to a bar that follows the page. */
@media (max-height: 520px) {
  .bar { position: static; }
}

@media (pointer: coarse) {
  /* More room for a finger, nothing moved: the padding is taken straight back by the margin. */
  .feed .what a, .feed .who a, .lately a, .who-head .links a, .figures a, .book a, .raid .stats a, .raid .also a, .never a,
  .hist td.lead a:not(.peek), .mates td a, .board li a, .rk-lead li a, .rk-v, .rk-n, .rk-cat, .rk-you a,
  .memo a, .page .tally a, .dayline a, .note a, .intro a, .head p a, .out a, .rk-banner a, .data .who a, footer a {
    padding-block: 10px; margin-block: -10px;
  }
  /* A number that is a link can be one digit wide: room at its sides as well. */
  .figures .n a, .raid .stats a, .mates td.num a { padding-inline: 10px; margin-inline: -10px; }
  /* The arrow that opens a row is a 40px square to the finger; the drawing stays the size it was. */
  .peek { width: 40px; height: 40px; margin: -9px 0 -9px -10px; }
  /* Tags on a raid's picture are links: taller, and far enough apart that each has 40px of
     the picture's height to itself. */
  .raid .art .tags, .report-art .tags { gap: 12px 8px; }
  .tags .tag { height: 28px; padding: 0 10px; }
  /* The strip of runs is a 40px band to the finger, and its bar sits clear of it (fx.css). */
  .strip { padding-block: 13px; margin-block: -13px; }
  .strip .all { padding-block: 14px; margin-block: -14px; }
  /* The book's small pictures and its contents. */
  .bookmarks a { width: 54px; height: 40px; }
  .bookmarks .toc { width: auto; height: 40px; line-height: 40px; }
  .toc a { padding-block: 9px; }
  .fx-turner .btn, .pager .btn { height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  a.tag:hover, a.tag:focus-visible { transform: none; }
  .board .rk-art:hover .tag, .board .rk-art:focus-visible .tag { transform: none; }
  /* the raid's own art stands in for the moving picture, and fills the frame as usual */
  .report-art img.shame { object-fit: cover; filter: none; -webkit-mask-image: none; mask-image: none; }
  /* the foil holds still, with the light resting across it */
  .res.flawless { animation: none; background-position: 50% 0, 0 0; }
}
