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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--face-text);
  font-size: var(--t-base);
  font-weight: 300;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--brass); color: var(--ink); }

a { color: var(--verd); text-decoration: none; border-bottom: 1px solid var(--verd-deep); }
a:hover { color: var(--bone); border-bottom-color: var(--brass); }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

button { font: inherit; color: inherit; }

img { max-width: 100%; height: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--brass); color: var(--ink); padding: 10px 16px;
  font-family: var(--face-data); font-size: var(--t-xs); letter-spacing: .16em;
  text-transform: uppercase; border: 0;
}
.skip:focus { left: 8px; top: 8px; }

/* Headings ------------------------------------------------------------- */

h1, h2, h3, h4 { font-weight: 400; margin: 0; }

.display { font-family: var(--face-display); letter-spacing: -.005em; }

h3.sub {
  font-family: var(--face-sc);
  letter-spacing: .06em;
  font-size: var(--t-h3);
  color: var(--brass);
  margin: 30px 0 10px;
}

/* Prose ---------------------------------------------------------------- */

p { margin: 0 0 17px; }
p:last-child { margin-bottom: 0; }

.lede { font-size: var(--t-lede); line-height: 1.66; color: var(--bone-dim); }

ul.list { list-style: none; margin: 0 0 18px; padding: 0; }
ul.list li { position: relative; padding-left: 24px; margin: 0 0 11px; }
ul.list li::before {
  content: ""; position: absolute; left: 2px; top: .72em;
  width: 7px; height: 1px; background: var(--brass-deep);
}

ol.seq { list-style: none; counter-reset: seq; margin: 6px 0 20px; padding: 0 0 0 11px; }
ol.seq li {
  counter-increment: seq; position: relative;
  padding: 0 0 16px 44px; border-left: 1px solid var(--line);
}
ol.seq li::before {
  content: counter(seq, decimal-leading-zero);
  position: absolute; left: -12px; top: -2px;
  width: 24px; height: 24px; display: grid; place-items: center;
  background: var(--ink); border: 1px solid var(--line); border-radius: 50%;
  color: var(--brass); font-family: var(--face-data); font-size: 10px;
}
ol.seq li:last-child { border-left-color: transparent; padding-bottom: 0; }

strong { font-weight: 400; color: var(--bone); }
em { font-style: italic; }

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

.tablewrap { margin: 24px 0; }
.tablewrap .scroll { overflow-x: auto; scrollbar-width: thin; }

table { width: 100%; border-collapse: collapse; font-size: 15.5px; }

caption {
  caption-side: top; text-align: left; padding-bottom: 9px;
  font-family: var(--face-data); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--grey-dim);
}

thead th {
  text-align: left; padding: 9px 14px 9px 0; white-space: nowrap;
  font-family: var(--face-data); font-weight: 500; font-size: 10.5px;
  letter-spacing: .15em; text-transform: uppercase; color: var(--brass);
  border-bottom: 1px solid var(--brass-deep);
}

tbody td {
  padding: 11px 14px 11px 0; vertical-align: top; line-height: 1.55;
  border-bottom: 1px solid var(--line-soft); color: var(--bone-dim);
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255,255,255,.022); color: var(--bone); }
tbody td:first-child { color: var(--bone); white-space: nowrap; padding-right: 22px; }

.num, td.num, th.num { font-family: var(--face-data); font-size: 14px; }

/* Rank cells carry the Rank colour language. */
td[data-rank] { box-shadow: inset 2px 0 0 var(--rank-c, var(--line)); padding-left: 12px; color: var(--rank-c, var(--bone)); }
td[data-rank="ordinary"]    { --rank-c: var(--r-ordinary); }
td[data-rank="trained"]     { --rank-c: var(--r-trained); }
td[data-rank="exceptional"] { --rank-c: var(--r-exceptional); }
td[data-rank="superhuman"]  { --rank-c: var(--r-superhuman); }
td[data-rank="legendary"]   { --rank-c: var(--r-legendary); }
td[data-rank="mythic"]      { --rank-c: var(--r-mythic); }

tr.hit td { background: var(--brass-wash); color: var(--bone); }
tr.hit td:first-child { box-shadow: inset 2px 0 0 var(--brass); }

/* Marks ---------------------------------------------------------------- */

.mark {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-family: var(--face-data); font-size: 10px; letter-spacing: .15em;
  text-transform: uppercase; padding: 4px 9px; border-radius: 2px;
  border: 1px solid currentColor;
}
.mark::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.mark--current   { color: var(--verd);  background: var(--verd-wash); }
.mark--guideline { color: var(--brass); background: var(--brass-wash); }
.mark--workshop  { color: var(--ember); background: var(--ember-wash); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
