/* One stylesheet, no framework, no web fonts: the page is a table of numbers and it
   should render instantly on a phone with one request. Dark mode follows the reader's
   own setting rather than a toggle nobody would find. */

:root {
  --bg: #fbfbf9;
  --fg: #1a1a1a;
  --dim: #6b6b6b;
  --rule: #e0ded8;
  --accent: #0b5f8a;
  --code-bg: #f1efe9;
  --ok-bg: #e6f3e6;
  --ok-fg: #1d5c23;
  --bad-bg: #f8e6e4;
  --bad-fg: #8a2016;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --fg: #e8e6e1;
    --dim: #9a9a95;
    --rule: #2c2f34;
    --accent: #6cb6e0;
    --code-bg: #1e2126;
    --ok-bg: #16301a;
    --ok-fg: #8fd398;
    --bad-bg: #351c1a;
    --bad-fg: #e8a39b;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

main {
  max-width: 54rem;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

h1 { font-size: 1.9rem; margin: 0 0 .25rem; letter-spacing: -0.01em; }
h2 { font-size: 1.2rem; margin: 2.5rem 0 .75rem; padding-bottom: .3rem; border-bottom: 1px solid var(--rule); }
h3 { font-size: .95rem; margin: 1.25rem 0 .35rem; color: var(--dim); font-weight: 600; }

p { margin: .6rem 0; }
.sub { color: var(--dim); margin-top: 0; }
.dim { color: var(--dim); }
.note { color: var(--dim); font-size: .9rem; }

a { color: var(--accent); }

.status {
  display: inline-block;
  margin: .75rem 0 0;
  padding: .45rem .8rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: .95rem;
}
.status.ok  { background: var(--ok-bg);  color: var(--ok-fg); }
.status.bad { background: var(--bad-bg); color: var(--bad-fg); }

table {
  width: 100%;
  border-collapse: collapse;
  margin: .5rem 0 1rem;
}

th, td {
  text-align: left;
  padding: .45rem .6rem .45rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}

th { font-weight: 600; white-space: nowrap; width: 11rem; }

/* Figures are read down the column and compared, so they need a fixed-width face and
   tabular digits; without them the decimal points wander. */
.num {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.what { color: var(--dim); font-size: .85rem; }

table.compact th { width: auto; }
table.compact td.num { width: 5rem; }

pre {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: .6rem .8rem;
  overflow-x: auto;
  margin: .35rem 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .9em;
}

p code, td code, li code {
  background: var(--code-bg);
  border-radius: 3px;
  padding: .1em .3em;
}

pre code { background: none; padding: 0; }

footer {
  margin-top: 3rem;
  padding-top: .75rem;
  border-top: 1px solid var(--rule);
  color: var(--dim);
  font-size: .85rem;
}

/* On a phone the third column is commentary, not data: it goes under the value rather
   than squeezing both into nothing. */
@media (max-width: 42rem) {
  th { width: auto; white-space: normal; }
  table, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--rule); padding: .5rem 0; }
  th, td { border: 0; padding: 0; }
  th { color: var(--dim); font-size: .85rem; font-weight: 600; }
  .num { font-size: 1.05rem; }
}
