@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Unbounded";
  src: url("fonts/unbounded.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --porcelain: #f2f4f7;
  --paper: #ffffff;
  --ink: #14213d;
  --ink-soft: #5b6680;
  --cobalt: #2343b0;
  --on-cobalt: #ffffff;
  --cobalt-mist: #c9d3f5;
  --saffron: #f2b432;
  --on-saffron: #14213d;
  --stone: #a3abbc;
  --line: #dce1ea;
  --well: #e8ebf1;
  --link: #2343b0;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --porcelain: #0e1630;
    --paper: #19233f;
    --ink: #e8ecf5;
    --ink-soft: #9aa6c2;
    --cobalt: #3d5fd9;
    --cobalt-mist: #c9d3f5;
    --stone: #4a5573;
    --line: #2b3658;
    --well: #1f2a4a;
    --link: #a9b9f2;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--porcelain);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

/* Header: letter tiles like the game board */
.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.brand a {
  text-decoration: none;
  color: inherit;
}

.tiles {
  display: flex;
  gap: 6px;
}

.tile {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: "Unbounded", system-ui, sans-serif;
  font-weight: 700;
  font-size: 19px;
  background: var(--cobalt);
  color: var(--on-cobalt);
}

.tile.present {
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--line);
  position: relative;
}

.tile.present::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--saffron);
  z-index: 0;
}

.tile.present span {
  position: relative;
  z-index: 1;
  color: var(--on-saffron);
}

.tile.absent {
  background: var(--stone);
  color: var(--on-cobalt);
}

/* Language switch */
.lang-switch {
  display: inline-flex;
  background: var(--well);
  border-radius: 10px;
  padding: 3px;
}

.lang-switch a {
  font-weight: 700;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 8px;
  color: var(--ink-soft);
  text-decoration: none;
}

.lang-switch a[aria-current="true"] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(20, 33, 61, 0.12);
}

/* Text */
h1,
h2,
h3 {
  font-family: "Unbounded", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(26px, 6vw, 34px);
  margin: 0 0 6px;
}

h2 {
  font-size: 20px;
  margin: 36px 0 10px;
}

h3 {
  font-size: 16px;
  margin: 22px 0 6px;
}

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

ul,
ol {
  padding-left: 22px;
}

li + li {
  margin-top: 6px;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

.meta {
  color: var(--ink-soft);
  font-size: 15px;
  margin-bottom: 24px;
}

.lead {
  font-size: 19px;
}

/* Cards */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin: 18px 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.card.highlight {
  border-left: 6px solid var(--cobalt);
}

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.button {
  display: inline-block;
  background: var(--cobalt);
  color: var(--on-cobalt);
  font-weight: 700;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 10px;
}

.button:focus-visible,
.lang-switch a:focus-visible,
a:focus-visible {
  outline: 3px solid var(--saffron);
  outline-offset: 2px;
}

/* Colour key */
.key {
  list-style: none;
  padding: 0;
}

.key li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.key .tile {
  width: 32px;
  height: 32px;
  font-size: 15px;
  flex: none;
}

/* FAQ */
details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

details:last-of-type {
  border-bottom: 1px solid var(--line);
}

summary {
  cursor: pointer;
  font-weight: 700;
  list-style-position: outside;
}

details > p {
  margin: 8px 0 0;
}

.notice {
  font-size: 13px;
  color: var(--ink-soft);
}

footer {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 14px;
}

footer a {
  color: inherit;
}

/* Four Minutes: olive cloth and highlighter instead of cobalt and saffron. */
.theme-fm {
  --porcelain: #eef0e6;
  --ink: #1d2212;
  --ink-soft: #5e654d;
  --cobalt: #3f4d14;
  --link: #3f4d14;
  --line: #d9dccb;
  --well: #e3e6d7;
  --marker: #e4f25c;
}

@media (prefers-color-scheme: dark) {
  .theme-fm {
    --porcelain: #14170d;
    --paper: #1e2215;
    --ink: #eef1e0;
    --ink-soft: #a9b093;
    --cobalt: #55661f;
    --link: #d4e36a;
    --line: #333923;
    --well: #262b1b;
  }
}

.theme-fm .tile.present {
  background: var(--marker);
  border: none;
}

.theme-fm .tile.present::after {
  display: none;
}

.theme-fm .tile.present span {
  color: #1d2212;
}
