/* The blog (scripts/blog.mjs): the landing's colours, Anton for titles and
   the readable system sans for the text, in one narrow column. */
@font-face {
  font-family: Anton;
  src: url('/fonts/anton-400.woff2') format('woff2');
  font-display: swap;
}
:root {
  --bg-0: #0b0a09;
  --bg-1: #14110e;
  --bone: #ece5d6;
  --bone-dim: #d0c8b8;
  --muted: #a99f8d;
  --gold: #d8ad4e;
  --gold-bright: #f0cd6e;
  --blood: #c62a2a;
  --line: #2c2721;
  --edge: #17130f;
  --font-display: Anton, Impact, 'Arial Narrow', system-ui, sans-serif;
  --font-read: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-code: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: radial-gradient(ellipse 80% 460px at 80% 0, rgba(198, 42, 42, 0.08), transparent), var(--bg-0);
  color: var(--bone-dim);
  font-family: var(--font-read);
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
a:hover {
  color: var(--gold);
}
a:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 4px;
}
::selection {
  background: var(--blood);
  color: #fff;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
.wrap {
  width: min(700px, calc(100% - 32px));
  margin-inline: auto;
}

/* ---- Header and footer ---------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--bone);
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.brand img {
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6));
}
.header-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.header-links > a:not(.play) {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}
.header-links > a[aria-current='page'] {
  color: var(--bone);
}
/* The landing's Play button: gold, Anton, one corner clipped. */
.play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  background: var(--gold);
  color: var(--edge);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%);
}
.play:hover {
  background: var(--gold-bright);
  color: var(--edge);
}
.play:focus-visible {
  clip-path: none;
}
.site-footer {
  margin-top: clamp(56px, 10vw, 96px);
  border-top: 1px solid var(--line);
  background: var(--bg-1);
  color: var(--muted);
  font-size: 13px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 28px;
  padding-block: 26px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.site-footer a {
  text-decoration: none;
}

/* ---- Shared type ------------------------------------------------------ */
h1,
h2 {
  color: var(--bone);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-transform: uppercase;
  text-wrap: balance;
}
.meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.meta .by {
  font-weight: inherit;
  color: var(--bone);
}
.meta > span {
  white-space: nowrap;
}

/* ---- The list of posts ------------------------------------------------ */
.blog-head {
  padding-block: clamp(36px, 6vw, 60px) 24px;
}
.blog-head h1 {
  margin: 0;
  font-size: clamp(48px, 10vw, 76px);
}
.blog-head p {
  margin: 12px 0 0;
  max-width: 46ch;
  color: var(--muted);
}
.posts {
  margin: 0;
  padding: 0;
  list-style: none;
}
.entry {
  position: relative;
  padding-block: 30px;
  border-top: 1px solid var(--line);
}
.entry h2 {
  margin: 10px 0 8px;
  font-size: clamp(26px, 4.6vw, 34px);
}
.entry h2 a {
  text-decoration: none;
}
/* The whole entry answers a tap, through its title's link. */
.entry h2 a::after {
  content: '';
  position: absolute;
  inset: 0;
}
.entry:hover h2 {
  color: var(--gold);
}
.entry .dek {
  margin: 0;
  color: var(--muted);
}
.entry .thumb {
  display: block;
  margin-bottom: 20px;
  aspect-ratio: 2 / 1;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 6px;
}
/* The older posts: the cover beside the words, the same size on each. */
.entry.with-thumb:not(.lead) {
  display: grid;
  grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
  gap: 26px;
  align-items: center;
}
.entry.with-thumb:not(.lead) .thumb {
  margin: 0;
  aspect-ratio: 16 / 9;
}
.entry:not(.lead) h2 {
  font-size: clamp(22px, 3.6vw, 27px);
}
.entry:hover .thumb {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
@media (max-width: 560px) {
  .entry.with-thumb:not(.lead) {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
.empty {
  padding-block: 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

/* ---- One post --------------------------------------------------------- */
.post-head {
  padding-top: clamp(36px, 7vw, 64px);
}
.back {
  display: inline-block;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}
.post-head h1 {
  margin: 0;
  font-size: clamp(38px, 7.4vw, 60px);
}
.standfirst {
  margin: 18px 0 0;
  color: var(--bone);
  font-size: clamp(19px, 2.6vw, 21px);
  line-height: 1.55;
}
.post-head .meta {
  margin-top: 22px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.cover {
  margin: 32px 0 0;
}
.cover img {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  border-radius: 6px;
}

/* The text itself. */
.prose {
  margin-top: 34px;
}
.prose > :first-child {
  margin-top: 0;
}
.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre,
.prose table {
  margin: 0 0 1.35em;
}
.prose h2 {
  margin: 2.1em 0 0.6em;
  font-size: clamp(25px, 4.2vw, 31px);
}
.prose h3 {
  margin: 1.8em 0 0.5em;
  color: var(--bone);
  font-size: 20px;
  line-height: 1.35;
}
.prose a {
  color: var(--bone);
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
}
.prose a:hover {
  color: var(--gold);
}
.prose strong {
  color: var(--bone);
}
.prose ul,
.prose ol {
  padding-left: 24px;
}
.prose li {
  margin-bottom: 0.45em;
}
.prose li::marker {
  color: var(--gold);
}
.prose blockquote {
  margin-left: 0;
  padding-left: 20px;
  border-left: 2px solid var(--gold);
  color: var(--bone);
  font-size: 20px;
  line-height: 1.6;
}
.prose blockquote p:last-child {
  margin-bottom: 0;
}
.prose figure {
  margin: 2em 0;
}
.prose img {
  border-radius: 6px;
}
.prose figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.prose hr {
  margin: 2.6em 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.prose code {
  padding: 0.1em 0.35em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-1);
  font-family: var(--font-code);
  font-size: 0.86em;
}
.prose pre {
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-1);
  font-size: 15px;
  line-height: 1.6;
}
.prose pre code {
  padding: 0;
  border: 0;
  background: none;
}
.prose table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.prose th,
.prose td {
  padding: 8px 14px 8px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.prose th {
  color: var(--bone);
}

/* The end of a post: share, back, and one line about the game. */
.post-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.post-foot a {
  color: var(--muted);
  text-decoration: none;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 24px;
  margin-top: 40px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-1);
}
.cta p {
  margin: 0;
  color: var(--bone);
}

@media (max-width: 420px) {
  .header-links {
    gap: 14px;
  }
  .brand {
    font-size: 20px;
  }
  .play {
    padding: 0 14px;
  }
}

/* ---- Diagrams inside a post ------------------------------------------
   Written as HTML in the post's Markdown, so they stay text: readable at
   any width, sharp, and found by search. Gold for money that is really
   there, red for money that is not. */
.diagram {
  --blood-text: #e46a5e;
  margin: 2.4em 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-1);
}
.diagram-title {
  margin: 0 0 20px !important;
  color: var(--bone);
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: 0.03em;
  line-height: 1.2;
  text-transform: uppercase;
}
.diagram figcaption {
  margin-top: 18px;
}
.diagram ol,
.diagram ul {
  margin: 0;
}
/* Steps down a rail. */
.flow {
  padding: 0 !important;
  list-style: none;
  counter-reset: step;
}
.flow > li {
  position: relative;
  margin: 0;
  padding: 0 0 22px 52px;
  counter-increment: step;
}
.flow > li::before {
  content: counter(step);
  position: absolute;
  top: -2px;
  left: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: var(--bg-0);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 16px;
}
.flow > li::after {
  content: '';
  position: absolute;
  top: 36px;
  bottom: 2px;
  left: 16px;
  width: 2px;
  background: var(--line);
}
.flow > li:last-child {
  padding-bottom: 0;
}
.flow > li:last-child::after {
  display: none;
}
.flow > li.warn::before {
  border-color: var(--blood);
  color: var(--blood-text);
}
.flow b,
.side b {
  display: block;
  color: var(--bone);
  font-size: 17px;
  line-height: 1.4;
}
.flow span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.again {
  margin: 16px 0 0 52px !important;
  color: var(--blood-text);
  font-size: 13px;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}
/* Two sides compared, or two ways a match can end. */
.versus {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.flow + .versus {
  margin-top: 22px;
}
.side {
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-0);
  font-size: 16px;
  line-height: 1.55;
}
.side p {
  margin: 0;
}
.side .side-name {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.side ol {
  padding-left: 20px !important;
}
.side li {
  margin-bottom: 8px;
}
.side li:last-child {
  margin-bottom: 0;
}
.side.bad .side-name {
  color: var(--blood-text);
}
.side.bad li::marker {
  color: var(--blood-text);
}
.side.good {
  border-color: rgba(216, 173, 78, 0.45);
}
.side.good .side-name {
  color: var(--gold);
}
.side.safe .side-name {
  color: var(--bone);
}
/* A pot split into its shares. */
.split {
  display: flex;
  gap: 3px;
  height: 22px;
  overflow: hidden;
  border-radius: 4px;
}
.split > i {
  flex: var(--w) 1 0;
  background: var(--c);
}
.split-key {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 0 !important;
  margin-top: 16px !important;
  list-style: none;
}
.split-key li {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}
.split-key li::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;
  border-radius: 2px;
  background: var(--c);
}
.split-key b {
  display: block;
  margin-top: 4px;
  color: var(--bone);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) {
  .diagram {
    padding: 20px 16px;
  }
  .versus {
    grid-template-columns: 1fr;
  }
  .split-key {
    grid-template-columns: 1fr 1fr;
  }
}

/* Three side by side (three games, three cases). */
.versus.three {
  grid-template-columns: repeat(3, 1fr);
}
.side .stat {
  display: block;
  margin-top: 12px;
  color: var(--blood-text);
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.05;
}
.side .stat small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--font-read);
  font-size: 13px;
  letter-spacing: 0.04em;
  line-height: 1.4;
}
/* Bars on one scale, label above, value at the end. */
.bars {
  display: grid;
  gap: 16px;
}
.bar-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 4px 14px;
}
.bar-row > span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}
.bar-row > b {
  color: var(--bone);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.bar-row > i {
  grid-column: 1 / -1;
  display: block;
  width: calc(var(--w) * 1%);
  min-width: 6px;
  height: 16px;
  border-radius: 3px;
  background: var(--c, var(--gold));
}
/* One question, the two answers: a row each, stacked on a phone. */
.compare {
  display: grid;
  gap: 0;
}
.compare-row {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.5;
}
.compare-row:last-child {
  border-bottom: 0;
}
.compare-row > :first-child {
  color: var(--bone);
  font-weight: 700;
}
.compare-row .no {
  color: var(--muted);
}
.compare-row .no::before {
  content: '✕ ';
  color: var(--blood-text);
  font-weight: 700;
}
.compare-row .yes {
  color: var(--bone);
}
.compare-row .yes::before {
  content: '✓ ';
  color: var(--gold);
  font-weight: 700;
}
.compare-head {
  padding-top: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.compare-head > :first-child {
  color: var(--muted);
  font-weight: 400;
}
.compare-head .no::before,
.compare-head .yes::before {
  content: none;
}
@media (max-width: 560px) {
  .versus.three {
    grid-template-columns: 1fr;
  }
  .compare-row {
    grid-template-columns: 1fr 1fr;
    gap: 6px 14px;
  }
  .compare-row > :first-child {
    grid-column: 1 / -1;
  }
  .compare-head > :first-child {
    display: none;
  }
}
.side.good .stat {
  color: var(--gold);
}
.side.safe .stat {
  color: var(--bone);
}
/* A pot followed to the cent: what went in, what came out. */
.ledger {
  display: grid;
  font-variant-numeric: tabular-nums;
}
.ledger > p {
  margin: 0;
}
.ledger-head {
  padding: 18px 0 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}
.ledger-head:first-child {
  padding-top: 0;
}
.ledger-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--bone);
  font-size: 16px;
  line-height: 1.4;
}
.ledger-row small {
  margin-left: 8px;
  color: var(--muted);
  font-size: 13px;
}
.ledger-row b {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}
.ledger-total {
  margin-top: 6px !important;
  border-top: 2px solid var(--gold);
  border-bottom: 0;
  font-weight: 700;
}
.ledger-total b {
  color: var(--gold);
}
.ledger-zero {
  border-bottom: 0;
  color: var(--muted);
}
.ledger-zero b {
  color: var(--gold);
}
/* Three cards: the figures line up along the bottom, whatever the names wrap to. */
.versus.three .side {
  display: flex;
  flex-direction: column;
}
.versus.three .side .stat {
  margin-top: auto;
  padding-top: 12px;
}
/* A room, one mark a player. */
.dots {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  max-width: 420px;
}
.dots > i {
  aspect-ratio: 1;
  border-radius: 50%;
  background: #4a423a;
}
.dots > i.paid {
  background: var(--gold);
}
.dots-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 18px 0 0 !important;
  padding: 0 !important;
  list-style: none;
}
.dots-key li {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}
.dots-key li::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--c);
}
