/* The Czar — shared styles.
 *
 * Deliberately the same design system as the app: zero corner radius anywhere,
 * Archivo, a cream page, one blue accent. The values are the app's own tokens
 * from src/constants/theme.ts, so the site and the product read as one thing.
 * If a token changes there, change it here too — there is no shared source.
 * (Synced 2026-09-10: accent moved to #2A5CD1 when the app's did.)
 */

:root {
  --bg: #f3f2f2;
  --surface: #ffffff;
  --text: #201e1d;
  /* The app's muted ramp, which clears 4.5:1 on the cream background. */
  --muted: rgba(32, 30, 29, 0.68);
  --divider: rgba(32, 30, 29, 0.55);
  --accent: #2a5cd1;
  --accent-100: #edf2fd;
  --accent-800: #1d3e8a;
  --max: 720px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Archivo, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ─────────────────────────────────────────────────────────── */

header {
  border-bottom: 1px solid var(--divider);
  padding: 20px 0;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}

/* The app's own header mark, the same file the app ships in `Wordmark` — not a
   second drawing of it, and not the full app icon either. The icon is the whole
   figure and turns to mush at 22px; this artboard is drawn for the small size.
   It carries its own blue field, so nothing here tints it.

   Was a CSS disc, on purpose, while the artwork was still in flux — a drawn
   circle meant the site had no asset to keep in sync with a logo that kept
   changing. It has stopped changing. */
.mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex: none;
}

nav {
  display: flex;
  gap: 20px;
  font-size: 15px;
}

nav a {
  color: var(--muted);
  text-decoration: none;
}

nav a:hover,
nav a[aria-current='page'] {
  color: var(--accent);
}

/* ── Type ───────────────────────────────────────────────────────────── */

h1 {
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin: 48px 0 12px;
}

h2 {
  font-size: 22px;
  margin: 40px 0 8px;
}

h3 {
  font-size: 17px;
  margin: 28px 0 4px;
}

p,
li {
  color: var(--text);
}

.lede {
  font-size: 20px;
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 34em;
}

.kicker {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

.meta {
  font-size: 14px;
  color: var(--muted);
}

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

/* ── Blocks ─────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--divider);
  padding: 20px;
  margin: 16px 0;
}

.games {
  display: grid;
  /* 240px, not 200: four cards at the page's 720px come out 2×2 rather than
     three across with an orphan on its own row. */
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 24px 0 8px;
  padding: 0;
  list-style: none;
}

.games li {
  background: var(--surface);
  border: 1px solid var(--divider);
  padding: 16px;
}

.games strong {
  display: block;
  margin-bottom: 4px;
}

/* A card title that links to its rules reads as a title, not a link, until
   it's pointed at. */
.games strong a {
  color: var(--text);
  text-decoration: none;
}

.games strong a:hover {
  color: var(--accent);
}

.games span {
  font-size: 14px;
  color: var(--muted);
}

/* Feature cards share the games grid; the class exists so the two can diverge. */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 24px 0 8px;
  padding: 0;
  list-style: none;
}

.features li {
  background: var(--surface);
  border: 1px solid var(--divider);
  padding: 16px;
}

.features strong {
  display: block;
  margin-bottom: 4px;
}

.features span {
  font-size: 14px;
  color: var(--muted);
}

/* Small rule tables: pricing, the 9-point splits. Divider rules only, flush
   left, no borders around the box — a table on a scorecard, not a spreadsheet. */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 15px;
}

th,
td {
  text-align: left;
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--divider);
  vertical-align: top;
}

th {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

td:last-child,
th:last-child {
  padding-right: 0;
}

.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* In-page contents for the games page. */
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

/* Screenshots. `object-fit: contain` on a fixed-ratio box so a replacement of a
   different size can't reflow the row. */
.shots {
  display: grid;
  /* Four phones across at the page's width; two-by-two on a phone (below). */
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.shots figure {
  margin: 0;
}

.shots img {
  width: 100%;
  display: block;
  border: 1px solid var(--divider);
  background: var(--surface);
}

.shots figcaption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.pill {
  display: inline-block;
  background: var(--accent-100);
  color: var(--accent-800);
  font-size: 13px;
  padding: 4px 10px;
}

hr {
  border: 0;
  border-top: 1px solid var(--divider);
  margin: 48px 0;
}

/* ── Footer ─────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--divider);
  margin-top: 64px;
  padding: 24px 0 48px;
  font-size: 14px;
  color: var(--muted);
}

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

footer nav {
  margin-bottom: 8px;
}

@media (max-width: 520px) {
  h1 {
    font-size: 30px;
    margin-top: 32px;
  }

  .lede {
    font-size: 18px;
  }

  .shots {
    grid-template-columns: repeat(2, 1fr);
  }
}
