:root {
  --paper: #f3ead6;
  --paper-deep: #e7d9b8;
  --ink: #16342c;
  --ink-soft: #3d544c;
  --muted: #5f6d67;
  --card: #fffdf6;
  --accent: #e24b1a;
  --accent-ink: #fff8f0;
  --teal: #1a6b5c;
  --star: #c48a0a;
  --line: #16342c;
  --shadow: 4px 4px 0 #16342c;
  --font-display: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: Georgia, "Palatino Linotype", Palatino, serif;
  --header-h: 52px;
  --max: 1080px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--teal);
}

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

h1,
h2,
h3,
.brand-name,
.rank-score,
.ticket-cta span,
.board-note {
  font-family: var(--font-display);
  letter-spacing: 0;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 {
  font-size: clamp(1.7rem, 4vw, 2.55rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 700;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 80;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--card);
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  border-bottom: 3px solid var(--line);
  background: #fff8ea;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 10px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: #fff8ea;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.nav-toggle-bars {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
  box-shadow: 0 5px 0 var(--ink), 0 10px 0 var(--ink);
}

.header-inner {
  height: 100%;
  width: min(100% - 24px, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand img {
  width: 32px;
  height: 32px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: #f4c36a;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.brand-tag {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 2px solid transparent;
  border-radius: 6px;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  background: var(--teal);
  border-color: var(--line);
  color: #f4efe2;
}

.site-nav a:hover {
  border-color: var(--line);
  color: var(--ink);
}

.board {
  padding: 10px 0 28px;
}

.board-note {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teal);
}

.board-title {
  margin-bottom: 6px;
}

.board-lead {
  max-width: 62ch;
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.rank-list {
  display: grid;
  gap: 10px;
}

.game-card {
  position: relative;
  display: grid;
  grid-template-columns: 36px 56px minmax(0, 1fr);
  grid-template-areas:
    "stub logo body"
    "cta cta cta";
  column-gap: 10px;
  row-gap: 8px;
  align-items: center;
  padding: 8px 10px 10px 0;
  border: 3px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  user-select: none;
}

.game-card:nth-child(even) {
  background: #fff7e6;
}

.hidlink {
  position: absolute;
  z-index: -5;
  opacity: 0;
}

.game-card:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--line);
}

.rank-badge {
  grid-area: stub;
  display: grid;
  place-items: center;
  align-self: stretch;
  width: 36px;
  margin: -8px 0 -10px;
  border-right: 2px dashed rgba(22, 52, 44, 0.35);
  background: #1a6b5c;
  color: #f6efe0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  border-radius: 7px 0 0 7px;
}

.rank-logo {
  grid-area: logo;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #16342c;
}

.rank-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-body {
  grid-area: body;
  min-width: 0;
}

.rank-name {
  margin: 0 0 2px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
}

.rank-score {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0 0 2px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.stars {
  display: inline-flex;
  gap: 1px;
  color: var(--star);
  letter-spacing: -1px;
  font-size: 0.92rem;
}

.pick-mark {
  padding: 1px 6px;
  border: 2px solid var(--line);
  background: #f2c94c;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rank-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-cta {
  grid-area: cta;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin-left: 10px;
  border: 2px solid var(--line);
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.shelf {
  padding: 28px 0 8px;
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}

.shelf h2 {
  margin-bottom: 10px;
}

.story-row {
  display: grid;
  gap: 18px;
  align-items: center;
}

.story-media {
  overflow: hidden;
  border: 3px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.story-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.story-copy h2 {
  margin-bottom: 10px;
}

.story-copy p {
  color: var(--ink-soft);
}

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

.note-card {
  padding: 16px 16px 14px;
  border: 3px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.note-card h3 {
  margin-bottom: 6px;
}

.ask-box {
  display: grid;
  gap: 10px;
}

.ask-box details {
  padding: 12px 14px;
  border: 3px solid var(--line);
  background: var(--card);
}

.ask-box summary {
  cursor: pointer;
  font-weight: 700;
}

.ask-box details p {
  margin-top: 8px;
  color: var(--ink-soft);
}

.fine-print {
  display: grid;
  gap: 14px;
  padding: 8px 0 24px;
}

.fine-print article {
  padding: 14px 16px;
  border-top: 4px solid var(--teal);
  background: rgba(255, 253, 246, 0.72);
}

.fine-print h3 {
  margin-bottom: 6px;
}

.inner-page {
  padding: 22px 0 40px;
}

.inner-page .lead {
  max-width: 62ch;
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.prose {
  max-width: 68ch;
}

.prose h2 {
  margin-top: 1.4em;
}

.prose ul {
  padding-left: 1.2em;
}

.contact-layout {
  display: grid;
  gap: 22px;
}

.contact-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 3px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.contact-form label {
  display: grid;
  gap: 5px;
  font-weight: 700;
  font-size: 0.88rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 3px solid #f2c94c;
  outline-offset: 1px;
}

.send-button,
.button,
a.send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.send-button:hover,
.button:hover {
  background: #c83d12;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.contact-aside address {
  font-style: normal;
}

.site-footer {
  margin-top: 12px;
  border-top: 3px solid var(--line);
  background: #16342c;
  color: #e8dfcc;
}

.footer-shell {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 28px 0 20px;
}

.footer-grid {
  display: grid;
  gap: 28px;
}

.footer-brand-block {
  display: grid;
  gap: 14px;
  align-content: start;
}

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

.site-footer a:hover {
  color: #fff8ea;
}

.site-footer .site-nav {
  flex-wrap: wrap;
}

.site-footer .site-nav a {
  color: #f2c94c;
}

.site-footer .site-nav a:hover {
  color: #fff8ea;
  border-color: #f2c94c;
}

.site-footer .brand-name,
.site-footer .brand-tag {
  color: #e8dfcc;
}

.footer-contact h2 {
  margin: 0 0 10px;
  color: #fff8ea;
  font-size: 1.4rem;
}

.footer-contact p {
  margin: 0 0 8px;
  color: #f4efe2;
  line-height: 1.45;
}

.footer-contact a {
  color: #f2c94c;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-disclaimer {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #0f241f;
  color: #f4efe2;
}

.footer-disclaimer p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 16px;
  font-size: 0.88rem;
}

.footer-copy {
  margin: 12px 0 0;
  color: #c9c0ad;
  font-size: 0.8rem;
}

.cookie-bar {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 3px solid var(--line);
  background: #fff8ea;
  box-shadow: var(--shadow);
}

.cookie-bar[hidden] {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(22, 52, 44, 0.62);
}

.modal-backdrop[hidden] {
  display: none;
}

.thank-you {
  position: relative;
  width: min(100%, 420px);
  padding: 28px 22px 22px;
  border: 3px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.thank-you h2 {
  margin-bottom: 8px;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border: 2px solid var(--line);
  background: #fff8ea;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.lost-page {
  min-height: calc(100vh - 180px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 16px;
}

@media (min-width: 760px) {
  :root {
    --header-h: 58px;
  }

  .rank-list {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .game-card {
    grid-template-columns: 42px 64px minmax(0, 1fr);
    column-gap: 12px;
    padding: 10px 12px 12px 0;
  }

  .rank-badge {
    width: 42px;
    margin: -10px 0 -12px;
    font-size: 1.3rem;
  }

  .rank-logo {
    width: 64px;
    height: 64px;
  }

  .rank-body p {
    font-size: 0.86rem;
    -webkit-line-clamp: 2;
  }

  .rank-cta {
    min-height: 40px;
    margin-left: 12px;
  }

  .board {
    padding-top: 18px;
  }

  .split,
  .fine-print,
  .contact-layout,
  .footer-grid,
  .story-row {
    grid-template-columns: 1fr 1fr;
  }

  .story-row.is-flip .story-media {
    order: 2;
  }

  .fine-print {
    grid-template-columns: 1fr 1fr;
  }

  .contact-layout {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

@media (max-width: 759px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-header .brand-tag {
    display: none;
  }

  .site-header .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 12px 16px 14px;
    border-bottom: 3px solid var(--line);
    background: #fff8ea;
  }

  .site-header .site-nav.is-open {
    display: flex;
  }

  .site-header .site-nav a {
    min-height: 42px;
    justify-content: flex-start;
    padding: 0 12px;
    font-size: 1rem;
  }

  .board {
    padding-top: 8px;
  }

  .board-note {
    font-size: 0.78rem;
    margin-bottom: 2px;
  }

  .board-title {
    font-size: 1.28rem;
    margin-bottom: 8px;
  }

  .board-lead {
    display: none;
  }

  .cookie-bar {
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  .cookie-bar .button {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.9rem;
  }
}

@media (max-width: 420px) {
  .brand-tag {
    display: none;
  }

  .site-nav a {
    padding: 0 7px;
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .game-card:active {
    transform: none;
  }
}
