/* Ethical Games site. One stylesheet, our own font, no external requests.
   Bump ?v=N in tools/chrome.py (CSS) and re-run the page scripts when this changes: it's cached for a day. */

@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-stretch: 75% 125%;
  font-display: swap;
}

:root {
  --felt: #0e4d3a;
  --felt-deep: #093426;
  --felt-ink: #ffffff;
  --night: #0d1a15;
  --gold: #f5c242;
  --gold-deep: #e0a91c;
  --bg: #fbfaf6;
  --tint: #f1efe6;
  --surface: #ffffff;
  --ink: #1b1f1d;
  --muted: #4a524e;
  --line: #d9ddd8;
  --link: #0b5d45;
  --link-hover: #073d2e;
  --accent: #b3261e;
  --focus: #f2b705;
  --shadow: 0 1px 2px rgba(16, 24, 20, 0.06), 0 8px 24px rgba(16, 24, 20, 0.08);
  --shadow-lg: 0 2px 4px rgba(16, 24, 20, 0.08), 0 18px 40px rgba(16, 24, 20, 0.16);
  --radius: 12px;
  --radius-lg: 20px;
  --measure: 42rem;
  --display: "Fredoka", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111513;
    --tint: #161c19;
    --surface: #1c2320;
    --ink: #eef1ee;
    --muted: #b6bfba;
    --line: #2f3833;
    --link: #7fd3b1;
    --link-hover: #b4ead3;
    --accent: #ff8a80;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.35), 0 18px 40px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #111513;
  --tint: #161c19;
  --surface: #1c2320;
  --ink: #eef1ee;
  --muted: #b6bfba;
  --line: #2f3833;
  --link: #7fd3b1;
  --link-hover: #b4ead3;
  --accent: #ff8a80;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.35), 0 18px 40px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif;
  font-size: 1.1875rem; /* 19px: comfortable for older eyes */
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

a {
  color: var(--link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--surface);
  color: var(--ink);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  z-index: 10;
}

.skip:focus {
  top: 1rem;
}

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

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

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

.center {
  text-align: center;
}

/* Icons (inline SVG) */

.ico {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
}

.ico-lg {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.6rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--link) 14%, transparent);
  color: var(--link);
  margin-bottom: 0.75rem;
}

.ico-play {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  fill: currentColor;
}

.ico-arrow {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  transition: transform 0.2s;
}

a:hover > .ico-arrow {
  transform: translateX(3px);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-lg {
  min-height: 56px;
  padding: 0.7rem 1.6rem;
  font-size: 1.2rem;
}

.btn-sm {
  min-height: 48px;
  padding: 0.45rem 1rem;
  font-size: 1rem;
}

.btn-primary {
  background: var(--gold);
  color: #1b1f1d;
  box-shadow: 0 4px 0 var(--gold-deep), 0 10px 24px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  color: #1b1f1d;
  background: #ffd261;
}

.btn-play {
  background: #101412;
  color: #fff;
  border-color: #101412;
}

.btn-play:hover {
  color: #fff;
  background: #24302b;
}

.btn-ghost {
  border-color: var(--line);
  color: var(--link);
  background: var(--surface);
}

.btn-ghost:hover {
  border-color: var(--link);
}

.btn-ghost-light {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.btn-ghost-light:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

/* Header */

.site-header {
  background: var(--felt);
  color: var(--felt-ink);
  position: relative;
  z-index: 5;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--felt-ink);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  text-decoration: none;
  min-height: 48px;
  margin-right: auto;
}

.brand:hover {
  color: var(--felt-ink);
}

.brand svg {
  width: 2.1rem;
  height: 2.1rem;
  flex: none;
}

.site-nav ul {
  display: flex;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.5rem;
  border-radius: 999px;
  color: var(--felt-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--felt-ink);
}

.site-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.18);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 999px;
  background: var(--gold);
  color: #1b1f1d;
  font-family: var(--display);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nav-cta:hover {
  background: #ffd261;
  color: #1b1f1d;
}

/* Language menu (header) and the offer of this page in the visitor's language (lang.js) */

.lang-pick {
  position: relative;
  border: 0;
  padding: 0;
}

.lang-pick > summary::before,
.lang-pick[open] > summary::before {
  content: none;
  display: none;
}

.lang-pick summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: var(--felt-ink);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.lang-pick summary::-webkit-details-marker {
  display: none;
}

.lang-pick summary::after {
  content: "";
  width: 0.45em;
  height: 0.45em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.15em) rotate(45deg);
  margin-left: 0.1rem;
}

.lang-pick[open] summary::after {
  transform: translateY(0.1em) rotate(-135deg);
}

.lang-pick summary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.lang-pick .ico {
  width: 1.25rem;
  height: 1.25rem;
}

.lang-pick ul {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 20;
  min-width: 13rem;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.lang-pick li + li {
  margin-top: 0;
}

.lang-pick ul a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.85rem;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.lang-pick ul a:hover {
  background: var(--tint);
}

.lang-pick ul a[aria-current="true"] {
  font-weight: 700;
  color: var(--link);
}

.lang-pick ul a[aria-current="true"]::after {
  content: "✓";
  margin-left: auto;
  padding-left: 1rem;
}

.lang-bar {
  background: var(--gold);
  color: #1b1f1d;
}

.lang-bar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 1rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.lang-bar a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #1b1f1d;
  font-weight: 700;
  text-underline-offset: 0.2em;
}

.lang-bar a::after {
  content: "→";
  margin-left: 0.4rem;
}

.lang-bar button {
  min-height: 44px;
  padding: 0 0.75rem;
  border: 0;
  background: none;
  color: #1b1f1d;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.lang-note {
  font-size: 0.85em;
  opacity: 0.8;
}

.site-footer .footer-langs {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1rem;
  margin: 0;
}

.footer-langs .ico {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--gold);
}

.footer-langs a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
}

.footer-langs a:hover {
  text-decoration: underline;
}

/* Russian, Chinese and Japanese: Fredoka has no Cyrillic or CJK, so their headings use the system font; and
   CJK text gets no negative letter spacing or capitals. */
:lang(ru),
:lang(zh-CN),
:lang(ja) {
  --display: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Hiragino Sans", "PingFang SC",
    "Microsoft YaHei", "Yu Gothic UI", "Meiryo", sans-serif;
}

:lang(zh-CN) h1,
:lang(zh-CN) h2,
:lang(ja) h1,
:lang(ja) h2,
:lang(zh-CN) .eyebrow,
:lang(ja) .eyebrow {
  letter-spacing: 0;
  line-break: strict;
}

:lang(zh-CN) .hero h1,
:lang(ja) .hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  line-height: 1.2;
  max-width: 16em;
}

:lang(de) .hero h1,
:lang(ru) .hero h1,
:lang(fr) .hero h1,
:lang(pt-BR) .hero h1,
:lang(es) .hero h1,
:lang(it) .hero h1 {
  hyphens: auto;
  overflow-wrap: break-word;
  max-width: 22ch;
}

@media (max-width: 68rem) {
  .site-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -1rem;
    padding: 0 0.6rem;
    width: calc(100% + 2rem);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  .site-nav::-webkit-scrollbar {
    display: none;
  }
}

/* Hero (all dark-green page tops) */

.hero {
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(245, 194, 66, 0.18), transparent 60%),
    radial-gradient(50rem 30rem at -10% 110%, rgba(127, 211, 177, 0.18), transparent 60%),
    linear-gradient(160deg, var(--felt) 0%, var(--felt-deep) 70%, #06231a 100%);
  color: var(--felt-ink);
  padding: 2.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(2.3rem, 6.5vw, 4rem);
  line-height: 1.05;
  margin: 0 0 1rem;
  letter-spacing: -0.015em;
  max-width: 18ch;
}

.hero p {
  font-size: 1.25rem;
  max-width: 38rem;
  margin: 0 0 1.5rem;
}

.hero a:not(.btn) {
  color: var(--felt-ink);
}

.eyebrow {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--link);
  margin: 0 0 0.5rem !important;
}

.hero .eyebrow,
.band-dark .eyebrow {
  color: var(--gold);
}

.hl {
  color: var(--gold);
}

.hero-lede {
  font-size: clamp(1.15rem, 2.2vw, 1.35rem) !important;
  opacity: 0.95;
}

.home-hero {
  padding: 3rem 0 4rem;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 56rem) {
  .hero-grid {
    grid-template-columns: 1.1fr 1fr;
  }
  .home-hero {
    padding: 4.5rem 0 5.5rem;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.hero-small {
  font-size: 1rem !important;
  opacity: 0.8;
  margin: 0 !important;
}

/* The fanned cards */

.hero-art {
  display: flex;
  justify-content: center;
}

.fan {
  position: relative;
  width: min(100%, 30rem);
  aspect-ratio: 5 / 3.6;
}

.fan-card {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 32%;
  transform-origin: 50% 120%;
  animation: deal 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.fan-card img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.4));
}

.fan-card:nth-child(1) { --r: -33deg; animation-delay: 0.05s; }
.fan-card:nth-child(2) { --r: -20deg; animation-delay: 0.12s; }
.fan-card:nth-child(3) { --r: -7deg; animation-delay: 0.19s; }
.fan-card:nth-child(4) { --r: 7deg; animation-delay: 0.26s; }
.fan-card:nth-child(5) { --r: 20deg; animation-delay: 0.33s; }
.fan-card:nth-child(6) { --r: 33deg; animation-delay: 0.4s; }

.fan-card {
  transform: translateX(-50%) rotate(var(--r));
}

@keyframes deal {
  from {
    transform: translateX(-50%) translateY(30%) rotate(0deg);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) rotate(var(--r));
    opacity: 1;
  }
}

/* Trust strip */

.trust {
  background: var(--night);
  color: #e8efe9;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.trust ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.75rem;
  list-style: none;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  margin: 0 auto;
  font-weight: 600;
  font-size: 1.05rem;
}

.trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
}

.trust .ico {
  color: var(--gold);
  width: 1.3rem;
  height: 1.3rem;
}

/* Bands (page sections) */

main {
  display: block;
  padding: 0 0 2rem;
}

.band {
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.band-tint {
  background: var(--tint);
}

.band-dark {
  background:
    radial-gradient(50rem 24rem at 100% 0%, rgba(245, 194, 66, 0.1), transparent 60%),
    var(--night);
  color: #eef1ee;
}

.band-dark a:not(.btn) {
  color: #b4ead3;
}

.band-dark .theme-card a {
  color: #fff;
}

.section-head {
  max-width: 44rem;
  margin-bottom: 2rem;
}

.section-head h2,
.band h2 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  margin: 0 0 0.75rem;
}

.section-head p {
  color: var(--muted);
  font-size: 1.2rem;
}

.band-dark .section-head p {
  color: #c4cdc8;
}

.sub-head {
  font-size: 1.6rem !important;
  margin: 3rem 0 1.25rem !important;
}

.split {
  display: grid;
  gap: 2rem 3rem;
  align-items: center;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: 1fr 1.15fr;
  }
  .split-media {
    grid-template-columns: 1.1fr 1fr;
  }
}

.narrow {
  max-width: 46rem;
}

.note {
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 2rem;
  max-width: 50rem;
}

/* Game cards (home) */

.game-group + .game-group {
  margin-top: 3rem;
}

.group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 1rem;
  margin-bottom: 1.25rem;
}

.group-head h3 {
  font-size: 1.5rem;
  margin: 0;
}

.group-head p {
  color: var(--muted);
  margin: 0;
}

.game-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-card {
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.gc-link {
  display: block;
  overflow: hidden;
}

.gc-art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 500;
  object-fit: cover;
  transition: transform 0.4s;
}

.game-card:hover .gc-art {
  transform: scale(1.03);
}

.gc-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem 1.15rem 1.15rem;
}

.gc-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: -2.4rem;
}

.gc-title .icon {
  flex: none;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 22%;
  border: 3px solid var(--surface);
  box-shadow: var(--shadow);
  background: var(--felt);
}

.gc-title div {
  padding-top: 1.6rem;
}

.gc-title h3 {
  font-size: 1.3rem;
  margin: 0;
}

.gc-title h3 a {
  color: var(--ink);
  text-decoration: none;
}

.gc-title h3 a:hover {
  color: var(--link);
  text-decoration: underline;
}

.gc-kind {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.gc-tag {
  margin: 0.75rem 0 1rem;
  font-size: 1.05rem;
}

.gc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

/* Feature grid and comparison */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-grid li {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
}

.feature-grid .ico {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--link) 14%, transparent);
  color: var(--link);
}

.feature-grid h3 {
  font-size: 1.25rem;
  margin: 0.75rem 0 0.35rem;
}

.feature-grid p {
  margin: 0;
  color: var(--muted);
}

.compare {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.compare table {
  margin: 0;
  font-size: 1.02rem;
}

.compare th,
.compare td {
  padding: 0.8rem 1rem;
  vertical-align: middle;
}

.compare thead th {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  background: var(--tint);
}

.compare thead th:last-child {
  background: var(--felt);
  color: #fff;
}

.compare tbody th {
  font-weight: 700;
}

.compare td.them {
  color: var(--muted);
}

.compare td.us {
  font-weight: 700;
  background: color-mix(in srgb, var(--link) 8%, transparent);
}

.compare td.us .ico {
  width: 1.15rem;
  height: 1.15rem;
  margin-right: 0.35rem;
  vertical-align: -0.15em;
  color: var(--link);
  stroke-width: 3;
}

.compare tr:last-child th,
.compare tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 34rem) {
  .compare th,
  .compare td {
    padding: 0.65rem 0.6rem;
    font-size: 0.95rem;
  }
}

/* Theme cards */

.theme-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1.25rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.theme-cards-lg {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}

.theme-card {
  margin: 0 !important;
}

.theme-card a {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 4 / 3.3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

.tc-table {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.5s;
}

.theme-card a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.78));
}

.tc-fan {
  position: absolute;
  left: 50%;
  top: 12%;
  width: 62%;
  height: 62%;
  transform: translateX(-50%);
}

.tc-card {
  position: absolute;
  left: 50%;
  top: 0;
  width: 38%;
  transform-origin: 50% 110%;
  transition: transform 0.35s;
}

.tc-card img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.4));
}

.tc-card:nth-child(1) { transform: translateX(-50%) rotate(-14deg) translateX(-30%); }
.tc-card:nth-child(2) { transform: translateX(-50%) translateY(-4%); z-index: 1; }
.tc-card:nth-child(3) { transform: translateX(-50%) rotate(14deg) translateX(30%); }

.theme-card a:hover .tc-card:nth-child(1) { transform: translateX(-50%) rotate(-20deg) translateX(-42%); }
.theme-card a:hover .tc-card:nth-child(2) { transform: translateX(-50%) translateY(-10%); }
.theme-card a:hover .tc-card:nth-child(3) { transform: translateX(-50%) rotate(20deg) translateX(42%); }
.theme-card a:hover .tc-table { transform: scale(1.06); }

.tc-text {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.15rem;
  line-height: 1.3;
}

.tc-text strong {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.45rem;
}

.tc-text span {
  font-size: 1rem;
  opacity: 0.92;
}

.icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.icon-row li {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 6.5rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
}

.icon-row img {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 22%;
  box-shadow: var(--shadow);
}

/* Phones (screenshots in a frame) */

.phones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.phone {
  margin: 0;
  width: min(15rem, 70vw);
}

.phones .phone {
  width: min(13.5rem, 44vw);
}

.phone-sm {
  width: 9.5rem !important;
}

.phone-frame {
  border-radius: 1.6rem;
  padding: 0.45rem;
  background: #161a18;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.phone-sm .phone-frame {
  border-radius: 1.1rem;
  padding: 0.3rem;
}

.phone-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.2rem;
}

.phone-sm .phone-frame img {
  border-radius: 0.85rem;
}

.phone figcaption {
  margin-top: 0.6rem;
  font-size: 1rem;
  text-align: center;
  line-height: 1.35;
  font-weight: 600;
}

/* A sideways-scrolling row that runs to the screen edges */

.strip {
  --gutter: max(1rem, calc((100vw - 72rem) / 2 + 1rem));
  overflow-x: auto;
  scroll-padding-inline: var(--gutter);
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  padding: 0.5rem 0 1.25rem;
  scrollbar-color: var(--line) transparent;
}

.strip:focus-visible {
  outline-offset: -3px;
}

.strip ul {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  width: max-content;
  margin: 0;
  padding: 0 var(--gutter);
  list-style: none;
}

.strip li {
  margin: 0;
  scroll-snap-align: start;
}

.strip .phone {
  width: 12.5rem;
}

.band-dark .strip {
  scrollbar-color: #3a4640 transparent;
}

/* Feature rows (promise, accessibility) */

.feature-row {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.feature-row:nth-of-type(even) {
  background: var(--tint);
}

.feature-row-grid {
  display: grid;
  gap: 2rem 3rem;
  align-items: center;
}

@media (min-width: 52rem) {
  .feature-row-grid {
    grid-template-columns: 1.2fr 1fr;
  }
  .feature-row.flip .feature-copy {
    order: 2;
  }
}

.feature-copy {
  max-width: 36rem;
}

.feature-copy h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.3rem);
  margin: 0 0 0.75rem;
}

.feature-row > .wrap > .phone {
  justify-self: center;
}

.ticks {
  padding-left: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding-left: 2rem;
}

.ticks li + li {
  margin-top: 0.6rem;
}

.ticks li::before {
  content: "✓";
  position: absolute;
  left: 0.2rem;
  top: 0;
  color: var(--link);
  font-weight: 700;
}

.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.jump a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}

.jump a:hover {
  background: rgba(255, 255, 255, 0.22);
}

.page-hero {
  padding: 3rem 0 3.5rem;
}

/* Theme pages */

.theme-hero {
  padding: 1.5rem 0 3.5rem;
  isolation: isolate;
}

.theme-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.theme-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(5, 12, 9, 0.85) 0%, rgba(5, 12, 9, 0.6) 55%, rgba(5, 12, 9, 0.25));
}

.theme-hero-grid {
  display: grid;
  gap: 1.5rem 3rem;
  align-items: center;
}

@media (min-width: 52rem) {
  .theme-hero-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.theme-hero-art img {
  display: block;
  width: min(100%, 26rem);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.5));
}

.names {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.names h3 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
}

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

.name-list li {
  margin: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  font-weight: 600;
}

.name-list span {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(28%, 9.5rem), 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-grid.aces {
  grid-template-columns: repeat(auto-fill, minmax(min(40%, 11rem), 1fr));
  max-width: 52rem;
}

.card-grid li {
  margin: 0;
}

.card-grid img,
.deck-row img,
.back-card img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 2px rgba(16, 24, 20, 0.12)) drop-shadow(0 6px 10px rgba(16, 24, 20, 0.14));
  transition: transform 0.25s, filter 0.25s;
}

.card-grid img:hover {
  transform: translateY(-6px) rotate(-1.5deg) scale(1.04);
  filter: drop-shadow(0 4px 4px rgba(16, 24, 20, 0.14)) drop-shadow(0 14px 20px rgba(16, 24, 20, 0.2));
}

.deck {
  margin: 0;
  padding: 0;
  list-style: none;
}

.suit-row {
  margin: 0 0 1.75rem !important;
}

.suit-row h3 {
  font-size: 1.15rem;
  margin: 0 0 0.6rem;
}

.deck-row {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.deck-row li {
  margin: 0;
}

@media (max-width: 52rem) {
  .deck-row {
    grid-template-columns: repeat(auto-fill, minmax(4.25rem, 1fr));
  }
}

.back-card {
  width: 10rem;
  text-align: center;
  font-weight: 600;
}

.back-card p {
  margin: 0.5rem 0 0;
}

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

.tile-grid li {
  margin: 0;
}

.tile-grid img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.2));
  transition: transform 0.2s;
}

.tile-grid img:hover {
  transform: translateY(-4px) scale(1.06);
}

.mines-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mines-row li {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.mines-row img {
  width: 6rem;
  height: auto;
  background: var(--tint);
  border-radius: 16px;
  padding: 0.5rem;
}

/* Languages */

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lang-grid li {
  margin: 0;
  display: flex;
}

.lang-grid a {
  flex: 1;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow);
}

.lang-grid a:hover {
  border-color: var(--link);
  box-shadow: var(--shadow-lg);
}

.lang-grid a[aria-current="page"] {
  border: 2px solid var(--link);
}

.lang-native {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.25;
}

.lang-en {
  color: var(--muted);
  font-size: 0.95rem;
}

.lang-hello {
  margin-top: 0.6rem;
  color: var(--link);
  font-weight: 600;
}

.names-table th,
.names-table td {
  white-space: nowrap;
}

/* Final call to action */

.band-cta {
  background:
    radial-gradient(40rem 20rem at 50% 0%, rgba(245, 194, 66, 0.2), transparent 70%),
    linear-gradient(180deg, var(--felt), var(--felt-deep));
  color: #fff;
  text-align: center;
}

.band-cta h2 {
  margin-bottom: 0.25rem;
}

.band-cta a:not(.btn) {
  color: #fff;
}

.cta-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 0.75rem;
  margin: 2rem auto;
  padding: 0;
  list-style: none;
  max-width: 56rem;
}

.cta-icons li {
  margin: 0;
}

.cta-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  width: 6.5rem;
  padding: 0.5rem 0.25rem;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.25;
}

.cta-icon:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cta-icon .icon {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 22%;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s;
}

.cta-icon:hover .icon {
  transform: translateY(-3px) scale(1.05);
}

.cta-help {
  max-width: 40rem;
  margin: 0 auto;
  opacity: 0.9;
}

/* Prose pages: support, privacy, terms */

.prose {
  max-width: var(--measure);
}

main h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 0 0 0.5rem;
}

main > .wrap.prose,
main > .wrap > .prose:first-child {
  padding-top: 2.5rem;
}

main h2 {
  font-size: 1.6rem;
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.25rem;
}

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

.lede {
  font-size: 1.3rem;
  color: var(--muted);
}

.updated {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}

.summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 6px solid var(--felt);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 0 0 2rem;
}

.summary h2 {
  margin-top: 0;
  font-size: 1.3rem;
}

.summary ul {
  margin-bottom: 0;
}

.toc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin: 0 0 2rem;
  font-size: 1.05rem;
}

.toc h2 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.4rem;
}

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

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

th {
  font-weight: 700;
}

.table-scroll {
  overflow-x: auto;
}

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

.contact-card p:last-child {
  margin-bottom: 0;
}

.email {
  font-size: 1.25rem;
  font-weight: 700;
  word-break: break-word;
}

details {
  border-bottom: 1px solid var(--line);
  padding: 0.25rem 0;
}

summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "+";
  flex: none;
  width: 1.5rem;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--link);
}

details[open] > summary::before {
  content: "\2212";
}

details > div {
  padding: 0 0 0.75rem 1.5rem;
}

details > div > p:last-child {
  margin-bottom: 0;
}

/* Game pages */

.section {
  padding-top: 3rem;
}

.section > h2 {
  margin-top: 0;
}

.promises {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.promises li {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
}

.promises h3 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.promises p {
  margin: 0;
  color: var(--muted);
}

.game-hero {
  padding: 1.25rem 0 2.25rem;
}

.crumb {
  font-size: 1rem !important;
  margin: 0 0 1rem !important;
}

.crumb a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}

.crumb a::before {
  content: "‹";
  margin-right: 0.4rem;
}

.game-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.game-title .icon {
  flex: none;
  display: block;
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 22%;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.game-title h1 {
  margin: 0;
  max-width: none;
  font-size: clamp(2rem, 5.5vw, 3.2rem);
}

.game-hero .game-title .kind {
  margin: 0;
  font-size: 1.15rem;
  opacity: 0.85;
}

.store-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.game-hero .btn-play {
  background: #fff;
  color: #101412;
  border-color: #fff;
}

.game-hero .btn-play:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #101412;
}

.gallery {
  background: linear-gradient(var(--felt-deep), var(--bg) 85%);
  padding: 1.5rem 0 0.5rem;
}

.hint-scroll {
  color: var(--felt-ink);
  font-size: 1rem;
  margin: 0 0 0.75rem;
  opacity: 0.85;
}

.shots {
  --gutter: max(1rem, calc((100vw - 72rem) / 2 + 1rem));
  overflow-x: auto;
  scroll-padding-inline: var(--gutter);
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  padding: 0.5rem 0 1.25rem;
  scrollbar-color: var(--line) transparent;
}

.shots:focus-visible {
  outline-offset: -3px;
}

.shots ul {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  width: max-content;
  margin: 0;
  padding: 0 var(--gutter);
  list-style: none;
}

.shots li {
  margin: 0;
  scroll-snap-align: start;
}

.shot {
  margin: 0;
  width: min(15rem, 70vw);
}

.shot.wide {
  width: min(32rem, 88vw);
}

.shot a {
  display: block;
  border-radius: 1.4rem;
  padding: 0.45rem;
  background: #161a18;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1rem;
}

.shot figcaption {
  margin-top: 0.7rem;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink);
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
}

.pager a {
  display: flex;
  flex-direction: column;
  min-height: 48px;
  padding: 0.75rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  font-weight: 700;
}

.pager a:last-child {
  text-align: right;
  margin-left: auto;
}

.pager span {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 400;
}

/* Footer */

.site-footer {
  background: var(--night);
  color: #c4cdc8;
  padding: 3rem 0 2.5rem;
  font-size: 1rem;
}

.site-footer .wrap {
  display: grid;
  gap: 2rem;
}

@media (min-width: 52rem) {
  .site-footer .wrap {
    grid-template-columns: 1fr 2fr;
  }
}

.site-footer a {
  color: #e8efe9;
}

.site-footer .brand {
  color: #fff;
  margin: 0 0 0.5rem;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1.5rem;
}

.footer-cols h2 {
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.5rem;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-cols a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
}

.footer-cols a:hover {
  text-decoration: underline;
}

.footer-games {
  columns: 2;
  column-gap: 1rem;
}

.site-footer .legal {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.25rem;
  margin: 0;
  font-size: 0.95rem;
}

@media (max-width: 40rem) {
  body {
    font-size: 1.125rem;
  }
  .hero {
    padding: 1.75rem 0 2.5rem;
  }
  .btn-lg {
    width: 100%;
  }
  .nav-cta {
    padding: 0 0.85rem;
    font-size: 0.95rem;
  }
  .lang-pick summary {
    padding: 0 0.6rem;
  }
}

/* A phone has no room for the logo, the language menu and this button in one row; the menu's Games link
   goes to the same place. */
@media (max-width: 30rem) {
  .nav-cta {
    display: none;
  }
  .brand {
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip,
  .toc,
  .trust {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }
  a {
    color: #000;
  }
}
