:root {
  --bg: #fcfcfb;
  --panel: #ffffff;
  --text: #16181d;
  --muted: #6a7280;
  --faint: #98a0ab;
  --rule: #e2e5e9;
  --rule-strong: #cfd4da;
  --accent: #0f7b6c;
  --accent-dim: #0f7b6c22;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --panel: #14181d;
    --text: #d9dee5;
    --muted: #8b95a1;
    --faint: #667180;
    --rule: #232a31;
    --rule-strong: #313943;
    --accent: #4ec9a8;
    --accent-dim: #4ec9a81f;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.shell {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------------------------------------------------------- masthead */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.wordmark__mark {
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--accent);
  border-radius: 1px;
  transform: rotate(45deg);
}

.masthead nav {
  display: flex;
  gap: 20px;
}

.masthead nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--muted);
  text-decoration: none;
}

.masthead nav a:hover {
  color: var(--accent);
}

/* ------------------------------------------------------------------ layout */

main {
  padding: 44px 0 8px;
}

.prose {
  max-width: 660px;
}

h1 {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 620;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.lede {
  margin: 0 0 8px;
  max-width: 620px;
  color: var(--muted);
  font-size: 16.5px;
}

/* Section label: mono, small, with a hairline rule running to the right. */
.label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 46px 0 18px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

h2 {
  margin: 30px 0 8px;
  font-size: 17px;
  font-weight: 620;
  letter-spacing: -0.01em;
}

h3 {
  margin: 24px 0 4px;
  font-size: 15.5px;
  font-weight: 620;
}

p {
  margin: 0 0 15px;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
}

a:hover {
  border-bottom-color: var(--accent);
}

ul {
  margin: 0 0 15px;
  padding-left: 0;
  list-style: none;
}

ul li {
  position: relative;
  margin-bottom: 7px;
  padding-left: 20px;
}

ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--faint);
}

strong {
  font-weight: 620;
}

code {
  padding: 1.5px 5px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--panel);
  font-family: var(--mono);
  font-size: 12.5px;
}

pre {
  margin: 0 0 15px;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--panel);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.65;
}

pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
}

/* -------------------------------------------------------------- app record */

.record {
  display: block;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  border-bottom: 0;
  color: inherit;
}

.record:last-of-type {
  border-bottom: 1px solid var(--rule);
}

.record:hover .record__name {
  color: var(--accent);
}

.record__name {
  margin: 0 0 5px;
  font-size: 16.5px;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.record__desc {
  margin: 0 0 10px;
  max-width: 620px;
  color: var(--muted);
  font-size: 14.5px;
}

.record__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 2px 7px;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.tag--accent {
  border-color: var(--accent);
  color: var(--accent);
}

/* ------------------------------------------------------------- fact blocks */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  margin: 0 0 8px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
}

.fact {
  padding: 16px 18px;
  background: var(--panel);
}

.fact__key {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.fact__val {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
}

/* --------------------------------------------------------------- schematic */

.schematic {
  margin: 30px 0 8px;
  padding: 22px 18px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--panel);
}

.schematic svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 560px;
  margin: 0 auto;
}

.schematic .s-node {
  fill: none;
  stroke: var(--rule-strong);
  stroke-width: 1.25;
}

.schematic .s-node--live {
  stroke: var(--accent);
}

.schematic .s-edge {
  fill: none;
  stroke: var(--rule-strong);
  stroke-width: 1.25;
}

.schematic .s-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  fill: var(--muted);
  text-transform: uppercase;
}

.schematic .s-label--live {
  fill: var(--accent);
}

.schematic__note {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--faint);
  text-align: center;
}

/* ------------------------------------------------------------------ footer */

.colophon {
  margin-top: 64px;
  padding: 20px 0 40px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--faint);
}

.colophon a {
  color: var(--faint);
  border-bottom: 0;
}

.colophon a:hover {
  color: var(--accent);
}

.colophon__links {
  display: flex;
  gap: 16px;
}

.meta-line {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--faint);
}

@media (max-width: 560px) {
  h1 {
    font-size: 22px;
  }
  main {
    padding-top: 32px;
  }
}
