/* The site's own rules. Colors, type and spacing come from tokens.css, which is
   generated from design/tokens. Fonts are served from here, so a visit asks no
   other company for anything. */

@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/IBMPlexSans-Regular-Latin1.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/IBMPlexSans-SemiBold-Latin1.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/IBMPlexMono-Medium-Latin1.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
}

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

body {
  margin: 0;
  background: var(--bg-app);
  color: var(--text-primary);
  font: var(--type-body);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-4) var(--screen-margin) var(--space-12);
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Header: the name in plain type beside the app icon. */

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--hit-min);
  font: var(--type-headline);
  text-decoration: none;
}

.brand img {
  display: block;
  border: var(--border-width) solid var(--border-hairline);
  border-radius: 9px;
}

h1 {
  margin: var(--space-8) 0 var(--space-3);
  font: var(--type-large-title);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

h2 {
  margin: var(--space-8) 0 var(--space-3);
  font: var(--type-headline);
}

p {
  margin: 0 0 var(--space-3);
  text-wrap: pretty;
}

.note {
  color: var(--text-secondary);
  font: var(--type-callout);
}

li,
dd {
  text-wrap: pretty;
}

/* A note under a card stands clear of it. */

.card + .note,
.rows + .note {
  margin-top: var(--space-3);
}

/* Cards are flat fills. Rows inside one are divided by hairlines. */

.card {
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--surface-card);
}

.card + .card {
  margin-top: var(--space-4);
}

.card > :last-child {
  margin-bottom: 0;
}

.rows {
  margin: 0;
  padding: 0 var(--space-4);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  list-style: none;
}

.rows > li,
.rows > div {
  padding: var(--space-4) 0;
}

.rows > li + li,
.rows > div + div {
  border-top: var(--border-width) solid var(--border-hairline);
}

ol.rows {
  counter-reset: step;
}

ol.rows > li {
  display: flex;
  gap: var(--space-3);
  counter-increment: step;
}

ol.rows > li::before {
  content: counter(step);
  min-width: 1ch;
  color: var(--text-tertiary);
  font: var(--figure-body);
}

dt {
  font: var(--type-headline);
}

dd {
  margin: var(--space-1) 0 0;
  color: var(--text-secondary);
  font: var(--type-callout);
}

/* Trust words never rely on color: each has its own glyph, as in the app. */

.trust::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: var(--space-2);
  border: 1.5px solid var(--glyph);
  border-radius: 50%;
}

.trust-solid {
  --glyph: var(--trust-solid);
}

.trust-solid::before {
  background: var(--glyph);
}

.trust-thin {
  --glyph: var(--trust-thin);
}

.trust-thin::before {
  background: linear-gradient(90deg, var(--glyph) 50%, transparent 50%);
}

.trust-nocall {
  --glyph: var(--trust-nocall);
}

.trust-absent {
  --glyph: var(--trust-absent);
}

.trust-absent::before {
  border-style: dashed;
}

code {
  font: var(--figure-callout);
  overflow-wrap: anywhere;
}

pre {
  margin: 0 0 var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
  white-space: pre-wrap;
}

footer {
  margin-top: var(--space-12);
  padding-top: var(--space-4);
  border-top: var(--border-width) solid var(--border-strong);
  color: var(--text-secondary);
  font: var(--type-footnote);
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-6);
  margin-bottom: var(--space-3);
}

footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--hit-min);
  font: var(--type-callout);
}

footer a[aria-current="page"] {
  font-weight: var(--weight-semibold);
  text-decoration: none;
}
