:root {
  color-scheme: light dark;
  --bg: #faf9f7;
  --surface: #ffffff;
  --text: #171717;
  --muted: #525252;
  --line: #e5e5e5;
  --link: #b42318;
  --focus: #b42318;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --surface: #1c1c1c;
    --text: #f5f5f5;
    --muted: #c4c4c4;
    --line: #333333;
    --link: #ff9b85;
    --focus: #ff9b85;
  }
}

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

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

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

.page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

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

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.brand img {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
}

.byline {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Content */

main {
  padding-top: 2rem;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.3125rem;
  line-height: 1.3;
}

h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.0625rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

li + li {
  margin-top: 0.4rem;
}

.lead {
  color: var(--muted);
  font-size: 1.1875rem;
}

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

/* On this page */

.contents {
  margin: 1.5rem 0 0;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.contents h2 {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.contents ul {
  margin: 0;
  padding-left: 1.1rem;
}

.contents li + li {
  margin-top: 0.25rem;
}

/* Cards */

.cards {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.cards li + li {
  margin-top: 0;
}

.card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  color: var(--text);
  text-decoration: none;
}

.card img {
  flex: none;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
}

.card strong {
  display: block;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.card span {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Tables: two columns on wide screens, stacked on phones */

.table {
  width: 100%;
  margin: 0 0 1rem;
  border-collapse: collapse;
  font-size: 1rem;
}

.table th,
.table td {
  padding: 0.75rem 0.75rem 0.75rem 0;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.table td:first-child {
  font-weight: 600;
  width: 45%;
}

@media (max-width: 34rem) {
  .table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    padding: 0.75rem 0;
    border-top: 1px solid var(--line);
  }

  .table td,
  .table td:first-child {
    width: 100%;
    padding: 0;
    border: 0;
  }

  .table td + td {
    margin-top: 0.25rem;
    color: var(--muted);
  }
}

/* Footer */

.site-footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 0;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 24rem) {
  h1 {
    font-size: 1.75rem;
  }
}
