:root {
  --bg: #fafaf8;
  --text: #1c1c1a;
  --muted: #5f5f5a;
  --card: #ffffff;
  --line: rgba(0, 0, 0, 0.1);
  --hover: rgba(0, 0, 0, 0.25);
  --badge-bg: #efeee9;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --text: #ecebe7;
    --muted: #a3a29c;
    --card: #1d1d1b;
    --line: rgba(255, 255, 255, 0.12);
    --hover: rgba(255, 255, 255, 0.35);
    --badge-bg: #2a2a27;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.wrap {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0 16px;
}

a {
  color: inherit;
}

header {
  padding: 4.5rem 0 3rem;
}

h1 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

.translation {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.lede {
  max-width: 36rem;
  margin: 1.75rem 0 0;
  font-size: 1.2rem;
}

section {
  padding: 1.5rem 0 2.5rem;
}

h2 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}

.products {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 12px;
}

.card {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: auto auto 1fr;
  gap: 0.25rem 0.9rem;
  height: 100%;
  padding: 1.1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
}

.card:hover,
.card:focus-visible {
  border-color: var(--hover);
}

.card:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.card img {
  grid-row: span 3;
  width: 40px;
  height: 40px;
  border-radius: 9px;
}

.name {
  font-weight: 600;
}

.badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  vertical-align: 0.1em;
}

.line {
  font-size: 0.95rem;
}

.domain {
  align-self: end;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Logos drawn in dark ink on transparent need a light tile in dark mode. */
@media (prefers-color-scheme: dark) {
  .card img.on-light {
    background: #ecebe7;
    padding: 4px;
  }
}

.principles {
  margin: 0;
  padding-left: 1.2rem;
  max-width: 38rem;
}

.principles li {
  margin-bottom: 0.6rem;
}

.maker p {
  max-width: 38rem;
  margin: 0;
}

footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

footer p {
  margin: 0;
}
