:root {
  --night: #0f1a14;
  --night-deep: #0a120e;
  --baize: #1f5b3f;
  --baize-dark: #173f2d;
  --gold: #e8c15a;
  --chalk: #f3efe4;
  --mist: #c3c9bc;
  --card: #f7f3e8;
  --ink: #18201b;
  --heart: #a3262a;
  --rail: 15.5rem;
  --bar: 4rem;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--chalk);
  background-color: var(--night);
  background-image:
    radial-gradient(ellipse at 30% 0%, rgb(31 91 63 / 0.35), transparent 60%),
    repeating-linear-gradient(45deg, rgb(255 255 255 / 0.018) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(-45deg, rgb(0 0 0 / 0.12) 0 1px, transparent 1px 5px);
  background-attachment: fixed;
}

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

a {
  color: var(--gold);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--gold);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem);
  margin: 0 0 1.25rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  margin: 3rem 0 1rem;
}

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

p,
li,
dd {
  text-wrap: pretty;
}

p {
  margin: 0 0 1rem;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  padding: 0.6rem 1rem;
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
}

.skip:focus {
  top: 1rem;
}

.masthead {
  padding: 1rem 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--chalk);
  text-decoration: none;
}

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

.brand-note {
  display: none;
}

.pages {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 20;
  background: var(--night-deep);
  border-top: 1px solid rgb(232 193 90 / 0.35);
  padding-bottom: env(safe-area-inset-bottom);
}

.pages ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.pages li:nth-child(n + 5) {
  display: none;
}

.pages a,
.more {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--bar);
  padding: 0.25rem;
  font: 600 0.8125rem/1.2 var(--sans);
  color: var(--mist);
  text-align: center;
  text-decoration: none;
}

.pages a[aria-current="page"] {
  color: var(--gold);
  box-shadow: inset 0 3px 0 var(--gold);
}

.pages-row {
  display: grid;
  grid-template-columns: 4fr 1fr;
}

.more {
  border: 0;
  border-left: 1px solid rgb(243 239 228 / 0.12);
  background: none;
  cursor: pointer;
}

.more.is-here {
  color: var(--gold);
  box-shadow: inset 0 3px 0 var(--gold);
}

.pages.is-open ul {
  grid-template-columns: 1fr 1fr;
  grid-column: 1 / -1;
  padding-top: 0.5rem;
}

.pages.is-open li:nth-child(n + 5) {
  display: block;
}

.pages.is-open .pages-row {
  grid-template-columns: 1fr;
}

.pages.is-open a {
  justify-content: flex-start;
  min-height: 3rem;
  padding-inline: 16px;
  font-size: 0.9375rem;
}

.pages.is-open a[aria-current="page"] {
  box-shadow: inset 3px 0 0 var(--gold);
}

.pages.is-open .more {
  border-left: 0;
  border-top: 1px solid rgb(243 239 228 / 0.12);
  min-height: 3rem;
}

.content {
  padding: 0.5rem 16px calc(var(--bar) + 2.5rem + env(safe-area-inset-bottom));
  max-width: 46rem;
}

.lede {
  font-size: 1.1875rem;
  color: var(--chalk);
  max-width: 40rem;
}

.quiet {
  color: var(--mist);
  font-size: 0.9375rem;
}

.photo {
  margin: 2rem 0;
}

.photo img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid rgb(232 193 90 / 0.25);
}

.photo figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--mist);
}

.hero {
  margin: 0 -16px 2rem;
}

.hero img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-bottom: 2px solid var(--gold);
}

.deal {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.strip {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: 10px 4px 4px 10px;
  background: linear-gradient(90deg, rgb(31 91 63 / 0.9), rgb(23 63 45 / 0.55));
  border-left: 3px solid var(--gold);
  color: var(--chalk);
  text-decoration: none;
}

.strip:hover {
  background: linear-gradient(90deg, var(--baize), rgb(31 91 63 / 0.7));
}

.strip strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--gold);
}

.strip-line {
  display: block;
  font-size: 0.9375rem;
  color: var(--chalk);
}

.pip {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 3.4rem;
  height: 4.6rem;
  border-radius: 5px;
  background: var(--card);
  color: var(--ink);
  font: 700 1.35rem/1 var(--serif);
  box-shadow: 0 2px 0 rgb(0 0 0 / 0.35);
}

.pip::after {
  position: absolute;
  bottom: 0.35rem;
  right: 0.4rem;
  font-size: 0.95rem;
}

.spades::after {
  content: "\2660\FE0E";
}

.hearts::after {
  content: "\2665\FE0E";
}

.diamonds::after {
  content: "\2666\FE0E";
}

.clubs::after {
  content: "\2663\FE0E";
}

.hearts,
.diamonds {
  color: var(--heart);
}

.hand {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
  padding: 0;
  list-style: none;
}

.hand .pip {
  width: 2.8rem;
  height: 3.8rem;
  font-size: 1.1rem;
}

.note {
  margin: 2rem 0;
  padding: 1rem 1.1rem;
  border: 1px dashed rgb(232 193 90 / 0.55);
  border-radius: 6px;
  background: rgb(10 18 14 / 0.6);
}

.note h2,
.note h3 {
  margin-top: 0;
  font-size: 1.35rem;
}

.note p:last-child,
.note ul {
  margin-bottom: 0;
}

.rules {
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
  counter-reset: rule;
}

.rules li {
  counter-increment: rule;
  border-top: 1px solid rgb(243 239 228 / 0.14);
}

.rules li:last-child {
  border-bottom: 1px solid rgb(243 239 228 / 0.14);
}

.rules summary {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 1rem 0;
  list-style: none;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--chalk);
}

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

.rules dt {
  font-weight: 600;
  color: var(--gold);
}

.rules dd {
  margin: 0 0 0.6rem;
}

.rules summary::before {
  content: counter(rule);
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px dashed var(--gold);
  font: 700 0.95rem/1 var(--sans);
  color: var(--gold);
}

.rules summary::after {
  content: "+";
  margin-left: auto;
  font: 400 1.4rem/1 var(--sans);
  color: var(--gold);
}

.rules details[open] > summary::after {
  content: "\2212";
}

.rules details > div {
  padding: 0 0 1.25rem 2.9rem;
}

details::details-content {
  interpolate-size: allow-keywords;
  overflow: clip;
  contain: layout;
}

details:not([open])::details-content {
  block-size: 0;
}

@media (prefers-reduced-motion: no-preference) {
  details::details-content {
    transition: block-size, content-visibility;
    transition-duration: 0.25s;
    transition-timing-function: ease-in-out;
    transition-behavior: allow-discrete;
  }
}

.source {
  font-size: 0.875rem;
  color: var(--mist);
}

.letters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 0.5rem;
  padding: 0;
  list-style: none;
}

.letters button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.6rem;
  border: 1px solid rgb(232 193 90 / 0.45);
  border-radius: 4px;
  background: transparent;
  color: var(--chalk);
  font: 600 0.95rem/1 var(--sans);
  cursor: pointer;
}

.letters button[aria-pressed="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.count {
  font-size: 0.9375rem;
  color: var(--mist);
  margin: 0 0 1rem;
}

.lexicon {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.lexicon caption {
  text-align: left;
  font-size: 0.875rem;
  color: var(--mist);
  padding-bottom: 0.5rem;
}

.lexicon th,
.lexicon td {
  padding: 0.75rem 0.5rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgb(243 239 228 / 0.12);
}

.lexicon thead th {
  font: 600 0.875rem/1.3 var(--sans);
  color: var(--gold);
  border-bottom: 2px solid rgb(232 193 90 / 0.5);
}

.lexicon tbody th {
  font-family: var(--serif);
  font-weight: 600;
  white-space: nowrap;
  color: var(--chalk);
  width: 32%;
}

.layout-plan {
  margin: 1.5rem 0;
  padding: 1rem;
  border-radius: 8px;
  background: var(--baize-dark);
  border: 1px solid rgb(232 193 90 / 0.3);
}

.layout-plan svg {
  width: 100%;
  height: auto;
}

.layout-plan figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--mist);
}

.roles {
  margin: 1.5rem 0;
}

.roles dt {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gold);
  margin-top: 1.25rem;
}

.roles dd {
  margin: 0.25rem 0 0;
  padding-left: 1rem;
  border-left: 2px solid var(--baize);
}

.drill {
  margin: 2rem 0;
  padding: 1.25rem 1.1rem;
  background: rgb(31 91 63 / 0.35);
  border-radius: 8px;
  border-top: 3px solid var(--baize);
}

.drill h3 {
  margin-top: 0;
}

.reveal {
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--gold);
  border-radius: 4px;
  background: transparent;
  color: var(--gold);
  font: 600 0.95rem/1.2 var(--sans);
  cursor: pointer;
}

.reveal[aria-expanded="true"] {
  background: var(--gold);
  color: var(--ink);
}

.answer {
  margin-top: 0.9rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--gold);
  background: rgb(10 18 14 / 0.65);
}

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

.pay {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1rem;
  font-size: 0.95rem;
}

.pay th,
.pay td {
  padding: 0.55rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgb(243 239 228 / 0.12);
}

.pay thead th {
  color: var(--gold);
  font-weight: 600;
}

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

.credits {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.credits th,
.credits td {
  padding: 0.6rem 0.5rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgb(243 239 228 / 0.12);
}

.credits td:nth-child(3) {
  overflow-wrap: anywhere;
}

.credits thead th {
  color: var(--gold);
}

.qa {
  margin: 0;
}

.qa h2 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
}

.timeline {
  margin: 1rem 0 1.5rem;
  padding: 0;
  list-style: none;
}

.timeline li {
  padding: 0.5rem 0 0.5rem 1.25rem;
  border-left: 2px solid var(--gold);
}

.timeline time {
  display: block;
  font-weight: 600;
  color: var(--gold);
}

.foot {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(243 239 228 / 0.14);
  font-size: 0.875rem;
  color: var(--mist);
}

.foot p {
  margin-bottom: 0.5rem;
}

.foot a {
  color: var(--chalk);
}

.gate {
  width: min(32rem, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 2rem 1.5rem 1.5rem;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: var(--night);
  color: var(--chalk);
  text-align: center;
}

.gate:modal {
  overscroll-behavior: contain;
}

.gate::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgb(6 11 8 / 0.97);
}

.gate h2 {
  margin: 0.75rem 0 1rem;
  font-size: 1.6rem;
}

.gate .gate-mark {
  font: 700 3rem/1 var(--serif);
  color: var(--gold);
}

.gate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.gate-actions button,
.gate-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.6rem 1.25rem;
  border-radius: 4px;
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
}

.gate-actions button {
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--ink);
}

.gate-actions a {
  border: 1px solid rgb(243 239 228 / 0.45);
  color: var(--chalk);
}

.lost {
  font: 700 clamp(4rem, 3rem + 6vw, 7rem)/1 var(--serif);
  color: var(--gold);
  margin: 1rem 0;
}

@media (min-width: 60em) {
  .masthead {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--rail);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background: rgb(10 18 14 / 0.88);
    border-right: 1px solid rgb(232 193 90 / 0.25);
    overflow-y: auto;
  }

  .brand-note {
    display: block;
    margin-top: auto;
    font-size: 0.8125rem;
    color: var(--mist);
  }

  .pages {
    position: static;
    background: none;
    border: 0;
    padding: 0;
  }

  .pages-row {
    display: block;
  }

  .pages ul {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
  }

  .pages li:nth-child(n + 5) {
    display: block;
  }

  .pages a {
    justify-content: flex-start;
    min-height: 2.75rem;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    font-size: 0.975rem;
    text-align: left;
    color: var(--chalk);
  }

  .pages a:hover {
    background: rgb(31 91 63 / 0.5);
  }

  .pages a[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--gold);
    background: rgb(31 91 63 / 0.6);
  }

  .more {
    display: none;
  }

  .content {
    margin-left: var(--rail);
    padding: 3rem 3rem 3rem 4rem;
    max-width: 50rem;
  }

  .hero {
    margin: -3rem -3rem 2.5rem -4rem;
  }

  .strip {
    grid-template-columns: 3.4rem 1fr;
    padding: 1rem 1.5rem;
  }
}

@media (forced-colors: active) {
  .pages a[aria-current="page"],
  .strip {
    border: 2px solid CanvasText;
  }
}
