diff --git a/CLAUDE.md b/CLAUDE.md
index 832d1f1..47c69a2 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -13,7 +13,7 @@
`scenarios/*.rb` (one chapter each, listed in `scenarios.rb`). Delivery chapters use `repo.rb` (fake git),
`delivery_commands.rb` (git, gh, bin/rails test, deploy), `delivery_ci.rb` and `delivery_world.rb`.
- `frontend/`: React + TypeScript (Vite), xterm.js terminal. Play screen is `src/components/PlayScreen.tsx`.
-- UI follows Royal's UI style rules (Geist, motion, accessibility) with this app's own "System map" theme in
+- UI follows Royal's UI style rules (motion, accessibility). Type: Space Grotesk headings, Geist body, JetBrains Mono for terminal and labels, with this app's own "System map" theme in
`frontend/src/styles.css`. Don't reuse the helpdesk look (dark sidebar + blue pill).
## Checks before opening a pull request
diff --git a/docs/play-screen.png b/docs/play-screen.png
index 7e9f6f3..f1d03ab 100644
Binary files a/docs/play-screen.png and b/docs/play-screen.png differ
diff --git a/frontend/index.html b/frontend/index.html
index 14e6d4d..92fbdae 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -8,7 +8,7 @@
DevOps Simulator
-
+
diff --git a/frontend/src/components/Terminal.tsx b/frontend/src/components/Terminal.tsx
index a1e04c1..72bf04d 100644
--- a/frontend/src/components/Terminal.tsx
+++ b/frontend/src/components/Terminal.tsx
@@ -21,6 +21,7 @@ interface Props {
const COLORS = { amber: '\x1b[38;2;255;181;71m', green: '\x1b[38;2;75;227;161m', muted: '\x1b[38;2;142;137;176m', red: '\x1b[38;2;255;143;166m' }
const RESET = '\x1b[0m'
+const FONT = '"JetBrains Mono", ui-monospace, monospace'
// A small line editor on top of xterm.js: typing, backspace, left/right,
// history with up/down, Ctrl+C, Ctrl+L and paste. Commands go to the server.
@@ -68,7 +69,7 @@ export const Terminal = forwardRef(function Terminal({ pr
useEffect(() => {
const t = new XTerm({
- fontFamily: '"Geist Mono", ui-monospace, monospace',
+ fontFamily: FONT,
fontSize: 13,
lineHeight: 1.35,
cursorBlink: true,
@@ -91,6 +92,13 @@ export const Terminal = forwardRef(function Terminal({ pr
if (dims && (dims.cols !== t.cols || dims.rows !== t.rows)) fit.fit()
})
resize.observe(host.current!)
+ // The web font may arrive after xterm measured its cells. Re-measure once it's loaded.
+ void document.fonts?.load('13px "JetBrains Mono"').then(() => {
+ if (term.current !== t) return
+ t.options.fontFamily = 'monospace'
+ t.options.fontFamily = FONT
+ if (host.current?.offsetWidth) fit.fit()
+ })
t.onResize(() => redrawLine())
if (intro) t.write(COLORS.muted + intro.replace(/\r?\n/g, '\r\n') + RESET + '\r\n\r\n')
redrawLine()
diff --git a/frontend/src/styles.css b/frontend/src/styles.css
index 5d3a421..b3813e5 100644
--- a/frontend/src/styles.css
+++ b/frontend/src/styles.css
@@ -3,7 +3,8 @@
:root,
[data-theme='dark'] {
--font-sans: 'Geist', system-ui, sans-serif;
- --font-mono: 'Geist Mono', ui-monospace, monospace;
+ --font-mono: 'JetBrains Mono', ui-monospace, monospace;
+ --font-display: 'Space Grotesk', 'Geist', system-ui, sans-serif;
--ground: #0D0B1A;
--surface: #15132A;
@@ -48,6 +49,7 @@ body { font: 14px/1.5 var(--font-sans); color: var(--ink); background: var(--gro
h1, h2 { margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
+h1, h2, .node-name, .metric, .chapter-n { font-family: var(--font-display); }
:focus-visible { outline: none; box-shadow: var(--focus); }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }