/* Generic monospace font stack for terminal rendering.

Prefers system monospace fonts, with optional Fira Code / Roboto Mono if available.
We avoid external font fetching (e.g. Google Fonts) to keep local server self-contained.
*/

:root {
  --textual-webterm-mono: ui-monospace, "SFMono-Regular", "FiraCode Nerd Font",
    "FiraMono Nerd Font", "Fira Code", "Roboto Mono", Menlo, Monaco, Consolas,
    "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace;
}

body {
  font-family: var(--textual-webterm-mono);
}

/*
  textual_serve's bundled textual.js hard-codes xterm's Terminal fontFamily:
  "'Roboto Mono', Monaco, 'Courier New', monospace".

  If Roboto Mono isn't available, it falls back to Courier and looks wrong.
  We override that here with higher specificity + !important.
*/
.textual-terminal .xterm,
.textual-terminal .xterm .xterm-rows,
.textual-terminal .xterm .xterm-helper-textarea,
.textual-terminal .xterm .xterm-viewport,
.textual-terminal .xterm .xterm-screen {
  font-family: var(--textual-webterm-mono) !important;
}
