/* Colors follow the reader's system setting. Each pair meets WCAG AA contrast on its background. */
:root {
  color-scheme: light dark;
  --text: #1a1a1a;
  --background: #fff;
  --link: #0b57d0;
  --muted: #555;
  --border: #d0d0d0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6e6e6;
    --background: #121212;
    --link: #8ab4f8;
    --muted: #a8a8a8;
    --border: #3c3c3c;
  }
}

/* System fonts only: the site loads nothing from other origins. */
body {
  margin: 0 auto;
  max-width: 60rem;
  padding: 1rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--background);
}

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

/* One focus ring for links and form controls, visible in both color schemes. */
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* Off screen until it receives keyboard focus. */
.skip-link {
  position: absolute;
  left: -100vw;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  padding: 0.5rem;
  background: var(--background);
}

header,
footer {
  padding: 1rem 0;
}

header {
  display: flex;
  justify-content: space-between;
}

.site-name {
  font-weight: 700;
  text-decoration: none;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

.card h3 {
  margin-top: 0;
}

.meta {
  font-size: 0.875rem;
  color: var(--muted);
}

.status {
  float: right;
  text-transform: capitalize;
}

.demo textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  font: inherit;
}

/* A 64-character digest has no spaces, so let it wrap on narrow screens. */
.demo output {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  overflow-wrap: anywhere;
}
