/* Valheim server stats. See ../DESIGN.md for the reasoning behind these choices. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../vendor/schibsted-grotesk/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f4f2ed;
  --bg-2: #ebe8e1;        /* hover wash, pressed controls */
  --ink: #1c1b19;
  --ink-2: #57534b;
  --ink-3: #736e62;
  --rule: #dcd7cc;
  --rule-2: #c9c3b6;
  --accent: #b04a1e;      /* data marks: ember */
  --accent-deep: #7d2f0d;
  --accent-soft: #e2b39c;
  --online: #2f7d32;
  --warn: #a8660b;
  --heat-0: #e9e5dd;
  --heat-top: #8a3410;
  --focus: #1c1b19;
  /* map (js/map.js): fog over unexplored land, and the presence ramp (6 steps, light -> dark ember) */
  --map-fog: #dcd8cf;
  --mh1: #d4733b; --mh2: #bb5a28; --mh3: #a0441a; --mh4: #843210; --mh5: #662208; --mh6: #461502; --map-wash: .38;
  --font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --w: 1200px;
  --gut: 32px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #171613; --bg-2: #22211d; --ink: #ece8df; --ink-2: #b3ada0; --ink-3: #8a8478;
    --rule: #2f2d29; --rule-2: #413e38; --accent: #e07a44; --accent-deep: #f0a47a; --accent-soft: #6b3a22;
    --online: #6fbf5f; --warn: #e0a84a; --heat-0: #22211d; --heat-top: #f08a52; --focus: #ece8df;
    --map-fog: #1d1c19;
    --mh1: #b0532a; --mh2: #c9652f; --mh3: #e07a44; --mh4: #ef9862; --mh5: #f9b98a; --mh6: #ffdcb8; --map-wash: .28;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171613; --bg-2: #22211d; --ink: #ece8df; --ink-2: #b3ada0; --ink-3: #8a8478;
  --rule: #2f2d29; --rule-2: #413e38; --accent: #e07a44; --accent-deep: #f0a47a; --accent-soft: #6b3a22;
  --online: #6fbf5f; --warn: #e0a84a; --heat-0: #22211d; --heat-top: #f08a52; --focus: #ece8df;
    --map-fog: #1d1c19;
    --mh1: #b0532a; --mh2: #c9652f; --mh3: #e07a44; --mh4: #ef9862; --mh5: #f9b98a; --mh6: #ffdcb8; --map-wash: .28;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--font);
  font-feature-settings: "kern", "calt";
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; outline: none; transition: opacity .15s; }
main[aria-busy="true"] { opacity: .55; }
a { color: inherit; text-decoration-color: var(--rule-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 1px; }
h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0; }
button { font: inherit; color: inherit; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -40px; background: var(--ink); color: var(--bg); padding: 6px 10px; z-index: 10; }
.skip:focus { top: 8px; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; cursor: pointer; color: inherit; }

/* ---- top bar ---------------------------------------------------------- */
.top { border-bottom: 1px solid var(--rule); }
.top-in, .foot-in, .page { max-width: var(--w); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }
.top-in { display: flex; align-items: center; gap: 32px; height: 56px; }
.mark { text-decoration: none; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; }
.mark strong { font-weight: 800; }
.mark span { color: var(--ink-3); }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 6px 10px; border-radius: 2px; }
.nav a:hover { color: var(--ink); background: var(--bg-2); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ink); border-radius: 0; }
.status { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.status.stale { color: var(--warn); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rule-2); flex: none; }
.dot.on { background: var(--online); }
.dot.warn { background: var(--warn); }
/* AFK (plugin 0.2.1): online but idle. Never green: a hollow ring in muted ink, always with the word AFK */
.dot.afk { background: transparent; border: 1.5px solid var(--ink-3); }
.afk-label { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; }
.afk-tag { color: var(--ink-3); font-weight: 600; }
.afk-name { white-space: nowrap; }
.now-line .afk-tag { font-size: 0.55em; font-weight: 600; letter-spacing: -0.01em; }
.status .afk-n { color: var(--ink-3); }
.players-t td.n .afk-sub { display: block; font-size: 12px; color: var(--ink-3); }
.on-label { display: inline-flex; align-items: center; gap: 6px; color: var(--online); font-weight: 600; }

/* ---- page scaffolding -------------------------------------------------- */
.page { padding-top: 40px; padding-bottom: 64px; }
.title { font-size: 44px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; }
.lede { font-size: 18px; margin-top: 12px; max-width: 60ch; }
.crumb { font-size: 14px; color: var(--ink-3); margin-bottom: 8px; }
.crumb a { text-decoration: none; color: var(--ink-2); }
.crumb a:hover { color: var(--ink); text-decoration: underline; }
.facts { margin-top: 12px; color: var(--ink-2); font-size: 15px; }
.facts .sep { color: var(--ink-3); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 28px 0 0; }
.context { color: var(--ink-3); font-size: 14px; }
.range { display: inline-flex; border: 1px solid var(--rule-2); border-radius: 2px; }
.range button { background: none; border: 0; padding: 6px 12px; font-size: 14px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.range button + button { border-left: 1px solid var(--rule-2); }
.range button:hover { background: var(--bg-2); color: var(--ink); }
.range button[aria-pressed="true"] { background: var(--ink); color: var(--bg); font-weight: 600; }
.pick { font-size: 14px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 8px; }
.pick select { font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--rule-2); border-radius: 2px; padding: 5px 8px; max-width: 220px; }
.btn { background: none; border: 1px solid var(--rule-2); border-radius: 2px; padding: 8px 14px; cursor: pointer; font-size: 14px; }
.btn:hover { background: var(--bg-2); }

.sec { margin-top: 48px; padding-top: 14px; border-top: 1px solid var(--ink); }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; margin-bottom: 20px; }
.sec-head h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.sec-aside { color: var(--ink-3); font-size: 14px; }
.split { display: grid; grid-template-columns: 7fr 5fr; gap: 0 48px; }
.split > .sec { min-width: 0; }

.empty { padding: 28px 0 8px; color: var(--ink-2); }
.empty p:first-child { font-size: 17px; }
.empty-sub { color: var(--ink-3); margin-top: 4px; }

/* ---- right now ------------------------------------------------------- */
.now { padding-bottom: 8px; }
.now-line { font-size: 44px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; max-width: 22ch; text-wrap: balance; }
.now-line a { text-decoration-thickness: 2px; text-underline-offset: 6px; }
.now-sub { font-size: 17px; margin-top: 10px; }
.online { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 15px; }
.online li { display: inline-flex; align-items: center; gap: 8px; }

/* ---- figures ------------------------------------------------------------ */
.figs { display: grid; grid-template-columns: 4fr 8fr; gap: 24px 48px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--rule); }
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 32px; align-content: start; }
.fig-v { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; white-space: nowrap; }
.fig-u { font-size: 16px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.fig-l { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.fig-r { color: var(--ink-3); }
.fig.hero .fig-v { font-size: 72px; font-weight: 800; letter-spacing: -0.035em; line-height: 1; }
.fig.hero .fig-u { font-size: 24px; font-weight: 600; }
.fig.hero .fig-l { font-size: 15px; margin-top: 10px; }

/* ---- charts -------------------------------------------------------------- */
.chart { margin: 0; }
.plot { width: 100%; min-height: 60px; }
.plot svg { display: block; overflow: visible; }
.tick { font-size: 12px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.grid line { stroke: var(--rule); stroke-width: 1; }
.base { stroke: var(--rule-2); stroke-width: 1; }
.bars path { fill: var(--accent); transition: fill .12s; }
.bars path.on { fill: var(--accent-deep); }
.focusable:focus { outline: none; }
.focusable:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }

.heat rect { fill: var(--heat-0); }
.heat .h1, .heat-legend .h1 { fill: color-mix(in oklab, var(--heat-top) 22%, var(--heat-0)); background: color-mix(in oklab, var(--heat-top) 22%, var(--heat-0)); }
.heat .h2, .heat-legend .h2 { fill: color-mix(in oklab, var(--heat-top) 40%, var(--heat-0)); background: color-mix(in oklab, var(--heat-top) 40%, var(--heat-0)); }
.heat .h3, .heat-legend .h3 { fill: color-mix(in oklab, var(--heat-top) 58%, var(--heat-0)); background: color-mix(in oklab, var(--heat-top) 58%, var(--heat-0)); }
.heat .h4, .heat-legend .h4 { fill: color-mix(in oklab, var(--heat-top) 78%, var(--heat-0)); background: color-mix(in oklab, var(--heat-top) 78%, var(--heat-0)); }
.heat .h5, .heat-legend .h5 { fill: var(--heat-top); background: var(--heat-top); }
.heat rect.on { stroke: var(--ink); stroke-width: 1.5; }
.heat-legend { display: flex; align-items: center; gap: 3px; margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.heat-legend i { width: 14px; height: 10px; border-radius: 1px; }
.heat-legend span:first-child { margin-right: 5px; }
.heat-legend span:last-child { margin-left: 5px; }

.tip {
  position: fixed; z-index: 20; pointer-events: none; background: var(--ink); color: var(--bg);
  padding: 6px 10px; border-radius: 2px; font-size: 13px; line-height: 1.35; display: flex; flex-direction: column;
  max-width: 260px;
}
.tip strong { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tip span { opacity: .75; }
.tip[hidden] { display: none; }
.tip.note p { margin: 0; font-size: 13px; font-weight: 400; }

.twin { margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.twin summary { cursor: pointer; width: max-content; }
.twin summary:hover { color: var(--ink); }
.twin-scroll { max-height: 320px; overflow: auto; margin-top: 8px; }

/* ---- tables ---------------------------------------------------------------- */
table.data { border-collapse: collapse; width: 100%; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 7px 12px 7px 0; border-bottom: 1px solid var(--rule); white-space: nowrap; }
table.data thead th { font-weight: 600; color: var(--ink-2); font-size: 13px; border-bottom-color: var(--ink); vertical-align: bottom; }
table.data .n { text-align: right; padding-left: 16px; }
table.data td.n:last-child, table.data th.n:last-child { padding-right: 0; }
table.data tbody th { font-weight: 600; }
table.data td.zero { color: var(--ink-3); }
table.data tbody tr:hover { background: var(--bg-2); }
.table-wrap { overflow-x: auto; margin-top: 28px; }
.table-wrap:focus-visible { outline-offset: 4px; }
.players-t tbody th { position: sticky; left: 0; background: var(--bg); z-index: 1; padding-right: 20px; }
.players-t tbody tr:hover th { background: var(--bg-2); }
.players-t .seen { color: var(--ink-2); }
.sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
.sort:hover, .sort.on { color: var(--ink); }
.arrow { display: inline-block; min-width: 1ch; }
.foot-note { margin-top: 14px; }

/* ---- ranked lists --------------------------------------------------------- */
.boards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 40px; }
@media (max-width: 1180px) { .boards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 56px; } .boards .rank { --barw: 120px; } }
.board h3 { font-size: 14px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.hint { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--rule-2); border-radius: 50%; font-size: 11px; font-weight: 600; color: var(--ink-3); cursor: help; }
.rank { --barw: 44px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.rank li { display: grid; grid-template-columns: 18px minmax(0, 1fr) var(--barw) minmax(3.2em, auto); column-gap: 10px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--rule); }
.rank li:last-child { border-bottom: 0; }
.rank.plain li { grid-template-columns: minmax(0, 1fr) var(--barw) minmax(3.2em, auto); }
.rank .rk { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 13px; }
.rank .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rank .nm a { text-decoration: none; }
.rank .nm a:hover { text-decoration: underline; }
.rank .vl { color: var(--ink); text-align: right; }
.rank .bar { height: 4px; background: var(--rule); border-radius: 1px; overflow: hidden; }
.rank .bar i { display: block; height: 100%; background: var(--accent); border-radius: 1px; }
.rank li:first-child .nm { font-weight: 600; }
.rank li.me .nm { font-weight: 700; }

/* ---- event log ------------------------------------------------------------ */
.log { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.ev { display: grid; grid-template-columns: minmax(7.5em, auto) 10px 1fr; column-gap: 12px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.ev:last-child { border-bottom: 0; }
.ev time { color: var(--ink-3); white-space: nowrap; font-size: 13px; }
.ev-mark { width: 7px; height: 7px; border-radius: 50%; align-self: center; background: transparent; border: 1px solid var(--rule-2); }
.ev-death .ev-mark { border: 0; border-radius: 0; position: relative; width: 9px; height: 9px; }
.ev-death .ev-mark::before, .ev-death .ev-mark::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; background: var(--accent); border-radius: 1px; }
.ev-death .ev-mark::before { transform: translate(-50%, -50%) rotate(45deg); }
.ev-death .ev-mark::after { transform: translate(-50%, -50%) rotate(-45deg); }
.ev-join .ev-mark, .ev-leave .ev-mark { border-color: var(--ink-3); }
.ev-bossKill .ev-mark { background: var(--accent); border-color: var(--accent); border-radius: 0; transform: rotate(45deg); width: 8px; height: 8px; }
.ev-bossKill .ev-t b { font-weight: 700; }
.ev-leave .ev-t, .ev-join .ev-t { color: var(--ink-2); }
.ev .plink { font-weight: 600; text-decoration: none; color: var(--ink); }
.ev .plink:hover { text-decoration: underline; }
.events .log-days, .events .more { max-width: 760px; }
.log-days .day { margin-top: 32px; }
.log.cols { columns: 3 260px; column-gap: 40px; }
.log.cols .ev { break-inside: avoid; border-bottom: 1px solid var(--rule); }
.day-h { font-size: 15px; font-weight: 700; padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
.log-days .ev { grid-template-columns: 3.5em 10px 1fr; }
.more { margin-top: 24px; }

/* sessions */
.sessions { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.sessions li { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; padding: 6px 0 7px; border-bottom: 1px solid var(--rule); }
.sessions time { color: var(--ink-2); }
.sessions .sdur { text-align: right; }

/* ---- footer ------------------------------------------------------------ */
.foot { border-top: 1px solid var(--rule); font-size: 13px; }
.foot-in { padding-top: 18px; padding-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.foot .link { color: var(--ink-2); margin-left: 8px; }

/* ---- responsive ---------------------------------------------------------- */
.player .strip { grid-template-columns: repeat(4, 1fr); gap: 20px 28px; }
@media (max-width: 1100px) {
  .figs { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --gut: 16px; }
  body { font-size: 15px; }
  .top-in { gap: 12px; height: auto; padding-top: 10px; padding-bottom: 0; flex-wrap: wrap; }
  .mark span { display: none; }
  .status { margin-left: auto; }
  .nav { order: 3; flex-basis: 100%; margin: 0 -7px; gap: 0; }
  .nav a { padding: 6px 7px; }
  .page { padding-top: 28px; }
  .title, .now-line { font-size: 32px; }
  .fig.hero .fig-v { font-size: 56px; }
  .strip, .player .strip { grid-template-columns: repeat(2, 1fr); gap: 18px 20px; }
  .fig-v { font-size: 26px; }
  .sec { margin-top: 40px; }
  .range button { padding: 6px 9px; }
  .ev, .log-days .ev { grid-template-columns: 8px minmax(0, 1fr) auto; column-gap: 10px; }
  .ev time { grid-column: 3; grid-row: 1; font-size: 12px; text-align: right; }
  .ev-mark { grid-column: 1; grid-row: 1; }
  .ev-t { grid-column: 2; grid-row: 1; }
  .boards { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .overview .rank li:nth-child(n+4) { display: none; }
  .rank li { grid-template-columns: 14px minmax(0, 1fr) auto; column-gap: 6px; font-size: 13px; }
  .rank.plain li { grid-template-columns: minmax(0, 1fr) var(--barw) auto; }
  .rank:not(.plain) .bar { display: none; }
  .boards .rank { --barw: 32px; }
}

@media (max-width: 560px) {
  .player .boards { grid-template-columns: 1fr; gap: 24px; }
  .player .boards .rank { --barw: 72px; }
  .player .rank.plain li { grid-template-columns: minmax(0, 1fr) var(--barw) 3.6em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .bars path, .rank .bar i, .sessions .bar i { fill: CanvasText; background: CanvasText; }
  .dot.on { background: CanvasText; }
  .dot.afk { background: transparent; border-color: CanvasText; }
  .ev-death .ev-mark::before, .ev-death .ev-mark::after { background: CanvasText; }
}

/* zero figures recede; an empty world gets one plain paragraph */
.fig.zero .fig-v { color: var(--ink-3); font-weight: 600; }
.later { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); max-width: 58ch; color: var(--ink-2); font-size: 17px; }
.fig-r { display: block; font-size: 13px; }
.deaths { margin-top: 16px; font-size: 15px; color: var(--ink-2); }
.minor { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.bars path.partial { fill: var(--accent-soft); }
.bars path.partial.on { fill: var(--accent); }
.xl .xt { stroke: var(--rule-2); stroke-width: 1; }
.fig-l .hint { vertical-align: 1px; }
table.data thead .hint { width: 14px; height: 14px; font-size: 10px; margin-left: 4px; vertical-align: 1px; }
.day-h .hint, .board h3 .hint { font-weight: 600; }
.day-h .hint { margin-left: 6px; vertical-align: 2px; }
.players-t tr.idle th a, .players-t tr.idle td { color: var(--ink-3); }
.notice { margin: 0; border-bottom: 1px solid var(--rule); background: var(--bg-2); font-size: 14px; color: var(--ink-2); }
.notice span { display: block; max-width: var(--w); margin: 0 auto; padding: 8px var(--gut); }
.notice[hidden] { display: none; }

/* ---- boss progression (0.2.0) -------------------------------------------------------
   One track, seven stops in game order. Defeated: an ember diamond with the mark knocked out and a solid rule to
   the next defeat (the time between them written on it). Next: an ember outline and a "Next" tag in ink.
   Later ones: a dashed outline, the mark in muted ink. Vertical below 760px. */
.btrack { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.bstop { position: relative; min-width: 0; padding-right: 14px; }
.bmark { position: relative; height: 72px; display: flex; align-items: center; }
.bdia { position: relative; width: 72px; height: 72px; display: grid; place-items: center; flex: none; color: var(--ink-3); }
.bdia::before { content: ""; position: absolute; inset: 12px; transform: rotate(45deg); border: 1.5px dashed var(--rule-2); border-radius: 2px; background: var(--bg); }
.bdia .glyph { position: relative; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.s-locked .bdia .glyph { opacity: .6; }
.s-done .bdia { color: var(--bg); }
.s-done .bdia::before { border: 0; background: var(--accent); }
.s-next .bdia { color: var(--ink); }
.s-next .bdia::before { border: 2px solid var(--accent); }
/* the line to the next stop: from this diamond's right corner to the next one's left corner */
.bstop:not(.last) .bmark::after { content: ""; position: absolute; left: 80px; right: 8px; top: 50%; border-top: 1.5px dashed var(--rule-2); }
.bstop.out-done .bmark::after { border-top: 2px solid var(--ink); margin-top: -0.25px; }
.bgap { position: absolute; left: calc(80px + (100% - 88px) / 2); top: 50%; transform: translate(-50%, -150%); font-size: 12px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.btext { margin-top: 12px; }
.bname { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.s-locked .bname { color: var(--ink-3); font-weight: 600; }
.bnext { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--ink); border-radius: 2px; padding: 0 5px; line-height: 17px; }
.bwhen { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.bday { color: var(--ink-3); }
.bwho { font-size: 13px; color: var(--ink-2); margin-top: 2px; line-height: 1.4; overflow-wrap: anywhere; }
.bwho a { text-decoration-color: var(--rule-2); }
.bmeta { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.btrack-fig { margin: 0; }
.btrack-fig .twin { margin-top: 18px; }
.btrack-fig.compact .bmark { height: 52px; }
.btrack-fig.compact .bdia { width: 52px; height: 52px; }
.btrack-fig.compact .bdia::before { inset: 9px; }
.btrack-fig.compact .bstop:not(.last) .bmark::after { left: 58px; }
.btrack-fig.compact .bgap { left: calc(58px + (100% - 64px) / 2); }
.btrack-fig.compact .bname { font-size: 15px; }
.btrack-wrap { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--rule); }
.boss-line { font-size: 16px; color: var(--ink-2); margin: -6px 0 22px; max-width: 70ch; }
.boss-line strong { color: var(--ink); font-weight: 700; }
.small-sub { font-size: 15px; margin-top: 4px; }
table.data td.wrap { white-space: normal; min-width: 14em; }
.log.kills .ev-t b { font-weight: 700; }

@media (max-width: 760px) {
  /* vertical: the mark column on the left, the line runs down from each diamond to the next one */
  .btrack { grid-template-columns: 1fr; }
  .bstop { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 16px; padding: 0 0 22px; }
  .bstop.out-done { padding-bottom: 34px; }
  .bmark, .btrack-fig.compact .bmark { position: static; height: auto; align-items: flex-start; }
  .bdia, .btrack-fig.compact .bdia { width: 52px; height: 52px; }
  .bdia::before, .btrack-fig.compact .bdia::before { inset: 9px; }
  .bstop:not(.last) .bmark::after, .btrack-fig.compact .bstop:not(.last) .bmark::after {
    left: 25px; right: auto; top: 56px; bottom: 2px; margin: 0; border-top: 0; border-left: 1.5px dashed var(--rule-2); }
  .bstop.out-done .bmark::after, .btrack-fig.compact .bstop.out-done .bmark::after { border-left: 2px solid var(--ink); }
  .bgap, .btrack-fig.compact .bgap { left: 68px; top: auto; bottom: 10px; transform: none; }
  .btext { margin-top: 3px; }
}

/* event marks for the 0.2.0 event types */
.ev-globalKey .ev-mark { border: 1.5px solid var(--accent); border-radius: 0; transform: rotate(45deg); width: 8px; height: 8px; }
.ev-serverStart .ev-mark, .ev-serverStop .ev-mark { border-radius: 0; border-color: var(--ink-3); }
.ev-serverStop .ev-mark { background: var(--ink-3); }
.ev-serverStart .ev-t, .ev-serverStop .ev-t, .ev-globalKey .ev-t { color: var(--ink-2); }
.ev-globalKey .ev-t b { color: var(--ink); }

/* log page: the list and, beside it, causes of death */
.log-wrap { display: grid; grid-template-columns: minmax(0, 760px) minmax(220px, 320px); gap: 0 64px; }
.events .log-days, .events .more { max-width: none; }
.log-side { margin-top: 32px; }
.side-sub { margin: 8px 0 10px; }
.board.causes { margin-top: 28px; max-width: 460px; }
.board.causes > p { margin-top: 8px; }
@media (max-width: 980px) { .log-wrap { grid-template-columns: 1fr; } .log-side { margin-top: 48px; max-width: 520px; } }

/* server health charts */
.tline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tdot { fill: var(--accent); }
.tband { fill: color-mix(in oklab, var(--accent) 24%, var(--bg)); }
.tband-tick { stroke: color-mix(in oklab, var(--accent) 40%, var(--bg)); stroke-width: 2; }
.cross { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 3; }
.legend-line { margin-top: 10px; font-size: 13px; color: var(--ink-3); display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.key-line { display: inline-block; width: 16px; height: 2px; background: var(--accent); border-radius: 1px; margin-right: 2px; }
.key-band { display: inline-block; width: 14px; height: 10px; background: color-mix(in oklab, var(--accent) 24%, var(--bg)); margin: 0 2px 0 10px; }
.server .figs .fig-l { max-width: 22ch; }
.ping { max-width: 560px; }
.ping .rank { --barw: 120px; }
@media (forced-colors: active) {
  .s-done .bdia::before { background: CanvasText; }
  .tline { stroke: CanvasText; }
}
.tspikes circle { fill: var(--bg); stroke: var(--accent); stroke-width: 1.5; }
.tspikes circle.over { fill: var(--accent); }
.key-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--accent); margin: 0 2px 0 10px; }
.bgap-later { display: none; }
@media (max-width: 760px) { .bgap-later { display: inline; } }
@media (max-width: 640px) {
  .events .toolbar .range { display: flex; width: 100%; }
  .events .toolbar .range button { flex: 1 1 auto; padding: 6px 4px; }
}
.log.kills .ev { grid-template-columns: 9.5em 10px 1fr; }
@media (max-width: 640px) { .log.kills .ev { grid-template-columns: 8px minmax(0, 1fr) auto; } }
.strip-rule { stroke: var(--rule); stroke-width: 1; }
.key-dot.full { background: var(--accent); width: 8px; height: 8px; margin-left: 4px; }

/* ---- map (js/map.js, views/map.js) -------------------------------------------- */
.map-sec { margin-top: 28px; }
.map-frame { position: relative; height: clamp(360px, 70vh, 760px); border: 1px solid var(--rule); background: var(--map-fog); overflow: hidden; }
.map-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.map-canvas.dragging { cursor: grabbing; }
.map-canvas:focus { outline: none; }
.map-canvas:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.map-ctl { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 4px; }
.map-btn { min-width: 32px; height: 32px; padding: 0 8px; background: var(--bg); color: var(--ink); border: 1px solid var(--rule-2);
  border-radius: 2px; cursor: pointer; font-size: 17px; line-height: 1; transition: background-color .12s; }
.map-btn:last-child { font-size: 13px; }
.map-btn:hover { background: var(--bg-2); }
.map-scale { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2);
  pointer-events: none; }
.map-scale i { display: block; height: 6px; border: 1.5px solid var(--ink-2); border-top: 0; }
.map-scale span { background: var(--bg); padding: 0 4px; border-radius: 2px; font-variant-numeric: tabular-nums; }
.map-under { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 32px; margin-top: 12px; }
.map-legend { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 14px; font-size: 12px; color: var(--ink-3); }
.ml-t { color: var(--ink-2); font-size: 13px; padding-bottom: 1px; }
.ml-r { display: flex; gap: 2px; }
.ml-i { display: flex; flex-direction: column; gap: 3px; min-width: 54px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ml-i i { display: block; height: 10px; border-radius: 1px; }
.map-note { font-size: 13px; color: var(--ink-3); margin-top: 8px; }
.map-under .map-note { margin-top: 0; }
.touch-only { display: none; }
@media (pointer: coarse) { .touch-only { display: inline; } }
.pick.check { cursor: pointer; }
.pick.check input { accent-color: var(--ink); width: 15px; height: 15px; margin: 0; }
.mk { display: inline-block; width: 9px; height: 9px; vertical-align: -1px; position: relative; }
.mk-d::before, .mk-d::after { content: ""; position: absolute; left: 4px; top: -1px; width: 1.75px; height: 11px; background: var(--ink-2); transform: rotate(45deg); }
.mk-d::after { transform: rotate(-45deg); }
.mk-b { border: 1.5px solid var(--ink); background: var(--bg); transform: rotate(45deg) scale(.8); }
.areas-t { max-width: 760px; }
.areas-t .link { font-weight: 600; text-align: left; }
/* "Where" is prose: let it wrap so Time and Share stay on screen at phone width */
.areas-t td:nth-child(2) { white-space: normal; }
@media (max-width: 560px) { .areas-t th[scope=row], .areas-t th[scope=row] .link { white-space: normal; } }
.tip .tip-more { opacity: .9; font-size: 12px; }
.tip .tip-more:first-of-type { margin-top: 4px; }
.map-thumb { display: block; margin-top: 4px; }
.map-thumb .map-frame { height: 260px; }
.map-thumb .map-canvas { cursor: pointer; touch-action: auto; }
.map-thumb:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (max-width: 640px) {
  .map-frame { height: clamp(320px, 62vh, 560px); margin: 0 calc(-1 * var(--gut)); border-left: 0; border-right: 0; }
  .map-thumb .map-frame { height: 220px; }
  .ml-i { min-width: 50px; }
  .ml-r { flex-wrap: wrap; }
}
@media (forced-colors: active) { .ml-i i { forced-color-adjust: none; } }
