/* Layout, ledger tables and typography. Tokens live in tokens.css. */

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

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t16);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

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

.skip {
  position: absolute;
  left: var(--s16);
  top: -40px;
  background: var(--paper-2);
  color: var(--ink);
  padding: var(--s8) var(--s12);
  z-index: 10;
}

.skip:focus {
  top: var(--s16);
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: var(--s64) var(--s24) var(--s128);
}

@media (max-width: 719px) {
  .wrap {
    padding: var(--s32) var(--s16) var(--s96);
  }
}

.eyebrow {
  font-family: var(--sans);
  font-size: var(--t12);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--s12);
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}

h1 {
  font-size: var(--t64);
}

h2 {
  font-size: var(--t28);
  margin-bottom: var(--s16);
}

.lede,
.meta,
.section-note,
figcaption,
.foot,
.empty {
  color: var(--muted);
}

.lede {
  max-width: 40em;
  margin: var(--s16) 0 0;
}

.meta {
  margin: var(--s12) 0 0;
  font-size: var(--t14);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

.masthead {
  padding-bottom: var(--s64);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--s64);
}

@media (max-width: 719px) {
  .masthead {
    padding-bottom: var(--s32);
    margin-bottom: var(--s32);
  }
}

/* Summary figures: a line of counts, not a card grid. */
.counts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s16) var(--s32);
  margin: var(--s32) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
  padding-top: var(--s24);
}

.counts li {
  margin: 0;
  min-width: 6.5rem;
}

.counts .num {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: var(--t28);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.counts .lbl {
  display: block;
  font-size: var(--t12);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-top: var(--s4);
}

section {
  margin-top: var(--s96);
  padding-top: var(--s32);
  border-top: 1px solid var(--rule);
}

@media (max-width: 719px) {
  section {
    margin-top: var(--s64);
  }
}

.section-note {
  margin: 0 0 var(--s24);
  max-width: 46em;
  font-size: var(--t14);
}

/* Tables */
.scroll {
  overflow-x: auto;
  margin: 0 calc(var(--s24) * -1);
  padding: 0 var(--s24);
}

@media (max-width: 719px) {
  .scroll {
    margin: 0 calc(var(--s16) * -1);
    padding: 0 var(--s16);
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t14);
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
}

caption {
  text-align: left;
  font-size: var(--t12);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 var(--s12);
  caption-side: top;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: var(--s12) var(--s12) var(--s12) 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
}

th {
  font-weight: 600;
  font-size: var(--t12);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper-2);
  padding-top: var(--s8);
  padding-bottom: var(--s8);
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 1px solid var(--rule-strong);
}

td.muted,
.muted {
  color: var(--muted);
}

/* Timeline */
.timeline {
  margin: var(--s16) 0 0;
}

.timeline svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.timeline-scroll {
  overflow-x: auto;
}

/* GitHub identity */
.gh-id {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--s16);
  align-items: start;
  margin: 0 0 var(--s32);
  max-width: 46em;
}

.gh-id img {
  width: 56px;
  height: 56px;
  display: block;
  border: 1px solid var(--rule-strong);
  background: var(--paper-2);
}

.gh-id h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: var(--t20);
  line-height: 1.2;
  margin: 0;
}

.gh-id .handle {
  margin: var(--s4) 0 0;
  font-size: var(--t14);
}

.gh-id .bio {
  margin: var(--s8) 0 0;
  color: var(--ink);
}

.gh-id .meta {
  margin: var(--s8) 0 0;
}

/* Details / skipped */
details {
  margin-top: var(--s24);
}

summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--ink);
  padding: var(--s8) 0;
}

summary:hover {
  color: var(--accent);
}

.err {
  color: var(--error);
  margin: var(--s24) 0;
}

.foot {
  margin-top: var(--s96);
  padding-top: var(--s24);
  border-top: 1px solid var(--rule);
  font-size: var(--t14);
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s8) var(--s24);
  margin-top: var(--s12);
}

noscript p {
  margin: var(--s24) 0;
  color: var(--error);
}

h2.subhead {
  font-size: var(--t20);
  margin-top: var(--s48);
}
