:root {
  color-scheme: light dark;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1c1d1f;
  --muted: #5d6166;
  --border: #dedfdc;
  --border-hover: #b9bbb6;
  --accent: #1f4f8a;
  --badge-bg: #eef1f6;
  --badge-text: #2c3e57;
  --focus: #1f6feb;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 4px 16px rgb(0 0 0 / 0.04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141517;
    --surface: #1c1e21;
    --text: #ececec;
    --muted: #a3a7ad;
    --border: #2e3136;
    --border-hover: #4a4e55;
    --accent: #8ab4f8;
    --badge-bg: #26303d;
    --badge-text: #c9d6e8;
    --focus: #8ab4f8;
    --shadow: none;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

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

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

.page {
  flex: 1;
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 5rem) 1rem 3rem;
}

.intro {
  margin-bottom: 2rem;
}

.intro h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 650;
  letter-spacing: -0.015em;
}

.intro p {
  margin: 0;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: border-color 120ms ease, transform 120ms ease;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

/* The whole card is clickable via the title link's stretched ::after. */
.card:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.card-link {
  color: inherit;
  text-decoration: none;
}

.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.card-link:focus-visible {
  outline: none;
}

.card:hover .card-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card-icon {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 11px;
}

.card-monogram {
  display: grid;
  place-items: center;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 1.375rem;
  font-weight: 650;
}

.card-body {
  flex: 1;
}

.card-title {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 620;
}

.card-desc {
  margin: 0;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.75rem;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.8125rem;
  font-weight: 550;
}

.badge-icon {
  width: 0.875rem;
  height: 0.875rem;
  fill: currentColor;
}

.card-host {
  color: var(--muted);
  font-size: 0.8125rem;
}

.footer {
  padding: 1.5rem 1rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

.footer p {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
  .card:hover {
    transform: none;
  }
}
