:root {
  /* One palette for every visitor: the night-sky look, whatever the OS colour scheme says. */
  color-scheme: dark;
  --sky-top: #141d66;
  --sky-bottom: #4d44a4;
  --ink: #f2f3ff;
  --ink-soft: #c5c8ea;
  --ink-dark: #1f2440;
  --card: #23285a;
  --card-edge: rgba(255, 255, 255, 0.1);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 16px 36px rgba(0, 0, 0, 0.45);
  --red: #ff4f5e;
  --red-deep: #c93545;
  --blue: #3f8cff;
  --blue-deep: #2a63c0;
  --badge: #ffd23f;
  --muted: #3a4080;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100vh;
  /* sky to horizon over the first screenful, then the horizon colour (fixed backgrounds misbehave on phones) */
  background: linear-gradient(180deg, var(--sky-top) 0, var(--sky-bottom) 760px) no-repeat;
  background-color: var(--sky-bottom);
  color: var(--ink);
  /* CW Emoji first: the same Noto emoji on every system (public/fonts/cw-emoji.css) */
  font-family: 'CW Emoji', 'Baloo 2', system-ui, sans-serif;
  font-weight: 500;
  line-height: 1.35;
}

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 16px 40px;
}

.hero {
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 0 rgba(31, 36, 64, 0.35);
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  font-weight: 800;
  margin: 0;
  letter-spacing: 0.01em;
}

.balloon {
  display: inline-block;
  animation: bob 3.2s ease-in-out infinite;
}

@keyframes bob {
  50% {
    transform: translateY(-8px) rotate(4deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .balloon {
    animation: none;
  }
}

.tagline {
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  margin: 4px auto 14px;
  max-width: 34em;
}

.online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(31, 36, 64, 0.35);
  font-weight: 700;
  text-shadow: none;
}

.online[hidden] {
  display: none;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 4px;
}

.dot.red {
  background: var(--red);
}

.dot.blue {
  background: var(--blue);
}

.online-label {
  margin-left: 4px;
  font-weight: 500;
}

.versions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 760px) {
  .versions {
    grid-template-columns: 1.15fr 1fr;
    align-items: start;
  }
}

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.card:focus-visible {
  outline: 3px solid var(--badge);
  outline-offset: 3px;
}

.card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card-body {
  padding: 16px 20px 20px;
}

.card h2 {
  margin: 6px 0 4px;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.15;
}

.card p {
  margin: 0 0 16px;
  color: var(--ink-soft);
}

.badge {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--badge);
  color: var(--ink-dark);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge.muted {
  background: var(--muted);
  color: var(--ink);
}

.button {
  display: inline-block;
  padding: 8px 22px 6px;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 4px 0 var(--edge);
}

.button.red {
  background: var(--red);
  --edge: var(--red-deep);
}

.button.blue {
  background: var(--blue);
  --edge: var(--blue-deep);
}

.downloads {
  margin-top: 34px;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 18px 20px 14px;
}

.downloads h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 800;
}

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

@media (min-width: 640px) {
  .download-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.download {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--muted);
  color: inherit;
  text-decoration: none;
}

.download .icon {
  grid-row: span 2;
  font-size: 1.8rem;
}

.download .name {
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.1;
}

.download .meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.download[aria-disabled="true"] {
  opacity: 0.55;
  cursor: default;
}

.download:not([aria-disabled="true"]):hover,
.download:not([aria-disabled="true"]):focus-visible {
  background: var(--badge);
  color: var(--ink-dark);
}

.download:not([aria-disabled="true"]):hover .meta,
.download:not([aria-disabled="true"]):focus-visible .meta {
  color: var(--ink-dark);
}

.fine {
  margin: 12px 2px 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.footer {
  margin-top: 26px;
  text-align: center;
  color: var(--ink-soft);
}

/* The Steam Deck guide (/steamdeck/) */

.crumb {
  margin: 0 0 6px;
  font-weight: 700;
}

.crumb a {
  color: var(--ink-soft);
  text-decoration: none;
}

.crumb a:hover,
.crumb a:focus-visible {
  color: var(--badge);
}

.download-button {
  text-decoration: none;
  margin-top: 6px;
}

.download-button[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.download-button:focus-visible {
  outline: 3px solid var(--badge);
  outline-offset: 3px;
}

.download-meta {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-shadow: none;
}

.guide-card {
  margin-top: 20px;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 18px 22px;
}

.guide-card h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 800;
}

.guide-card p {
  margin: 0 0 10px;
  color: var(--ink-soft);
}

.guide-card em {
  font-style: normal;
  font-weight: 700;
  color: var(--ink);
}

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  column-gap: 12px;
}

.steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--badge);
  color: var(--ink-dark);
  font-weight: 800;
  font-size: 1.15rem;
  display: grid;
  place-items: center;
}

.steps h3 {
  margin: 2px 0 2px;
  font-size: 1.1rem;
  font-weight: 800;
}

.steps p {
  margin: 0;
}

.guide-split {
  display: grid;
  gap: 18px;
}

@media (min-width: 760px) {
  .guide-split {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.guide-split img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

kbd {
  display: inline-block;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--ink-dark);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.85em;
  line-height: 1.5;
}

code {
  font-family: inherit;
  font-weight: 700;
  color: var(--ink);
  background: rgba(12, 16, 64, 0.45);
  padding: 0 6px;
  border-radius: 6px;
  overflow-wrap: anywhere;
}
