/* Shared look of the pages around the game (guide, privacy). The palette, the
   two faces and the button come from the game's own interface (see
   .agents/art-direction.md); the gold ring is the one every match closes on. */
:root {
  --site-field: #0b3040;
  --site-deep: #061e2b;
  --site-panel: #0d3a4c;
  --site-rule: #1f4b5c;
  --site-ink: #0b1119;
  --site-ivory: #f4efe7;
  --site-parchment: #efe0ce;
  --site-muted: #a9b6c4;
  --site-gold: #f5c244;
  --site-gold-lit: #ffd766;
  --site-brass: #96690a;
  --site-face: 'Anek Latin', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --site-numeric: 'Chakra Petch', ui-monospace, monospace;
}

* { box-sizing: border-box; }

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

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(120% 70% at 85% 0%, #17606f 0%, rgba(23, 96, 111, 0) 60%),
    linear-gradient(180deg, var(--site-field) 0%, var(--site-deep) 100%) fixed;
  background-color: var(--site-deep);
  color: var(--site-ivory);
  font: 400 1.0625rem/1.65 var(--site-face);
  -webkit-tap-highlight-color: transparent;
}

/* The closing ring, most of it off the page. */
body::before,
body::after {
  content: '';
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
}

/* Hung off the reading column, not the window: it starts clear of the Play
   button and slides out of view as the window narrows, so it never runs
   behind text. A phone has no room for it. */
body::before {
  top: -230px;
  left: calc(50% + 440px);
  width: 560px;
  height: 560px;
  border: 7px solid var(--site-gold);
}

body::after {
  top: -200px;
  left: calc(50% + 470px);
  width: 500px;
  height: 500px;
  border: 2px dashed rgba(245, 194, 68, 0.3);
}

nav,
main,
footer {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 28px;
}

/* The wordmark, in the cover art's lettering. */
nav > a:first-child {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--site-parchment);
  font: 800 1.75rem/1 var(--site-face);
  letter-spacing: -0.01em;
  text-decoration: none;
  text-transform: uppercase;
  text-shadow: 0 0.06em 0 var(--site-ink);
}

a {
  color: var(--site-gold-lit);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

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

/* The game's primary button: a flat gold face over a darker skirt. */
.play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 24px 14px;
  border-radius: 8px;
  background: var(--site-gold);
  box-shadow: inset 0 -4px 0 var(--site-brass);
  color: #2a1b05;
  font: 800 1.05rem/1 var(--site-face);
  text-decoration: none;
  white-space: nowrap;
  transition: background 150ms ease, transform 150ms ease;
}

.play:active { transform: translateY(1px); }

@media (hover: hover) {
  .play:hover { background: var(--site-gold-lit); }
  a:hover { color: #fff0bf; }
  .play:hover { color: #2a1b05; }
}

main { padding-bottom: 40px; }

h1 {
  margin: 36px 0 24px;
  font: 800 clamp(2.6rem, 8vw, 4.25rem)/0.98 var(--site-face);
  letter-spacing: -0.015em;
}

/* The opening paragraph carries the page: one size up. */
h1 + p {
  max-width: 58ch;
  font-size: 1.2rem;
  line-height: 1.55;
}

h2 {
  margin: 56px 0 12px;
  font: 800 1.6rem/1.2 var(--site-face);
  scroll-margin-top: 24px;
}

h2::before {
  content: '';
  display: inline-block;
  width: 0.46em;
  height: 0.46em;
  margin-right: 0.5em;
  border: 0.14em solid var(--site-gold);
  border-radius: 50%;
  vertical-align: 0.08em;
}

h3 {
  margin: 28px 0 4px;
  color: var(--site-gold-lit);
  font: 700 1.15rem/1.3 var(--site-face);
}

p { margin: 12px 0 18px; }

small { color: var(--site-muted); font-size: 0.9rem; }

strong { font-weight: 700; }

ul { padding-left: 1.2em; }

li { margin-bottom: 10px; }

li::marker { color: var(--site-gold); }

/* Controls: the keys read as keys, in the game's numeral face. */
table {
  width: 100%;
  margin: 16px 0 20px;
  border-collapse: collapse;
  border-radius: 8px;
  background: var(--site-panel);
  box-shadow: 0 5px 0 var(--site-deep);
  font-size: 0.98rem;
  overflow: hidden;
}

th,
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--site-rule);
  text-align: left;
  vertical-align: top;
}

tr:last-child td { border-bottom: 0; }

th {
  background: var(--site-rule);
  color: var(--site-muted);
  font: 700 0.8rem/1.2 var(--site-face);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td:first-child {
  width: 38%;
  color: var(--site-gold-lit);
  font: 600 0.98rem/1.5 var(--site-numeric);
}

main > .play { margin-top: 28px; }

footer {
  margin-top: 24px;
  padding-top: 20px;
  padding-bottom: 48px;
  border-top: 1px solid var(--site-rule);
  color: var(--site-muted);
  font-size: 0.92rem;
}

footer a { color: var(--site-muted); }

@media (max-width: 640px) {
  nav, main, footer { padding-left: 20px; padding-right: 20px; }

  h2 { margin-top: 44px; font-size: 1.4rem; }

  th, td { padding: 10px 12px; }

  footer a { display: inline-block; padding: 8px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .play { transition: none; }
}
