/* LLeMbas dev (f5b3dbb96582) static/css/tokens.css, copied by scripts/fetch-tokens.sh: do not edit. The font-face rules are left out; the app bundles no font. */ /* Design tokens. Every colour, space and radius in the application resolves through a variable declared here. Component CSS must never hard-code a hex value -- that is what makes adding a theme a matter of writing one new block rather than auditing every stylesheet. Themes are selected with data-theme on . `moria` is the default and is declared on :root so the page is styled even before the theme script runs. */ :root { /* --- Type ------------------------------------------------------------- */ /* The chrome -- buttons, navigation, tabs, labels, headings -- is set in `--font-ui`, a monospace face: "Middle-earth on a terminal". What people *read* at length, a reply or a note, stays in `--font-body`, because eighty columns of mono prose is tiring and the look is not worth that. `--font-display` follows the chrome. */ --font-ui: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace; --font-display: var(--font-ui); --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Fira Code", "Cascadia Code", Menlo, Consolas, monospace; --text-xs: 0.75rem; --text-sm: 0.8125rem; --text-base: 0.9375rem; --text-md: 1rem; --text-lg: 1.125rem; --text-xl: 1.375rem; --text-2xl: 1.75rem; --leading-tight: 1.25; --leading-normal: 1.6; --leading-relaxed: 1.75; /* --- Space (4px scale) ------------------------------------------------ */ /* Half a step: the gap between the lines of one tool result, the bleed of a mention's highlight. The one place a 2px space is allowed to be named. */ --sp-half: 0.125rem; --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem; --sp-4: 1rem; --sp-5: 1.25rem; --sp-6: 1.5rem; --sp-8: 2rem; --sp-10: 2.5rem; --sp-12: 3rem; /* --- Radius & shadow -------------------------------------------------- */ /* Blocks, not pills. Small on purpose: a corner of 2px reads as square at reading distance and still stops an edge looking cut. Avatars and dots keep `--radius-full`. */ --radius-sm: 2px; --radius: 2px; --radius-md: 3px; --radius-lg: 4px; --radius-xl: 6px; --radius-full: 999px; /* Square, on purpose: the sidebar's Chats/Agents switch, which has to read as one solid control rather than as two buttons. */ --radius-none: 0; /* How far a block button travels when pressed: into its own shadow, which is drawn exactly this far out. The two are one number on purpose. */ --press: 2px; /* The load-state dot on a model's avatar in the model menu. Its colours are tokens of their own, defaulting to the theme's success and warning, so an instance whose success colour is not green can still say "loaded" in green -- that is what people read a dot beside a name as. */ --model-state-size: 0.625rem; --model-state-loaded: var(--success); --model-state-loading: var(--warning); /* --- Controls ---------------------------------------------------------- Every button, input and select resolves its height from these. That is the whole reason things line up: a row of mixed controls has one height, not whatever each element's padding and font happened to add up to. */ --control-h: 2.25rem; --control-h-sm: 1.75rem; --control-h-lg: 2.75rem; --control-px: 0.75rem; --control-px-sm: 0.5rem; /* --- Layout ----------------------------------------------------------- */ --sidebar-width: 17.5rem; --inspector-width: 24rem; /* Wider than the inspector because the content is not prose: eighty columns of --font-mono do not fit in 24rem, and a terminal narrower than eighty re-wraps everything a program prints. */ --terminal-width: 34rem; --terminal-width-min: 24rem; --thread-max-width: 48rem; --header-height: 3.5rem; /* --- The sizes of things ------------------------------------------------- Caps and floors that used to be a literal rem in seventy places across three stylesheets -- 20, 22, 24, 26 -- with no way to tell which of them meant the same thing. A handful of roles instead, and a component takes the one that names what it is: a theme can then widen every menu at once, and two popovers cannot drift a rem apart by accident. Control heights are `--control-h`; these are the boxes around them. */ --w-field-xs: 8rem; /* a short input: a count, a duration */ --w-field-sm: 10rem; /* a short select's floor */ --w-field: 14rem; /* a capped field, a label column, a small menu */ --w-chip: 16rem; /* a name that truncates: a model, a path */ --w-menu-sm: 20rem; /* a compact popover, an attachment chip */ --w-menu: 24rem; /* a popover, a results list, a card's column */ --w-menu-lg: 28rem; /* a wide popover */ --w-dialog: 34rem; /* a dialog with a list in it */ --w-prose-sm: 32rem; /* a short reading measure: an empty state */ --w-prose: 44rem; /* a reading measure: a lede, a card grid */ --h-list: 22rem; /* a scrolling list or menu */ --h-block: 24rem; /* a scrolling block inside a card */ --h-block-lg: 26rem; /* a reasoning body, a preview */ --h-media: 20rem; /* a picture in the transcript */ /* The live reply's two one-line rows -- the waiting row and the metrics -- keep this height whether or not they have anything in them, so their content arriving or leaving never moves the transcript. One line of the small type. */ --row-h: calc(var(--text-xs) * var(--leading-normal) + 2 * var(--sp-2)); /* A dot that marks state: unsaved, unread. */ --dot-size: 0.375rem; /* The streaming caret: a thin bar the height of a line. */ --caret-bar-w: 0.45rem; /* The drag handle on a panel's edge: how wide, and how far it overhangs the panel so the border itself is inside the target. */ --resize-w: 9px; --resize-overhang: 3px; /* A faded control: something present but not the point. */ --opacity-dim: 0.45; /* What `--header-height` does at the top of the shell, this does at the bottom. The sidebar's footer and the composer sit either side of the same vertical line and both are content-sized, so without this they end at different heights -- and neither can be made to match the other by accident: the footer's height depends on which entries the reader's permissions allow, and the composer's on how much they have typed. This began as the fix for a broken *line*: both carried a top border, and the two met the sidebar's edge at different heights. The borders are gone now -- an edge that content scrolls under reads better undrawn than drawn and aligned -- and the token stays, because the two ends of the shell sitting at different heights is visible without any border to prove it. A calc of the pieces the footer is actually built from -- four rows at `--control-h`, the gaps between them, and its own padding -- so it stays true if those tokens move. Applied as a `min-height` to both: it holds the footer at full height even for somebody who sees fewer entries, and lifts the composer to meet it. A composer that grows past this as somebody types is expected; the input is getting bigger, and nothing is pretending the sidebar should follow it. */ --footer-height: calc(4 * var(--control-h) + 3 * var(--sp-1) + 2 * var(--sp-2)); /* The terminal's own type. xterm holds this as a number rather than reading it from CSS, so terminal.js parses it back out -- it must stay a plain pixel value. */ --terminal-font-size: 13px; /* --- Stacking ---------------------------------------------------------- These were four bare numbers scattered across two stylesheets, which is fine until something new has to sit between two of them and nobody can say what is already there. */ --z-raised: 5; --z-handle: 10; --z-dropdown: 30; --z-panel: 40; --z-toast: 60; --transition-fast: 120ms ease; --transition: 200ms ease; /* --- Borders ----------------------------------------------------------- A hairline was a literal `1px` in about ninety places, which made it the largest category of hard-coded value left in the codebase -- and the one thing a theme cannot currently change. */ --border-w: 1px; --border-w-thick: 2px; --border-w-accent: 3px; /* The focus outline's own width. Not `--border-w-thick`, though they are the same number today: an outline is drawn outside the box and takes no space, a border is part of the box and does. Making one of them follow the other means a theme that wants a heavier border gets a heavier focus ring too, which is two decisions tied together by a coincidence. */ --outline-w: 2px; /* How far the focus ring stands off the box it rings. */ --outline-offset: 2px; /* --- Touch -------------------------------------------------------------- A control a thumb has to hit is 44px. `--control-h` is 2.25rem, which is 36 -- comfortable with a pointer and under every published minimum for a finger -- so the coarse-pointer block at the foot of this file raises the control tokens to this rather than patching components one at a time. Raising the token is the only version that reaches all of them, and it is what `--control-h` exists for. */ --tap-min: 2.75rem; /* A tick box, which does not take its size from `--control-h`: the browser draws it and only `width`/`height` move it. */ --check-size: 1rem; /* --- Controls as a family ----------------------------------------- The dropdown's caret is a solid ▾ drawn with two gradients rather than a glyph -- a