/* The site's text: the static pages (pages/layout.ts: the guide, what's new,
   about, privacy, not found) and the home page's text below the game's
   window (index.html #intro). Everything is under .page (and the static
   pages' body, body.site-page), so the game's own interface, which loads this
   file on the home page, is never touched. The game's colours, laid out for
   reading: one column, a comfortable line, text you can select. The bar and
   the footer are site.css's. */

:root {
  --bg: #0e1524;
  --panel: #141c2c;
  --line: #26324a;
  --text: #e6e9ef;
  --soft: #b9c3d6;
  --muted: #8b98ad;
  --gold: #ffd166;
  --link: #7fb0ff;
  --blue: #3b6fd4;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 72px;
}

body.site-page {
  margin: 0;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 8px;
  z-index: 10;
  padding: 6px 12px;
  background: var(--panel);
}

/* --- The text --- */

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 16px 56px;
  color: var(--soft);
  font: 17px/1.65 "Segoe UI", system-ui, sans-serif;
  text-align: left;
  user-select: text;
}

.page a {
  color: var(--link);
  text-underline-offset: 2px;
}

.page a:hover {
  color: #a9c9ff;
}

.page .icon {
  width: 1.2em;
  height: 1.2em;
  vertical-align: -0.25em;
  fill: currentColor;
  flex: none;
}

.page .button {
  display: inline-block;
  padding: 7px 20px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.page .button:hover {
  background: #4a7de2;
  color: #fff;
}

.page h1,
.page h2,
.page h3 {
  color: var(--text);
  line-height: 1.25;
}

.page h1 {
  font-size: 34px;
  margin: 0 0 14px;
  letter-spacing: 0.3px;
}

.page h2 {
  font-size: 23px;
  margin: 44px 0 12px;
}

.page h3 {
  font-size: 18px;
  margin: 26px 0 8px;
}

.page h2 .icon {
  color: var(--gold);
  margin-right: 4px;
}

.page p,
.page ul,
.page ol {
  margin: 0 0 14px;
}

.page ul,
.page ol {
  padding-left: 26px;
}

.page li {
  margin-bottom: 6px;
}

.page b,
.page strong {
  color: var(--text);
}

.page .lede {
  font-size: 19px;
  color: var(--text);
}

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

.page sup {
  line-height: 0;
}

.page kbd {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid #3a4a68;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--panel);
  color: var(--text);
  font: 600 14px/1.5 Consolas, monospace;
  white-space: nowrap;
}

/* On this page: the guide's sections. */
.page .toc {
  margin: 26px 0 8px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.page .toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 32px;
  font-size: 15px;
}

.page .toc li {
  margin-bottom: 3px;
}

/* The short version: the game's help rows with their icons. */
.page .rows {
  list-style: none;
  padding: 0;
}

.page .rows li {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.page .rows .icon {
  width: 22px;
  height: 22px;
  margin-top: 3px;
  color: var(--gold);
}

/* Tables: the buildings, the keys. */
.page .table-wrap {
  overflow-x: auto;
  margin: 0 0 14px;
}

.page table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}

.page th,
.page td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.page thead th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.page tbody th {
  color: var(--text);
  white-space: nowrap;
}

.page tbody th .icon {
  color: var(--gold);
  margin-right: 4px;
}

.page .n {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* A figure and its unit stay on one line; a table too wide scrolls (.table-wrap). */
.page td.n {
  white-space: nowrap;
}

.page .keys th {
  width: 1%;
}

/* The guides: the way back to their list on top of each, the list itself
   (/guides, one card per guide), and the other guides at the foot. */
.page .crumb {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.page .crumb span {
  margin: 0 4px;
}

.page .cards {
  list-style: none;
  margin: 28px 0 8px;
  padding: 0;
}

.page .cards li {
  margin-bottom: 12px;
  padding: 16px 20px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.page .cards h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.page .cards h2 a {
  text-decoration: none;
}

.page .cards h2 a:hover {
  text-decoration: underline;
}

.page .more {
  margin-top: 48px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.page .more h2 {
  margin-top: 24px;
  font-size: 19px;
}

.page .more ul {
  columns: 2;
  column-gap: 32px;
}

/* What's new: one entry per day. */
.page .entry h2 {
  font-size: 21px;
}

.page .entry time {
  display: block;
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .page {
    font-size: 16px;
  }

  .page h1 {
    font-size: 28px;
  }

  .page .toc ol,
  .page .more ul {
    columns: 1;
  }
}

@media print {
  body.site-page {
    background: #fff;
  }

  .page {
    color: #000;
  }

  .page .toc,
  .page .crumb,
  .page .more {
    display: none;
  }

  .page h1,
  .page h2,
  .page b,
  .page strong,
  .page .lede,
  .page tbody th,
  .page a {
    color: #000;
  }
}
