:root {
  color-scheme: light;
  --page: #ead6c4;
  --paper: #f3ebe0;
  --paper-strong: #fbf5ed;
  --ink: #20130c;
  --ink-soft: #6f5948;
  --orange: #ff6718;
  --orange-deep: #ff5a06;
  --lime: #d9f022;
  --pink: #e7a7d5;
  --purple: #5b48c4;
  --cream: #efe6dc;
  --white: #fff8ef;
  --border: #20130c;
  --shadow: 6px 6px 0 #20130c;
  --radius-xl: 34px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 16px;
  --max-width: 1280px;
  --font-display: "Arial Black", Impact, "Trebuchet MS", sans-serif;
  --font-body: "Trebuchet MS", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 249, 241, 0.85), transparent 24%),
    radial-gradient(circle at 82% 12%, rgba(255, 193, 124, 0.48), transparent 18%),
    linear-gradient(180deg, #e8d3c0 0%, #ecdccc 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.page-shell {
  position: relative;
  overflow: clip;
  padding: 0 0 2rem;
}

.ambient {
  position: fixed;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.9;
}

.ambient-a {
  top: -4rem;
  left: -8rem;
  width: 22rem;
  height: 22rem;
  background: rgba(255, 247, 234, 0.9);
  animation: floatA 16s ease-in-out infinite;
}

.ambient-b {
  top: 2rem;
  right: -9rem;
  width: 24rem;
  height: 24rem;
  background: rgba(255, 193, 124, 0.45);
  animation: floatB 18s ease-in-out infinite;
}

.topbar,
.overview,
.catalog-stage,
.page-footer {
  width: min(calc(100% - 2rem), var(--max-width));
  margin-inline: auto;
}

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.9rem;
  padding: 0.8rem 1rem;
  border: 4px solid var(--border);
  border-radius: 999px;
  background: var(--lime);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.brand-mark {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  border: 3px solid var(--border);
  border-radius: 999px;
  background: var(--orange);
}

.brand-copy {
  display: grid;
  gap: 0.06rem;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 1rem;
  text-transform: uppercase;
  line-height: 1;
}

.brand-copy span {
  color: rgba(32, 19, 12, 0.72);
  font-size: 0.78rem;
}

.topbar-links {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.repo-link,
.button,
.filter-chip,
.table-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--border);
  border-radius: 999px;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.repo-link,
.button {
  min-height: 3.2rem;
  padding: 0 1.45rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  background: var(--paper-strong);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--border);
}

.repo-link svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.repo-link {
  gap: 0.55rem;
}

.repo-link:hover,
.button:hover,
.filter-chip:hover {
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 var(--border);
}

.overview {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.78fr) minmax(260px, 0.82fr);
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.4rem;
  padding: 1rem 1.1rem;
  border: 4px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--pink);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-word {
  position: absolute;
  inset: 2.3rem auto auto 50%;
  transform: translateX(-18%);
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 9vw, 6rem);
  line-height: 0.9;
  color: rgba(255, 248, 239, 0.9);
  letter-spacing: -0.06em;
  pointer-events: none;
}

.overview-copy,
.overview-stats,
.overview-art {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: rgba(32, 19, 12, 0.75);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.overview h1,
.section-heading h2,
.footer-brand {
  margin: 0;
  font-family: var(--font-display);
  line-height: 0.96;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.overview h1 {
  max-width: 10ch;
  font-size: clamp(1.45rem, 3vw, 2.55rem);
}

.overview-text {
  max-width: 31rem;
  margin: 0.45rem 0 0;
  color: rgba(32, 19, 12, 0.76);
  font-size: 0.9rem;
  line-height: 1.35;
}

.overview-actions {
  margin-top: 0.7rem;
}

.hero-button {
  min-height: 2.7rem;
  padding-inline: 1.1rem;
  background: var(--purple);
}

.overview-art {
  position: relative;
  min-height: 150px;
}

.art-card,
.art-orb,
.art-pill,
.art-label {
  position: absolute;
  border: 4px solid var(--border);
}

.art-card {
  border-radius: 28px;
}

.art-card-back {
  top: 0.2rem;
  right: 0.5rem;
  width: 6.8rem;
  height: 8.2rem;
  background: linear-gradient(180deg, var(--lime), #e6fb6d);
  transform: rotate(15deg);
}

.art-card-front {
  left: 0.6rem;
  top: 1.9rem;
  width: 6.2rem;
  height: 7.6rem;
  background: var(--paper-strong);
  transform: rotate(-10deg);
}

.art-orb {
  border-radius: 999px;
}

.art-orb-orange {
  right: 0.2rem;
  bottom: 0.2rem;
  width: 3.8rem;
  height: 3.8rem;
  background: radial-gradient(circle at 48% 48%, #ffd88f 0 26%, #ffb128 27% 58%, #fff3d9 59% 100%);
}

.art-orb-lime {
  left: 3.6rem;
  bottom: 0.4rem;
  width: 2.9rem;
  height: 4.6rem;
  border-radius: 60% 60% 50% 50%;
  background: var(--lime);
  transform: rotate(18deg);
}

.art-label {
  left: 1.7rem;
  top: 3.8rem;
  min-width: 3.7rem;
  min-height: 2.4rem;
  padding: 0 0.7rem;
  border-radius: 16px;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.45rem;
  box-shadow: 5px 5px 0 rgba(32, 19, 12, 0.16);
}

.art-pill {
  border-radius: 999px;
}

.art-pill-purple {
  left: 0.2rem;
  bottom: 0.8rem;
  width: 4.6rem;
  height: 1.2rem;
  background: var(--purple);
}

.art-pill-orange {
  right: 1.7rem;
  top: 1.2rem;
  width: 3.5rem;
  height: 1.2rem;
  background: var(--orange);
}

.overview-stats {
  align-self: stretch;
}

.stat-grid {
  display: grid;
  gap: 0.55rem;
}

.stat-card {
  padding: 0.6rem 0.75rem;
  border: 4px solid var(--border);
  border-radius: 22px;
  box-shadow: 4px 4px 0 rgba(32, 19, 12, 0.12);
}

.stat-card:nth-child(1) {
  background: var(--paper-strong);
}

.stat-card:nth-child(2) {
  background: var(--lime);
}

.stat-card:nth-child(3) {
  background: #cdc4ff;
}

.stat-label {
  display: block;
  margin-bottom: 0.25rem;
  color: rgba(32, 19, 12, 0.66);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stat-card strong {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1;
}

.section {
  padding: 1.5rem 0 0;
}

.catalog-stage {
  margin-top: 1.2rem;
  padding: 1.6rem 1.3rem 1.4rem;
  border: 4px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--orange);
  box-shadow: var(--shadow);
}

.section-heading h2 {
  max-width: none;
  font-size: clamp(1.1rem, 1.8vw, 1.7rem);
  color: var(--white);
  white-space: nowrap;
}

.catalog-stage .eyebrow {
  color: rgba(255, 248, 239, 0.78);
}

.filters {
  margin-top: 1rem;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.filter-chip {
  min-height: 2.85rem;
  padding: 0 1.05rem;
  gap: 0.5rem;
  cursor: pointer;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.84rem;
  box-shadow: 4px 4px 0 rgba(32, 19, 12, 0.14);
}

.filter-chip[data-active="true"] {
  background: var(--lime);
}

.filter-chip.program-claude {
  background: #f6e6d8;
  color: #86442a;
}

.filter-chip.program-codex {
  background: #f0f0ed;
  color: #23201d;
}

.filter-chip.program-copilot {
  background: linear-gradient(135deg, #f7e8ff, #f6d7c9);
  color: #5d28a8;
}

.filter-chip.program-gemini {
  background: linear-gradient(135deg, #e4eeff, #f7ddff);
  color: #4a58d8;
}

.filter-chip.program-default {
  background: #fff8ef;
  color: var(--ink);
}

.filter-chip[data-active="true"].program-claude {
  background: #e6b89b;
}

.filter-chip[data-active="true"].program-codex {
  background: #d9d8d2;
}

.filter-chip[data-active="true"].program-copilot {
  background: linear-gradient(135deg, #dfc6ff, #ffbfaa);
}

.filter-chip[data-active="true"].program-gemini {
  background: linear-gradient(135deg, #c7dcff, #e5c7ff);
}

.table-shell {
  margin-top: 1rem;
  overflow: hidden;
  border: 4px solid var(--border);
  border-radius: 30px;
  background: var(--paper);
}

.games-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.games-table th,
.games-table td {
  padding: 1rem 1.1rem;
  text-align: left;
  border-bottom: 3px solid var(--border);
  vertical-align: middle;
}

.games-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--lime);
  font-family: var(--font-display);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.games-table th:nth-child(1),
.games-table td:nth-child(1) {
  width: 26%;
}

.games-table th:nth-child(2),
.games-table td:nth-child(2) {
  width: 34%;
}

.games-table th:nth-child(3),
.games-table td:nth-child(3) {
  width: 20%;
}

.games-table th:nth-child(4),
.games-table td:nth-child(4) {
  width: 20%;
}

.game-row:hover td {
  background: #fff4d6;
}

.games-table tbody tr:last-child td {
  border-bottom: 0;
}

.games-table td:first-child {
  font-size: 1rem;
}

.games-table td[data-updated-at] {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  white-space: nowrap;
}

.table-badge {
  min-height: 2.25rem;
  padding: 0 0.9rem;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 rgba(32, 19, 12, 0.12);
}

.badge-icon {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.badge-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.table-badge-program {
  background: #fff8ef;
}

.table-badge-model {
  background: #d2c8ff;
}

.table-badge.program-claude {
  background: #f6e6d8;
  color: #86442a;
}

.table-badge-model.program-claude {
  background: #f0dccd;
}

.table-badge.program-codex {
  background: #f0f0ed;
  color: #23201d;
}

.table-badge-model.program-codex {
  background: #e4e4df;
}

.table-badge.program-copilot {
  background: linear-gradient(135deg, #f7e8ff, #f6d7c9);
  color: #5d28a8;
}

.table-badge-model.program-copilot {
  background: linear-gradient(135deg, #e2d2ff, #ffd7c4);
}

.table-badge.program-gemini {
  background: linear-gradient(135deg, #e4eeff, #f7ddff);
  color: #4a58d8;
}

.table-badge-model.program-gemini {
  background: linear-gradient(135deg, #d7e6ff, #edd5ff);
}

.actions-col,
.actions-cell {
  width: 1%;
  white-space: nowrap;
}

.button-inline {
  min-height: 2.65rem;
  padding-inline: 1.05rem;
  background: var(--purple);
  color: var(--white);
  box-shadow: 4px 4px 0 var(--border);
}

.error-state {
  padding: 1rem 1.1rem;
  background: #ffd5c6;
  color: #7a2100;
}

.page-footer {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem 2rem;
  margin-top: 1.2rem;
  padding: 1.1rem 1.3rem;
  border: 4px solid var(--border);
  border-radius: 28px;
  background: var(--lime);
  box-shadow: var(--shadow);
}

.footer-brand {
  font-size: clamp(1.4rem, 3vw, 2.3rem);
}

.footer-copy {
  justify-self: end;
  font-family: var(--font-display);
  font-size: 1rem;
  text-transform: uppercase;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes floatA {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(1.5rem, -0.8rem, 0);
  }
}

@keyframes floatB {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(-1.6rem, 1rem, 0);
  }
}

@media (max-width: 1080px) {
  .overview {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  }

  .overview-stats {
    grid-column: 1 / -1;
  }

  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .topbar,
  .overview,
  .catalog-stage,
  .page-footer {
    width: min(calc(100% - 1rem), var(--max-width));
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.9rem;
    border-radius: 30px;
  }

  .topbar-links {
    width: 100%;
    flex-direction: column;
  }

  .repo-link {
    justify-content: center;
    width: 100%;
  }

  .overview {
    grid-template-columns: 1fr;
    padding-top: 1rem;
  }

  .hero-word {
    inset: 4.6rem auto auto 1rem;
    transform: none;
    font-size: clamp(2.8rem, 16vw, 4.8rem);
  }

  .overview-art {
    min-height: 140px;
  }

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

  .page-footer {
    grid-template-columns: 1fr;
  }

  .footer-copy {
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .catalog-stage {
    padding: 1.1rem 0.85rem 1rem;
  }

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

  .games-table {
    min-width: 690px;
  }

  .games-table th,
  .games-table td {
    padding: 0.9rem;
  }
}

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

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
