@font-face { font-family: "Figtree"; src: url(fonts/figtree-latin-400-normal.woff2) format("woff2"); font-weight: 400; }
@font-face { font-family: "Figtree"; src: url(fonts/figtree-latin-600-normal.woff2) format("woff2"); font-weight: 600; }
@font-face { font-family: "Figtree"; src: url(fonts/figtree-latin-700-normal.woff2) format("woff2"); font-weight: 700; }
@font-face { font-family: "DM Mono"; src: url(fonts/dm-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; }

:root {
  --bg: #1e1f22;
  --surface: #2a2b2f;
  --surface-hover: #35373c;
  --ring: rgba(255, 255, 255, 0.06);
  --ring-strong: #3a3c41;
  --text: #ece8df;
  --muted: #b0ada6;
  --accent: #4c8dff;
  /* Text on the accent; the settings switch it to a dark tone for light accents. */
  --on-accent: #ffffff;
  /* Derived from the accent, so a different accent changes them too. */
  --accent-press: color-mix(in srgb, var(--accent) 85%, black);
  --on-accent-muted: color-mix(in srgb, var(--on-accent) 70%, transparent);
  --danger: #e06c5f;
  --radius: 10px;
  /* Width of the thin outlines (cards, panels). */
  --line: 1px;
  /* Focus ring width on the home screen and the guide (rem: scales with them). */
  --focus: 0.1875rem;
  --font-display: "Figtree", "Segoe UI", sans-serif;
  --font-text: "Figtree", "Segoe UI", sans-serif;
  --font-mono: "DM Mono", Consolas, monospace;
}

/* Settings: a thicker focus ring. */
:root.thick-focus { --focus: 0.3125rem; }

/* Settings: high contrast. Black, white text and lines, and a thick yellow
   focus (the accent, set in prefs.js). Our own colours, not Windows' forced ones. */
:root { forced-color-adjust: none; }
:root.high-contrast {
  --bg: #000000;
  --surface: #000000;
  --surface-hover: #1c1c1c;
  --ring: #ffffff;
  --ring-strong: #ffffff;
  --text: #ffffff;
  --muted: #e6e6e6;
  --danger: #ff8a7a;
  --focus: 0.3125rem;
  --line: 2px;
}

* { box-sizing: border-box; }

/* Windows' "Show animations" off: no transitions or CSS animations (the
   canvases check the same query). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

html, body { margin: 0; color: var(--text); font-family: var(--font-text); }

/* Controller button hint: the buttons drawn as on the controller, in the
   secondary grey (white on an accent background). */
.glyph {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  color: var(--muted);
}
/* Each button drawn with a thin outline in the hint's colour, as on the controller. */
.btn { display: inline-grid; place-items: center; height: 1.7em; min-width: 1.7em; box-shadow: inset 0 0 0 max(2px, 0.12em) currentColor; font-size: 0.85em; text-box: trim-both cap alphabetic; }
/* Two characters in a round button (L3, R3). */
.btn-face.wide { font-size: 0.7em; height: 2.06em; min-width: 2.06em; letter-spacing: -0.02em; }
.btn-face { border-radius: 50%; }
/* A bumper is flat on top and rounded below; a trigger is round on top. */
.btn-bumper { padding: 0 0.45em; border-radius: 0.25em 0.25em 0.6em 0.6em; }
.btn-trigger { padding: 0 0.45em; height: 1.9em; border-radius: 0.9em 0.9em 0.25em 0.25em; }
.btn-plain { box-shadow: none; min-width: 0; }
.btn .glyph-icon { display: block; width: 1.05em; height: 1.05em; }
/* A button inside a sentence. */
/* A button inside a sentence: its letter sits on the text's baseline; a
   symbol is centred on the capitals around it. */
.glyph.inline { font-size: 1em; color: inherit; vertical-align: baseline; margin: 0 0.1em; }
/* Buttons pressed together: a muted + with room on both sides. */
.plus { margin: 0 0.375em; color: var(--muted); font-weight: 400; }
.combo { white-space: nowrap; }
.glyph.inline .btn { font-size: 0.8em; }
.glyph.inline:has(.glyph-icon) { vertical-align: -0.16em; }
