:root {
  --bg: #ffffff;
  --fg: #1a1d21;
  --muted: #4a5259;
  --line: #c9d0d6;
  --link: #0b4fa8;
  --link-hover: #06326b;
  --focus: #b8410e;
  --surface: #f4f6f8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --fg: #eceff2;
    --muted: #b3bcc4;
    --line: #3a4148;
    --link: #86bcff;
    --link-hover: #b6d7ff;
    --focus: #ffb066;
    --surface: #1e2226;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg);
  color: var(--link);
  padding: 0.75rem 1rem;
  border: 2px solid var(--focus);
  z-index: 10;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.wrap {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header and navigation */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--fg);
  text-decoration: none;
}

.wordmark:hover { color: var(--fg); text-decoration: underline; }

.nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.nav-list a,
.menu-toggle {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  text-decoration: none;
  color: var(--link);
}

.nav-list a:hover,
.menu-toggle:hover {
  text-decoration: underline;
  background: var(--bg);
}

.nav-list a[aria-current="page"],
.footer-list a[aria-current="page"] {
  color: var(--fg);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.menu-toggle {
  font: inherit;
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.chevron {
  margin-left: 0.35em;
}

.has-menu {
  position: relative;
}

/* Without scripting the menu stays a plain nested list, so it is not dressed
   up as a popup. The popup styling below applies only once JS takes over. */
.menu {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0.25rem;
}

.menu a {
  display: block;
  padding: 0.5rem 0.75rem;
}

.js-on .menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: min(12rem, calc(100vw - 2.5rem));
  z-index: 5;
  background: var(--surface);
  border: 1px solid var(--muted);
  border-radius: 0.25rem;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.25);
}

.js-on .menu.is-open {
  display: block;
}

/* Main */

main.wrap { padding: 2.5rem 1.25rem 3.5rem; }

h1 {
  font-size: 2rem;
  line-height: 1.25;
  margin: 0 0 1rem;
}

main p {
  max-width: 42rem;
  margin: 0 0 1rem;
  color: var(--muted);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 1.5rem 0;
}

.footer-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0 0 0.75rem;
  padding: 0;
}

.footer-list a { padding: 0.25rem 0; }

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Long-form pages */

main h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 2rem 0 0.5rem;
}

main h3 {
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 1.5rem 0 0.5rem;
}

main ul {
  max-width: 42rem;
  margin: 0 0 1rem;
  padding-left: 1.5rem;
  color: var(--muted);
}

main li { margin-bottom: 0.35rem; }

.effective-date {
  font-weight: 700;
  color: var(--fg);
}

/* Game page */

.hero {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-size: 2.75rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.tagline {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 1.25rem;
}

.launch-date {
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.75rem;
}

.panel {
  max-width: 42rem;
  background: var(--surface);
  border: 1px solid var(--muted);
  border-left-width: 4px;
  border-radius: 0.25rem;
  padding: 1.25rem;
  margin: 0 0 1.5rem;
}

.panel p { margin-bottom: 0.5rem; }
.panel p:last-child { margin-bottom: 0; }

.countdown {
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  margin: 0;
}

.countdown-small {
  font-size: 1.5rem;
}

.countdown-label {
  color: var(--muted);
  margin-top: 0;
}

.panel-status {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg);
}

/* The grid sits on a wrapper div, not the <dl> itself: changing a definition
   list's display can strip the term/definition pairing in some screen readers. */
.connect {
  max-width: 42rem;
  margin: 0 0 1rem;
}

.connect > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.25rem 1rem;
  margin-bottom: 0.25rem;
}

.connect dt {
  font-weight: 700;
  color: var(--fg);
}

.connect dd {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.connect code {
  font-size: 1rem;
  color: var(--fg);
  background: var(--surface);
  padding: 0.1rem 0.35rem;
  border-radius: 0.2rem;
}

.button {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  border: 2px solid var(--link);
  border-radius: 0.25rem;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: var(--link);
  color: var(--bg);
  text-decoration: none;
}

.project-note {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.panel-live {
  border-left-color: var(--link);
}

/* The current page can be a link inside the collapsed Games menu, so the
   toggle carries the marker too. */
.menu-toggle[aria-current] {
  color: var(--fg);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.3em;
}
