/* (#1297) The public pages (privacy, terms, rules, credits, the 404): the game's fonts and its deep-sea colours, one readable column */
@font-face {
  font-family: 'Pirata One';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/pirata-one-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-weight: 200 1000;
  font-display: swap;
  src: url('/fonts/nunito-latin-wght.woff2') format('woff2');
}

:root {
  --cream: #FBF3DF;
  --cream-dim: rgba(251, 243, 223, 0.78);
  --cream-faint: rgba(251, 243, 223, 0.55);
  --gold: #F4C542;
  --gold-soft: #E8C986;
  --red: #E0533F;
  --rule: rgba(232, 201, 134, 0.3);
  --card: rgba(6, 26, 40, 0.45);
}

* { box-sizing: border-box; }
html { background: #0B3550; }
body {
  margin: 0; min-height: 100vh;
  background: linear-gradient(#12597A 0%, #0B3550 45%, #08263A 100%) fixed;
  color: var(--cream); font: 400 17px/1.6 'Nunito', 'Trebuchet MS', system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--gold-soft); text-underline-offset: 2px; }
a:hover { color: var(--gold); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 2px; }

.top {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px;
  max-width: 70ch; margin: 0 auto; padding: 22px 20px 6px;
}
.home { font: 400 2rem/1 'Pirata One', Georgia, serif; text-decoration: none; letter-spacing: 0.01em; }
.home .gold { color: var(--gold); }
.home .red { color: var(--red); }
.pages { display: flex; flex-wrap: wrap; gap: 4px 16px; font-weight: 700; font-size: 15px; }
.pages a { color: var(--cream-dim); text-decoration: none; }
.pages a:hover { color: var(--cream); text-decoration: underline; }
.pages [aria-current] { color: var(--gold); }

main { max-width: 70ch; margin: 0 auto; padding: 8px 20px 24px; }
h1 { margin: 18px 0 4px; font: 400 2.6rem/1.1 'Pirata One', Georgia, serif; color: var(--gold); letter-spacing: 0.01em; }
h2 { margin: 2rem 0 0.4rem; font-size: 1.2rem; font-weight: 800; color: var(--gold-soft); }
h3 { margin: 1.2rem 0 0.2rem; font-size: 1rem; font-weight: 800; }
p, ul, ol { margin: 0.5rem 0; }
li { margin: 0.25rem 0; }
.lead { color: var(--cream-dim); }
.dated { color: var(--cream-faint); font-size: 14px; font-weight: 700; }
b, strong { font-weight: 800; }
code { font: 0.9em ui-monospace, Menlo, Consolas, monospace; color: var(--gold-soft); overflow-wrap: anywhere; }

/* Tables scroll sideways on a narrow screen rather than squeezing the words */
.table { overflow-x: auto; margin: 0.6rem 0; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
th, td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
th { font-weight: 800; color: var(--gold-soft); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.group { padding-top: 12px; font-weight: 800; color: var(--gold); background: rgba(232, 201, 134, 0.06); }
/* A storage key never breaks inside its name, only between names */
td code { white-space: nowrap; }

.choices { display: inline-block; margin: 0.4rem 0; padding: 8px 16px; border: 1px solid var(--gold-soft); border-radius: 8px; font-weight: 800; text-decoration: none; }
.choices:hover { background: rgba(232, 201, 134, 0.12); }

footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px;
  max-width: 70ch; margin: 0 auto; padding: 16px 20px 32px; border-top: 1px solid var(--rule);
  color: var(--cream-faint);
}
/* (the small type on the children, so the footer's 70ch matches the column above) */
footer > * { font-size: 14px; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .top { padding-top: 16px; }
  h1 { font-size: 2.1rem; }
  th, td { padding: 7px 8px; }
  /* (the box scrolls sideways rather than squeezing four columns into a phone's width) */
  table { min-width: 36rem; font-size: 14px; }
}
