:root {
  --paper: #f3f1ec;
  --ink: #141414;
  --mute: #6b6862;
  --rule: #d6d2c8;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #0f0f0e; --ink: #ecebe7; --mute: #8a877f; --rule: #2a2926; }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  padding: 0 clamp(16px, 5vw, 64px);
}
.mono, code, pre { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; letter-spacing: .02em; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover, a:focus-visible { text-decoration-color: var(--ink); }

header, footer {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 28px 0 22px; border-bottom: 1px solid var(--rule);
}
footer { border-bottom: 0; border-top: 1px solid var(--rule); padding: 22px 0 28px; color: var(--mute); }
.mark { font-weight: 600; font-size: 16px; letter-spacing: 0; text-decoration: none; }
nav { display: flex; gap: 20px; flex-wrap: wrap; justify-content: flex-end; }
nav a { text-decoration: none; color: var(--mute); }
nav a:hover, nav a[aria-current] { color: var(--ink); }

main { padding: 12vh 0 9vh; min-width: 0; }
h1 {
  font: 500 clamp(32px, 5vw, 68px)/1.02 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.03em;
  max-width: 22ch;
}
h2 { font-weight: 600; font-size: 17px; margin-top: 9vh; }
.label { color: var(--mute); margin-bottom: 22px; }
.lede { margin-top: 22px; color: var(--mute); font-size: 17px; max-width: 62ch; }
.text { margin-top: 16px; max-width: 62ch; }
.links { margin-top: 28px; display: flex; gap: 24px; flex-wrap: wrap; }

/* The record: registry-ledger rows */
.record { margin-top: 9vh; border-top: 1px solid var(--ink); }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 8rem 11rem 7rem;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.row > span:not(:first-child) { text-align: right; }
.row.head { color: var(--mute); }
.row.total { border-bottom-color: var(--ink); }
.note { margin-top: 12px; color: var(--mute); }

/* Checker */
.field { margin-top: 9vh; display: flex; gap: 12px; max-width: 46rem; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); padding: 12px 0; }
.field input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 14px; padding: 4px 0; outline: none;
}
.field input::placeholder { color: var(--mute); }
.field button {
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  font: inherit; padding: 4px 14px; cursor: pointer; border-radius: 0;
}
.field:focus-within { border-bottom-color: var(--ink); }
.result { margin-top: 28px; max-width: 46rem; min-height: 6rem; }
.result h2 { margin-top: 0; }
.result .status::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px;
  background: var(--ink); vertical-align: 1px;
}
.result .open::before { background: transparent; border: 1px solid var(--ink); }
.result p { margin-top: 12px; }
.result .addr { color: var(--mute); word-break: break-all; }
[hidden] { display: none !important; }

/* Paper */
article { max-width: 72ch; }
article h1 { font-size: clamp(28px, 3.6vw, 46px); line-height: 1.06; max-width: none; }
article h2 { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--rule); }
article h3 { font-weight: 600; font-size: 15px; margin-top: 32px; }
article p, article ol, article pre, article .scroll { margin-top: 14px; }
article ol { padding-left: 2.2em; }
article li { margin-top: 6px; overflow-wrap: anywhere; }
article li:target { background: var(--rule); }
article .meta { color: var(--mute); margin-top: 6px; }
article .caption { color: var(--mute); margin-top: 28px; }
article pre { overflow-x: auto; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); padding: 12px 0; line-height: 1.6; }
article code { font-size: 12.5px; }
article sup a, article a.cite { text-decoration: none; }
.contents { margin-top: 28px; color: var(--mute); columns: 2; column-gap: 32px; list-style: none; padding: 0; }
.contents li { margin-top: 4px; break-inside: avoid; }
.contents a { text-decoration: none; }
.scroll { overflow-x: auto; border-top: 1px solid var(--ink); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: 10px 16px 10px 0; border-bottom: 1px solid var(--rule); }
th { color: var(--mute); font-weight: 400; }
td.num, th.num { text-align: right; white-space: nowrap; }
td:last-child, th:last-child { padding-right: 0; }

@media (max-width: 640px) {
  .row { grid-template-columns: 1fr 1fr; row-gap: 4px; }
  .row > span:first-child { grid-column: 1 / -1; }
  .row > span:nth-child(2) { text-align: left; }
  .row > span:nth-child(4) { grid-column: 2; }
  .row.head { display: none; }
  main { padding: 10vh 0 7vh; }
  .record, .field { margin-top: 7vh; }
  .contents { columns: 1; }
  header { flex-direction: column; gap: 10px; }
  nav { justify-content: flex-start; }
}
