/* Shared by index.html and leaderboard.html: colour tokens, top bar, light/dark toggle */

/* JetBrains Mono (SIL Open Font License, static/fonts/OFL.txt), self-hosted: one variable file per script covers weights 400-700 */
@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;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/jetbrains-mono-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: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/jetbrains-mono-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

/* Light mode (default) */
:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted: #6b6b6b;
  --line: #e5e5e5;
  --row-hover: #f6f6f6;
  --track: #ececec;
  --bar: #000000;
  color-scheme: light;
}

/* Dark mode: only when the visitor picks it with the toggle */
:root[data-theme="dark"] {
  --bg: #0b0b0b;
  --fg: #ffffff;
  --muted: #8f8f8f;
  --line: #262626;
  --row-hover: #151515;
  --track: #242424;
  --bar: #ffffff;
  color-scheme: dark;
}

.lb-nav {
  max-width: 960px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.6;
}

.lb-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.lb-brand {
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
}

.lb-nav nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.lb-nav nav a:hover,
.lb-nav nav a[aria-current="page"] {
  color: var(--fg);
}

.lb-theme {
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
}

.lb-theme:hover {
  color: var(--fg);
  border-color: var(--fg);
}
