:root {
  color-scheme: light dark;
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-strong: #f4f4f5;
  --text: #09090b;
  --muted: #52525b;
  --border: #e4e4e7;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #dbeafe;
  --shadow: 0 24px 60px rgb(15 23 42 / 0.08);
  --radius: 24px;
  --shell: min(1120px, calc(100vw - 32px));
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b;
    --surface: #18181b;
    --surface-strong: #27272a;
    --text: #fafafa;
    --muted: #c4c4cc;
    --border: #3f3f46;
    --accent: #60a5fa;
    --accent-strong: #93c5fd;
    --accent-soft: #172554;
    --shadow: 0 24px 60px rgb(0 0 0 / 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, var(--accent-soft), transparent 34rem), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

body::selection {
  background: var(--accent);
  color: #fff;
}

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

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

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-150%);
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  padding: 10px 14px;
}

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

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid color-mix(in srgb, var(--border), transparent 20%);
  background: color-mix(in srgb, var(--bg), transparent 12%);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 16px;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.18rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.site-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--muted);
  font-weight: 650;
  transition: color 180ms ease, background 180ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--surface-strong);
  color: var(--text);
}

.hero {
  padding: clamp(36px, 6vw, 64px) 0 clamp(28px, 5vw, 48px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}

.eyebrow,
.panel-kicker,
.card-meta {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.055em;
  line-height: 1.05;
}

h1 {
  max-width: 12ch;
  font-size: clamp(3.25rem, 10vw, 7.4rem);
}

.hero h1 {
  max-width: 16ch;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
}

h2 {
  max-width: 16ch;
  font-size: clamp(2.1rem, 5vw, 4rem);
}

h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
}

.hero-text,
.page-hero p,
.content-card p,
.feature-card p,
.game-header p,
.empty-panel p {
  color: var(--muted);
}

.hero-text {
  max-width: 62ch;
  margin: 18px 0 0;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
}

.hero-actions,
.guess-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-actions {
  margin-top: 22px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

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

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button.secondary {
  background: var(--surface);
  color: var(--text);
}

.hero-panel,
.empty-panel,
.game-card,
.content-card,
.feature-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface), transparent 4%);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 28px;
}

.stat-list {
  margin: 0;
  display: grid;
  gap: 18px;
}

.stat-list div {
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.stat-list dt {
  color: var(--muted);
  font-weight: 700;
}

.stat-list dd {
  margin: 2px 0 0;
  font-size: 1.4rem;
  font-weight: 850;
}

.section-block {
  padding-block: 56px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  min-height: 220px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 180ms ease, border-color 180ms ease;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.feature-card span {
  font-size: 1.45rem;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.post-list {
  display: grid;
  gap: 16px;
}

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

.content-card {
  min-height: 190px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.content-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.content-card {
  position: relative;
}

.text-link {
  width: fit-content;
  color: var(--accent);
  font-weight: 800;
}

.page-hero {
  padding: clamp(56px, 8vw, 96px) 0 24px;
}

.page-hero h1 {
  max-width: 13ch;
}

.page-hero.narrow h1,
.page-hero.narrow p {
  max-width: 760px;
}

.page-hero time {
  display: inline-block;
  margin-top: 16px;
  color: var(--muted);
  font-weight: 700;
}

.single-page {
  padding-bottom: 72px;
}

.content-body {
  max-width: 760px;
  color: var(--text);
}

.content-body p,
.content-body li {
  color: var(--muted);
}

.content-body a {
  color: var(--accent);
  font-weight: 700;
}

.content-body img {
  max-width: 100%;
  border-radius: 18px;
  border: 1px solid var(--border);
}

.empty-panel {
  padding: 32px;
}

.empty-panel h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.game-card {
  max-width: 820px;
  margin-top: 36px;
  padding: clamp(22px, 4vw, 36px);
}

.game-form label {
  display: block;
  font-weight: 800;
}

.guess-row {
  margin-top: 10px;
}

.guess-row input {
  min-height: 48px;
  width: min(180px, 100%);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 12px 16px;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.help-text,
.game-status {
  color: var(--muted);
}

.game-status {
  margin-top: 18px;
  border-left: 4px solid var(--accent);
  padding: 10px 14px;
  background: var(--surface-strong);
  border-radius: 12px;
}

.guess-history {
  margin: 18px 0 0;
  padding-left: 24px;
}

.guess-history li {
  margin-bottom: 8px;
  color: var(--muted);
}

.archive-list {
  margin-top: 48px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 28px;
  color: var(--muted);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 16px;
  font-weight: 800;
}

@media (max-width: 960px) {
  .hero-grid,
  .compact-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  :root {
    --shell: min(100vw - 24px, 100%);
  }

  .nav-shell,
  .section-heading,
  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

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

  .hero {
    padding-top: 48px;
  }

  .feature-card {
    min-height: 168px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
