/* Static guide pages (public/how-to-play.html, public/fr/comment-jouer.html): plain HTML readable without scripts, in
   the game's look (tokens of src/styles.css). A file of its own: the CSP (public/_headers) allows no inline style. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('/fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('/fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #05070c;
  --panel: #0a0e16;
  --rule: rgba(255, 255, 255, 0.09);
  --rule-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f6;
  --text-2: #8a93a6;
  --text-3: #5b6475;
  --accent: #c8ff2e;
  --accent-hover: #d8ff6a;
  --on-accent: #05070c;
  --tier-0: #6ef0c0;
  --tier-1: #ffc53d;
  --tier-2: #ff5c5c;
  --radius: 4px;
  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: dark;
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse 90% 50% at 85% -10%, rgba(70, 120, 255, 0.14), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--text);
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: var(--accent);
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
}

/* Top bar: the wordmark (back to the game) and the other language. */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  font-size: 22px;
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
}
.wordmark span {
  color: var(--accent);
}
.lang-link {
  font-size: 13px;
  color: var(--text-2);
}

.label {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
}

h1 {
  margin: 40px 0 0;
  font-size: clamp(40px, 9vw, 72px);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
h1 span {
  display: block;
  color: var(--accent);
}
.lead {
  max-width: 600px;
  margin: 22px 0 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text);
}

h2 {
  margin: 56px 0 14px;
  font-size: 26px;
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
}
p,
ul {
  margin: 0 0 14px;
  color: var(--text-2);
}
p strong,
li strong {
  color: var(--text);
  font-weight: 700;
}
ul {
  padding-left: 20px;
}
li + li {
  margin-top: 6px;
}

/* The big "Play now" button, as on the home screen. */
.play {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  height: 56px;
  margin-top: 28px;
  padding: 0 22px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.16s;
}
.play:hover {
  background: var(--accent-hover);
}
.play::after {
  content: '\2192';
  font-size: 20px;
  line-height: 1;
}

/* Distance to points. */
.score-table {
  width: 100%;
  max-width: 420px;
  margin: 8px 0 18px;
  border-collapse: collapse;
  font-size: 14px;
}
.score-table th,
.score-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}
.score-table th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
}
.score-table td {
  font-family: var(--mono);
  color: var(--text);
}
.score-table td + td {
  color: var(--accent);
}
.formula {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-2);
}

.tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.tiers li {
  margin: 0;
  padding: 4px 10px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
}
.tiers li::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  vertical-align: 1px;
}
.tiers .t0::before {
  background: var(--tier-0);
}
.tiers .t1::before {
  background: var(--tier-1);
}
.tiers .t2::before {
  background: var(--tier-2);
}

/* Game modes: one card each. */
.modes {
  display: grid;
  gap: 12px;
}
.mode {
  padding: 18px 20px 6px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--panel);
}
.mode-meta {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}

.faq h3 {
  margin-top: 26px;
}

.foot {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--text-3);
}
.foot p {
  margin: 0 0 8px;
  color: var(--text-3);
}
.foot a {
  color: var(--text-2);
}

@media (max-width: 640px) {
  .page {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  h1 {
    margin-top: 32px;
  }
  .lead {
    font-size: 17px;
  }
  h2 {
    margin-top: 44px;
    font-size: 23px;
  }
  .mode {
    padding: 16px 16px 4px;
  }
  .play {
    max-width: none;
  }
}
