:root {
  color-scheme: light;
  --paper: #f4f0e8;
  --paper-deep: #e8e0d2;
  --ink: #23221f;
  --muted: #706c64;
  --accent: #a04f36;
  --rule: rgba(35, 34, 31, 0.18);
  --content: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 85% 8%, rgba(160, 79, 54, 0.08), transparent 24rem),
    var(--paper);
  color: var(--ink);
  font-family: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.5rem 0.8rem;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main,
footer {
  width: min(calc(100% - 3rem), var(--content));
  margin-inline: auto;
}

.site-header {
  min-height: 6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--accent);
  font-size: 0.85rem;
}

nav {
  display: flex;
  gap: 2rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
}

nav a,
.text-link,
.filing {
  text-underline-offset: 0.3em;
  text-decoration-thickness: 1px;
}

nav a {
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible,
.text-link:hover,
.text-link:focus-visible,
.filing:hover,
.filing:focus-visible {
  color: var(--accent);
}

.intro {
  min-height: 39rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 0 7rem;
}

.eyebrow,
.section-index,
.note-meta,
footer {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.eyebrow {
  margin: 0 0 1.4rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}

h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.intro-copy {
  max-width: 34rem;
  margin: 2.5rem 0 1.75rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.text-link {
  width: fit-content;
  color: var(--accent);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
}

.notes,
.games,
.about {
  padding: 6rem 0;
  border-top: 1px solid var(--rule);
}

.section-heading {
  display: grid;
  grid-template-columns: 8rem 1fr;
  align-items: baseline;
  margin-bottom: 4rem;
}

.section-heading-meta {
  grid-template-columns: 8rem 1fr auto;
}

.games-updated {
  margin: 0;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
}

.section-index {
  margin: 0;
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.note {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  padding: 2.5rem 0;
  border-top: 1px solid var(--rule);
}

.note:last-child {
  border-bottom: 1px solid var(--rule);
}

.note-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.note-body {
  max-width: 42rem;
}

.note h3 {
  margin: 0 0 0.75rem;
  font-size: 1.45rem;
  font-weight: 600;
}

.note p,
.about > p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.about > p {
  max-width: 42rem;
  margin-left: 8rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.game-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem;
  border: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.18);
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.game-card:hover,
.game-card:focus-visible {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.38);
}

.game-icon {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 0.55rem;
  object-fit: cover;
  box-shadow: 0 0.35rem 1rem rgba(35, 34, 31, 0.12);
}

.game-icon-fallback {
  display: grid;
  place-items: center;
  background: var(--paper-deep);
  color: var(--accent);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.game-details,
.game-stats,
.game-stats > span {
  min-width: 0;
  display: flex;
}

.game-details {
  flex-direction: column;
  gap: 0.55rem;
}

.game-details strong {
  overflow: hidden;
  font-size: 1rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-stats {
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
}

.game-stats > span {
  gap: 0.35rem;
}

.game-stats small {
  color: var(--accent);
  font-size: inherit;
}

.game-arrow {
  align-self: start;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.games-empty {
  margin: 0 0 0 8rem;
  color: var(--muted);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.78rem;
}

footer p {
  margin: 0;
}

.filing-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem 1rem;
}

.filing-pending {
  color: #8f3d28;
}

@media (max-width: 640px) {
  .site-header,
  main,
  footer {
    width: min(calc(100% - 2rem), var(--content));
  }

  .site-header {
    min-height: 4.5rem;
  }

  nav {
    gap: 1rem;
  }

  .intro {
    min-height: calc(100svh - 4.5rem);
    padding: 4rem 0 5rem;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 4.6rem);
  }

  .section-heading,
  .section-heading-meta,
  .note {
    grid-template-columns: 1fr;
  }

  .section-heading {
    gap: 0.4rem;
    margin-bottom: 2.5rem;
  }

  .note {
    gap: 1rem;
  }

  .note-meta {
    flex-direction: row;
    gap: 0.75rem;
  }

  .about > p {
    margin-left: 0;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .games-empty {
    margin-left: 0;
  }

  .games-updated {
    margin-top: 0.35rem;
  }

  footer {
    flex-direction: column;
  }

  .filing-links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
