:root {
  --bg: #ffffff;
  --text: #1a1a1b;
  --muted: #5f6264;
  --border: #d3d6da;
  --panel: #f4f5f6;
  --match: #2c5be8;
  --match-strong: #2148c4;
  --miss: #787c7e;
  --link: #2148c4;
  --button: #2c5be8;
  --font: "Clear Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --title-font: "Karnak Condensed", Georgia, "Times New Roman", serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121213;
    --text: #f2f2f2;
    --muted: #a5a8aa;
    --border: #3a3a3c;
    --panel: #1e1e20;
    --match: #4c7bff;
    --match-strong: #6e93ff;
    --miss: #3a3a3c;
    --link: #8fb0ff;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--link);
  text-underline-offset: 2px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
  border-bottom: 1px solid var(--border);
}

.brand {
  font-family: var(--title-font);
  font-weight: 700;
  font-size: 28px;
  color: var(--text);
  text-decoration: none;
  line-height: 1;
}

.brand span {
  color: var(--match);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  font-weight: 600;
}

.site-header nav a {
  color: var(--text);
  text-decoration: none;
}

.site-header nav a.play {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--button);
  color: #ffffff;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 18px 40px;
}

.crumbs {
  margin: 14px 0 4px;
  font-size: 13px;
  color: var(--muted);
}

.crumbs a {
  color: var(--muted);
}

.crumbs .sep {
  margin: 0 6px;
}

h1,
h2 {
  font-family: var(--title-font);
  line-height: 1.15;
}

h1 {
  font-size: clamp(30px, 7vw, 42px);
  margin: 8px 0 12px;
}

h2 {
  font-size: 26px;
  margin: 34px 0 10px;
}

h3 {
  font-size: 18px;
  margin: 22px 0 4px;
}

.lede {
  font-size: 19px;
}

.kicker {
  margin: 18px 0 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.button {
  display: inline-block;
  margin: 4px 10px 4px 0;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--button);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.button.secondary {
  background: none;
  color: var(--text);
  border: 1px solid var(--text);
}

.tiles {
  display: inline-flex;
  gap: 4px;
  vertical-align: middle;
}

.tiles .t {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--miss);
  color: #ffffff;
  font-weight: 700;
  font-size: 22px;
}

.tiles.target .t,
.tiles .t.g {
  background: var(--match);
}

.pair {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}

.pair .arrow {
  font-size: 26px;
  color: var(--muted);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0 0 8px;
  list-style: none;
}

.facts li {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--panel);
  font-size: 14px;
}

.facts strong {
  font-size: 18px;
  margin-right: 4px;
}

details {
  margin: 10px 0;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

summary {
  cursor: pointer;
  font-weight: 700;
}

details[open] summary {
  margin-bottom: 8px;
}

.route {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  padding: 0;
  margin: 10px 0;
  list-style: none;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.route li {
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--panel);
}

.route li:last-child {
  background: var(--button);
  color: #ffffff;
}

.route li + li::before {
  content: "→ ";
  color: var(--muted);
  font-weight: 400;
}

.steps {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.steps th,
.steps td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.steps td:first-child {
  width: 3.5em;
  font-weight: 700;
  color: var(--muted);
}

.example {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 14px 0;
}

.example figcaption {
  flex-basis: 100%;
  font-size: 15px;
}

.share {
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--panel);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
}

.pager a:last-child {
  text-align: right;
}

.archive-list,
.recent {
  padding: 0;
  margin: 0;
  list-style: none;
}

.archive-list a,
.recent a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}

.archive-list .n,
.recent .n {
  min-width: 3.2em;
  font-weight: 700;
  color: var(--muted);
}

.archive-list .w,
.recent .w {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.archive-list .d,
.recent .d {
  margin-left: auto;
  font-size: 14px;
  color: var(--muted);
}

.site-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 18px calc(30px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-weight: 600;
}

@media (max-width: 480px) {
  .site-header nav a:not(.play) {
    display: none;
  }
  .tiles .t {
    width: 34px;
    height: 34px;
    font-size: 19px;
  }
}
