/* ============================================================================ Strata — application styles ---------------------------------------------------------------------------- Everything here sits on top of the design kit (src/styles/kit/tokens.css and components.css). Rules are grouped as: 1. extensions — sizes and tones the kit's reference classes do not cover 2. shell — app layout: sidebar, header, content column 3. utilities — small helpers used across screens 4. components — the pieces that only exist in this app 5. first run — the onboarding takeover House rules, taken from the kit: · no gradients anywhere — flat surfaces, one green accent · radius 8 small · 14 controls · 20 cards · 24 panels · elevation comes from --st-sh-card / --st-sh-bar / --st-sh-pop only · every colour is a token, so light and dark share one layout ========================================================================== */ /* ---------------------------------------------------------------- motion --- One scale, fusing the kit's single pair (--st-ease / --st-dur, left untouched so the kit's own classes keep their timing) with DSH's .1/.2/.3s vocabulary. Duration is chosen by distance travelled, not by taste: micro ≤ 4px — hover, press, colour and opacity on controls control ≤ 16px — menus, rows appearing, small transforms local ≤ 24px — drawers, sheets, disclosure surface — full panel or whole screen choreo — multi-element sequences only (onboarding, first paint) See docs/interaction-guidelines.md for the rules these implement. */ :root { --st-t-micro: 100ms; --st-t-control: 160ms; --st-t-local: 240ms; --st-t-surface: 320ms; --st-t-choreo: 460ms; --st-ease-standard: cubic-bezier(0.4, 0, 0.2, 1); /* DSH's curve */ --st-ease-enter: cubic-bezier(0, 0, 0.2, 1); /* decelerate in */ --st-ease-exit: cubic-bezier(0.4, 0, 1, 1); /* accelerate out */ --st-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1); /* loops only */ --st-ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1); /* direct manipulation only */ --st-nav-w: 268px; --st-nav-w-rail: 64px; --st-header-h: 64px; --st-content-max: 1160px; /* Comfortable prose measure. Assistant text ran at ~103 characters per line, which is ~40% wider than long-form reading wants; 56ch renders as roughly 66–68 actual characters, because the `ch` unit measures the "0" glyph, which is narrower than average running text in this face. Verified against the rendered result at 10, 16 and 22px — see npm run audit. */ --st-measure: 56ch; /* Type inside a conversation follows the reader's text size. The ratios are declared once here, so a rule that scales with the prose uses a token instead of a bespoke calc that the type audit cannot check. */ --st-fs-read-lg: calc(var(--st-content-fs, 12px) * 1.125); /* The small ratio has a floor: at any reading size up to 14px, 0.8125 would put code and tables under 12px (9.75px at the default 12px), which is below what a table of numbers should ask of a reader. */ --st-fs-read-sm: max(12px, calc(var(--st-content-fs, 12px) * .8125)); --st-fs-math: calc(var(--st-content-fs, 12px) * 1.08); --st-fs-math-source: calc(var(--st-content-fs, 12px) * .9); } /* Two shared recipes replace the nine bespoke entrance keyframes this file used to carry. Direction and distance come from custom properties, so a surface declares where it comes *from* and inherits identical timing behaviour. */ @keyframes st-enter { from { opacity: 0; transform: translate(var(--st-from-x, 0), var(--st-from-y, 8px)) scale(var(--st-from-scale, 1)); } to { opacity: 1; transform: none; } } @keyframes st-exit { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate(var(--st-to-x, 0), var(--st-to-y, 6px)); } } /* Reduced motion substitutes *opacity for movement* rather than silencing animation: a state change must stay perceivable. Distances collapse to zero and durations to a single frame; opacity and colour still transition. The distance properties must be zeroed on the elements themselves — a value set on :root is only inherited, so any rule that declares its own --st-from-x (e.g. .setup__stage) would win over it. Durations live at the root because nothing else declares them. */ @media (prefers-reduced-motion: reduce) { :root { --st-t-micro: 1ms; --st-t-control: 1ms; --st-t-local: 1ms; --st-t-surface: 1ms; --st-t-choreo: 1ms; } *, *::before, *::after { --st-from-x: 0px !important; --st-from-y: 0px !important; --st-from-scale: 1 !important; --st-to-x: 0px !important; --st-to-y: 0px !important; animation-iteration-count: 1 !important; } /* Loops that carry no state (a scan sweep, a ripple) simply stop. */ .checks[data-scanning='true']::after, .ready__ring::after { animation: none !important; } } /* The manual override in Settings → Reading & focus, for people who want stillness without changing an OS setting. */ [data-motion='reduced'] { --st-t-micro: 1ms; --st-t-control: 1ms; --st-t-local: 1ms; --st-t-surface: 1ms; --st-t-choreo: 1ms; } [data-motion='reduced'] *, [data-motion='reduced'] *::before, [data-motion='reduced'] *::after { --st-from-x: 0px !important; --st-from-y: 0px !important; --st-from-scale: 1 !important; --st-to-x: 0px !important; --st-to-y: 0px !important; } [data-motion='reduced'] .checks[data-scanning='true']::after, [data-motion='reduced'] .ready__ring::after { animation: none !important; } /* ---- fluidity ------------------------------------------------------------- Apple-style geometry and interruptible motion, using only features the app's runtime already supports (verified, not assumed). Each is guarded so a browser without it renders the same layout with square-ish corners and instant state changes. */ /* Squircle corners — DSH applies the same superellipse through an @supports guard. Applied globally, then reset on the shapes that must stay circular. */ @supports (corner-shape: superellipse(1.5)) { :root { --st-corner-shape: superellipse(1.5); } *, *::before, *::after { corner-shape: var(--st-corner-shape); } .st-pill, .st-badge, .st-pill__dot, .radio, .checkrow__mark, .stageMark, .spinner, .ready__ring, .enginechip__dot, .typing i, .caret, .st-progress__bar, .st-toggle::after { corner-shape: round; } } /* Disclosure that eases open instead of snapping. `interpolate-size` lets height animate to `auto`, and ::details-content is the element that owns it. Without support the panel simply opens instantly, as it does today. */ @supports (interpolate-size: allow-keywords) { :root { interpolate-size: allow-keywords; } .st-collapse::details-content { block-size: 0; overflow: hidden; transition: content-visibility var(--st-t-local) allow-discrete, block-size var(--st-t-local) var(--st-ease-standard); } .st-collapse[open]::details-content { block-size: auto; } } /* Route changes morph instead of repainting. Deliberately quiet — a short cross-fade with a 4–6px lift — so ⌘1…⌘9 reads as one surface changing its contents rather than a new page arriving. */ ::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--st-t-surface); animation-timing-function: var(--st-ease-standard); } ::view-transition-old(root) { animation-name: st-vt-out; } ::view-transition-new(root) { animation-name: st-vt-in; } @keyframes st-vt-out { to { opacity: 0; transform: translateY(-4px); } } @keyframes st-vt-in { from { opacity: 0; transform: translateY(6px); } } @media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } } /* Switching models re-keys the headline, so the new name arrives rather than silently replacing the old one. A shared-element view transition would be the better tool, but the swap is server-driven and resolves long after the click — startViewTransition has to own the DOM update, and here it cannot. */ .model-hero__title { --st-from-y: 6px; animation: st-enter var(--st-t-local) var(--st-ease-enter) both; } /* ---- scroll-driven chrome ------------------------------------------------- Both effects are pure CSS scroll timelines: no scroll listener, no layout read on the main thread. `timeline-scope` hoists the timeline from the scroller up to .main so the header — a *sibling* of the scroller — can reference it, which is exactly what the property exists for. */ .main { timeline-scope: --transcript; } .main__body { scroll-timeline: --transcript block; } /* The header lifts on scroll by fading a hairline in beneath it. Animating box-shadow here repainted the strip on every scroll frame; opacity on a pseudo-element is compositor-only. */ .main__head::after { content: ''; position: absolute; inset: auto 0 -1px 0; height: 1px; background: color-mix(in srgb, var(--st-ink) 16%, transparent); opacity: 0; pointer-events: none; animation-name: st-headline; animation-duration: auto; animation-timing-function: linear; animation-fill-mode: both; animation-timeline: --transcript; animation-range: 0 48px; } @keyframes st-headline { to { opacity: 1; } } /* The subtitle has done its job once you start reading; it retires rather than sitting there repeating the obvious. */ .main__sub { animation-name: st-subtitle; animation-duration: auto; animation-timing-function: linear; animation-fill-mode: both; animation-timeline: --transcript; animation-range: 0 64px; } @keyframes st-subtitle { to { opacity: 0; transform: translateY(-4px); } } /* Reading position through a long conversation. Sticky inside the scroller so it stays put while the transcript moves under it. */ .chat__progress { position: sticky; top: 0; z-index: 2; height: 2px; margin: 0 0 -2px; pointer-events: none; } .chat__progress span { display: block; height: 100%; background: var(--st-accent); transform-origin: 0 50%; opacity: 0.55; animation-name: st-reading; animation-duration: auto; animation-timing-function: linear; animation-fill-mode: both; animation-timeline: --transcript; } @keyframes st-reading { from { transform: scaleX(0); } to { transform: scaleX(1); } } @media (prefers-reduced-motion: reduce) { .main__head::after, .main__sub, .chat__progress span { animation: none; } /* The subtitle still retires, it just does not travel. */ .main__sub { animation-name: st-subtitle-fade; animation-duration: auto; animation-timing-function: linear; animation-fill-mode: both; animation-timeline: --transcript; animation-range: 0 64px; } } @keyframes st-subtitle-fade { to { opacity: 0; } } /* ============================================================== focus mode == A reading mode, not a different app: the same screens with the chrome withdrawn. Entered with ⌘⇧F, left with Escape or the bar's button. */ .app[data-focus='true'] { grid-template-columns: minmax(0, 1fr); } .app[data-focus='true'] .nav, .app[data-focus='true'] .main__head { display: none; } /* The ambient bar carries only what you need while reading: what is loaded, what it is doing, and the way out. */ /* The hints were 11px boxes jammed against the right edge at the same visual weight as the exit control, so the bar read as debris plus a button. */ .focusbar__keys { display: flex; align-items: center; gap: 10px; font-size: var(--st-fs-xs); color: var(--st-ink-muted); } .focusbar__keys > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; } /* Two caps for one action sit closer to each other than to their label. */ .focusbar__chord { display: inline-flex; gap: 2px; } .focusbar__keys kbd { display: inline-block; min-width: 20px; padding: 2px 6px; border-radius: var(--st-r-sm); border: 1px solid var(--st-line); background: var(--st-surface); font: 500 11px/1.4 var(--st-font); text-align: center; color: var(--st-ink-soft); } .focusbar { flex: none; height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--st-line); background: var(--st-material-tint); -webkit-backdrop-filter: var(--st-material-thin); backdrop-filter: var(--st-material-thin); font-size: var(--st-fs-sm); color: var(--st-ink-muted); } .focusbar__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--st-ink-muted); flex: none; } .focusbar[data-state='busy'] .focusbar__dot { background: var(--st-info); animation: st-pulse 1.6s var(--st-ease-in-out) infinite; } .focusbar[data-state='ready'] .focusbar__dot { background: var(--st-accent); } /* Earlier turns recede so the current exchange is the only thing at full contrast. Fades rather than jumps, so entering the mode is not a flash. */ .app[data-focus='true'] .chat__inner > .st-msg { transition: opacity var(--st-t-surface) var(--st-ease-standard); opacity: 0.45; } .app[data-focus='true'] .chat__inner > .st-msg:nth-last-child(-n + 2) { opacity: 1; } /* ---------------------------------------------- focus mode: only the reading --- The bar's own note says focus mode keeps "what is loaded, what it is doing, and the way out. Everything else on this screen is the conversation." The composer and the telemetry row were not in that list but stayed anyway, and together took 254px of a 900px window — a quarter of the screen given to controls in the one mode that exists to remove them. The composer stays usable, because replying is part of reading a conversation, but reduced to its two essential parts: the field and Send. */ .app[data-focus='true'] .composer__hints, .app[data-focus='true'] .st-composer__bar .st-btn--icon, .app[data-focus='true'] .telemetry { display: none; } .app[data-focus='true'] .st-composer__bar { justify-content: flex-end; margin-top: 6px; } /* Tightened rather than restyled: the same field and the same Send, with the padding the full composer carries for its hint line and icon row removed. */ .app[data-focus='true'] .composer { padding: 8px 0 12px; } .app[data-focus='true'] .st-composer { padding: 8px 12px; } .app[data-focus='true'] .composer textarea { min-height: 40px; } /* The column is the measure plus the column's own horizontal padding. The padding is a fixed 28px a side (`.chat__inner`), so the allowance is the same fixed 56px rather than an em term: a 2.5em allowance shrank with the text and at the 10px reading size left only 39 characters in the line (the measure target is 45–75, verified by `npm run measure`). */ .app[data-focus='true'] .slashmenu, .app[data-focus='true'] .chat__inner { font-size: var(--st-content-fs, 12px); max-width: calc(var(--st-measure) + 72px); } .app[data-focus='true'] .composer__inner { font-size: var(--st-content-fs, 12px); /* the same column, less the transcript's 28px padding on each side */ max-width: calc(var(--st-measure) + 2.5em - 56px); } /* ========================================================= reading comfort == Prose is capped at a comfortable measure: paragraphs, lists and quotes share one width (the list rule used to name `.md-li`, a class the renderer never emits, so lists ran the full column, #4722). Code blocks, tables and metric grids in the same bubble still use the full width, because a wide table is easier to read than a wrapped one. */ .st-msg--assistant .st-bubble :is(p, ul, ol, blockquote) { max-width: var(--st-measure); } /* Conversation prose follows the reader's size setting; the UI chrome does not — the same scoping DSH uses for its 10–22px content setting. */ .st-msg--assistant .st-bubble, .st-msg--user .st-bubble { font-size: var(--st-content-fs, 12px); line-height: calc(var(--st-content-fs, 12px) * 1.62); } /* Density — the difference between scanning data and reading it. */ [data-density='compact'] .listrow { padding: 12px 18px; } [data-density='compact'] .field { padding: 13px 18px; } [data-density='compact'] .st-table th { padding: 9px 14px; } [data-density='compact'] .st-table td { padding: 10px 14px; } [data-density='compact'] .navitem { height: 32px; } [data-density='compact'] .treerow { height: 28px; } [data-density='compact'] .st-msg { gap: 4px; } [data-density='compact'] .chat__inner { gap: 16px; } /* Thinner scrollbars, as DSH ships (5–6px). */ *::-webkit-scrollbar { width: 6px; height: 6px; } *::-webkit-scrollbar-thumb { border-width: 2px; } /* Stronger separation for people who ask the OS for it. */ @media (prefers-contrast: more) { :root { --st-ink-muted: var(--st-ink-soft); --st-line: color-mix(in srgb, var(--st-ink) 32%, var(--st-line)); --st-line-soft: color-mix(in srgb, var(--st-ink) 18%, var(--st-line-soft)); } } /* =========================================================== 1. extensions == */ /* The kit's buttons are one size; the app needs two more. */ .st-btn--sm { height: 34px; padding: 0 12px; border-radius: 10px; gap: 6px; font-size: var(--st-fs-sm); } .st-btn--sm svg { width: 15px; height: 15px; } .st-btn--lg { height: 48px; padding: 0 22px; border-radius: 15px; font-size: 15px; } .st-btn--block { width: 100%; } .st-btn { white-space: nowrap; } .st-btn--ghost { background: transparent; color: var(--st-ink-muted); padding: 0 12px; } .st-btn--ghost:hover:not(:disabled) { background: var(--st-surface-2); color: var(--st-ink); } .st-btn--ghost.st-btn--sm { padding: 0 10px; } .st-btn--active { background: var(--st-surface-2); color: var(--st-ink); } .st-btn--icon { flex: none; } .st-btn:disabled { opacity: 0.45; cursor: not-allowed; } .st-btn:not(:disabled):active { transform: translateY(1px); } /* Status pills carry a tone; the kit ships the state-dot version. */ .st-pill--accent { background: var(--st-accent-tint); border-color: transparent; color: var(--st-accent-text); } .st-pill--info { background: var(--st-info-tint); border-color: transparent; color: var(--st-info-text); } .st-pill--warn { background: var(--st-warn-tint); border-color: transparent; color: var(--st-warn-text); } .st-pill--danger { background: var(--st-danger-tint); border-color: transparent; color: var(--st-danger-text); } .st-pill svg { width: 15px; height: 15px; } /* Progress bars inside a table row or a tile run smaller. */ .st-progress--sm { height: 6px; border: 0; } .st-progress--lg { height: 10px; } .st-progress--indeterminate .st-progress__bar { width: 34% !important; animation: st-slide 1.4s var(--st-ease-in-out) infinite; } @keyframes st-slide { 0% { transform: translateX(-104%); } 100% { transform: translateX(304%); } } /* Cards that hold rows, heads or tables must not add their own padding. */ /* A card sitting on the page background does not float, so its shadow added a second edge next to the hairline and nothing else. Elevation is reserved for surfaces that genuinely overlap content: modals, the drawer, toasts, the slash menu, the composer and the first-run panel. */ .st-card { box-shadow: none; } .st-card--flush { padding: 0; overflow: hidden; } .st-card__head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--st-line); } .st-card__headicon { color: var(--st-ink-muted); flex: none; } .st-card__body { padding: 20px; } /* Toasts get a tinted icon per tone, as in the reference. */ .st-toast--toned { align-items: flex-start; gap: 12px; max-width: 420px; background: var(--st-material-tint-strong); -webkit-backdrop-filter: var(--st-material-regular); backdrop-filter: var(--st-material-regular); box-shadow: var(--st-sh-pop), inset 0 1px 0 var(--st-specular); } .st-toast__icon { display: inline-flex; flex: none; margin-top: 1px; } .st-toast[data-tone='success'] .st-toast__icon { color: var(--st-accent); } .st-toast[data-tone='info'] .st-toast__icon { color: var(--st-info); } .st-toast[data-tone='warn'] .st-toast__icon { color: var(--st-warn); } .st-toast[data-tone='error'] .st-toast__icon { color: var(--st-danger); } .st-toast[data-leaving='true'] { --st-to-y: 6px; animation: st-exit var(--st-t-control) var(--st-ease-exit) both; } /* The kit's table, plus the shapes this app composes with. */ .st-tablewrap { border: 1px solid var(--st-line); border-radius: var(--st-r-lg); background: var(--st-surface); box-shadow: var(--st-sh-card); overflow: hidden; } .st-table tbody tr[data-clickable='true'] { cursor: pointer; } .st-table .r { text-align: right; } .st-table .cell-strong { color: var(--st-ink); font-weight: 700; } .st-table tbody tr:last-child td { border-bottom: 0; } /* Accessibility correction, light only — see docs/design-system-notes.md §2.1. The kit pairs `--st-accent-ink: #ffffff` with `--st-accent: #10b981`: 2.54:1, under AA for the 14px/700 labels on primary buttons and the user's chat bubble. Dark mode already pairs a dark ink with the accent fill, so light mode adopts the same relationship. With a dark ink the fill can no longer darken on hover, so the hover lifts instead of sinking. Both states clear AA: base #05261b on #10b981 = 6.37:1 hover #05261b on #12c68e = 7.31:1 Blast radius is three surfaces — primary buttons, the user bubble and the brand mark — plus one hover rule. Delete this block to return to the kit's values verbatim, or use option B in the notes (deeper accent, white ink). */ :root:not([data-theme='dark']) { --st-accent-ink: #05261b; --st-accent-hover: #12c68e; /* Accent used as text: #0c8a60 on the accent tint measures 4.14:1, which is under AA at the 12–13px these badges use. Deepened to 5.07:1 on the tint and 5.35:1 on white, so links and status text improve with it. */ --st-accent-text: #0a7a55; } /* ======================================================= interface scale == One multiplier for the chrome, driven by a preference. The kit expresses its type and spacing in px, so scaling means restating those tokens as products rather than reaching for `zoom` — which would leave every portalled overlay (menus, popovers, modals) at the old size, since they render outside `.app`. Deliberately separate from the conversation's reading size: someone who needs larger prose does not necessarily want larger buttons, and the two settings solve different problems. */ :root { --st-ui-scale: 1; --st-fs-xs: calc(12px * var(--st-ui-scale)); --st-fs-sm: calc(13px * var(--st-ui-scale)); --st-fs-md: calc(14px * var(--st-ui-scale)); --st-fs-base: calc(16px * var(--st-ui-scale)); --st-fs-lg: calc(18px * var(--st-ui-scale)); --st-fs-xl: calc(24px * var(--st-ui-scale)); --st-fs-stat: calc(32px * var(--st-ui-scale)); --st-fs-display: calc(40px * var(--st-ui-scale)); --st-s-1: calc(4px * var(--st-ui-scale)); --st-s-2: calc(8px * var(--st-ui-scale)); --st-s-3: calc(12px * var(--st-ui-scale)); --st-s-4: calc(16px * var(--st-ui-scale)); --st-s-5: calc(20px * var(--st-ui-scale)); --st-s-6: calc(24px * var(--st-ui-scale)); --st-s-8: calc(32px * var(--st-ui-scale)); --st-s-10: calc(40px * var(--st-ui-scale)); --st-s-12: calc(48px * var(--st-ui-scale)); --st-s-16: calc(64px * var(--st-ui-scale)); } /* Control heights are fixed px in the kit, so they need the multiplier too — without this the labels grow and the controls they sit in do not, which is the most visible way a scale setting can look broken. */ .st-btn { height: calc(42px * var(--st-ui-scale)); } .st-input { height: calc(44px * var(--st-ui-scale)); } .st-tab { height: calc(36px * var(--st-ui-scale)); } .st-pill { height: calc(30px * var(--st-ui-scale)); } .st-badge { height: calc(24px * var(--st-ui-scale)); } /* ====================================================== control geometry == Liquid Glass asks for two geometric things. "Harmony", in Apple's framing, is software geometry echoing the hardware: capsule-shaped controls, and corners that stay concentric as elements nest. The split that matters: **capsules are for controls, the kit's 8/14/20/24 scale is for surfaces.** A button, a field, a nav row and a menu item are controls and become capsules; a card, drawer, modal and toast are surfaces and stay rounded rectangles. Capsule-on-a-surface reads as a chip floating in a box, which is the opposite of the intent. The kit is the source of truth and is sync-checked by `npm run audit`, so this is an app-layer override rather than an edit to ui/. Promoting it system-wide is a four-line move into ui/components.css plus `npm run sync:kit`. */ /* Concentric corners: a rounded element inside a padded rounded parent takes the parent's radius minus the gap, floored at zero, so the two curves share a centre rather than merely sitting inside one another. */ :root { --st-r-nested: max(0px, calc(var(--st-r-lg) - var(--st-s-5))); /* 20 − 20 = 0 */ --st-r-nested-sm: max(0px, calc(var(--st-r-md) - var(--st-s-3))); /* 14 − 12 = 2 */ } /* =============================================================== materials == Translucent surfaces. Blur is the only decorative device this system allows itself, and it is rationed: six surfaces, three tiers, every one of them overlaying content that actually moves underneath. Deliberately excluded: the sidebar (it never overlaps anything), every card (they sit on a flat background, so a blur would cost a compositor pass and show nothing), and the transcript (it repaints on every streamed token — the one place blur would genuinely hurt). All of it collapses to today's opaque tokens under reduced transparency or the manual override, so the layout is identical with materials off. */ :root { --st-blur-thin: 12px; --st-blur-regular: 24px; --st-blur-thick: 40px; --st-material-thin: saturate(180%) blur(var(--st-blur-thin)); --st-material-regular: saturate(180%) blur(var(--st-blur-regular)); --st-material-thick: saturate(180%) blur(var(--st-blur-thick)); /* The tint laid over the blur. Slightly transparent, never fully — text has to stay readable over whatever scrolls beneath. */ --st-material-tint: color-mix(in srgb, var(--st-surface) 72%, transparent); --st-material-tint-strong: color-mix(in srgb, var(--st-surface) 84%, transparent); /* Specular top edge: a 1px inset line that reads as light catching a surface. A hairline, not a gradient. */ --st-specular: rgba(255, 255, 255, 0.7); --st-specular-soft: rgba(255, 255, 255, 0.14); } [data-theme='dark'] { --st-specular: rgba(255, 255, 255, 0.07); --st-specular-soft: rgba(255, 255, 255, 0.05); --st-material-tint: color-mix(in srgb, var(--st-surface) 74%, transparent); --st-material-tint-strong: color-mix(in srgb, var(--st-surface) 86%, transparent); } /* Reduce Transparency, and the manual override in Settings → Reading & focus. */ @media (prefers-reduced-transparency: reduce) { :root { --st-material-thin: none; --st-material-regular: none; --st-material-thick: none; --st-material-tint: var(--st-surface); --st-material-tint-strong: var(--st-surface); --st-specular: transparent; --st-specular-soft: transparent; } } [data-transparency='opaque'] { --st-material-thin: none; --st-material-regular: none; --st-material-thick: none; --st-material-tint: var(--st-surface); --st-material-tint-strong: var(--st-surface); --st-specular: transparent; --st-specular-soft: transparent; } /* ---- accent-filled areas == Thin accent strokes — progress bars, gauge arcs, toggles, dots, sparklines — are cheap to look at and stay the bright accent in both themes. Large *filled* areas are a different problem. In dark mode a solid accent button measured luminance 0.496 against a page at 0.005: a 9.9:1 jump, making the brightest, most saturated object in the interface the one thing you are invited to click. Over a long session that is glare. So the two large accent surfaces — the primary button and the reader's own message bubble — take a tinted material instead, where the accent shows as light through the surface rather than paint on top. solid #34d399 luminance 0.496 vs page 9.86:1 label 7.70:1 tint 26 #1e4a3d luminance 0.055 vs page 1.90:1 label 5.73:1 tint 34 #205947 luminance 0.079 vs page 2.33:1 label 4.67:1 (hover) Light mode is unchanged: #10b981 on a #f9fafb page is 2.5:1, gentle relative to its background, and a solid fill reads as confident on white. `npm run luminance` fails the build if a large dark surface gets loud again. */ :root { /* Light gets the same treatment as dark, not a solid fill. A full-bleed saturated green carrying a colour-matched glow is paint, not glass: the accent shows through the material, and the control is defined by its hairline, its specular top edge and a neutral shadow. #086a4a on the 20% tint measures 5.47:1. */ --st-accent-surface: color-mix(in srgb, var(--st-accent) 20%, var(--st-surface)); --st-accent-surface-hover: color-mix(in srgb, var(--st-accent) 28%, var(--st-surface)); --st-accent-surface-ink: #086a4a; /* The border is an accent hairline in both themes. It used to be the specular token, which is white — an invisible border on a near-white page. The specular highlight is a separate, inset thing. */ --st-accent-surface-edge: color-mix(in srgb, var(--st-accent) 34%, transparent); --st-accent-surface-shadow: var(--st-sh-card); } [data-theme='dark'] { --st-accent-surface: color-mix(in srgb, var(--st-accent) 26%, var(--st-surface)); --st-accent-surface-hover: color-mix(in srgb, var(--st-accent) 34%, var(--st-surface)); --st-accent-surface-ink: var(--st-accent-text); --st-accent-surface-shadow: var(--st-sh-card); } /* ================================================================ 2. shell == */ *, *::before, *::after { box-sizing: border-box; } html, body, #root { height: 100%; } body { margin: 0; overflow: hidden; background: var(--st-bg); color: var(--st-ink); font-family: var(--st-font); font-size: var(--st-fs-base); line-height: var(--st-lh-body); -webkit-font-smoothing: antialiased; } a { color: var(--st-accent-text); text-decoration: none; } :focus-visible { outline: 2px solid var(--st-focus); outline-offset: 2px; } button { font-family: inherit; } ::selection { background: var(--st-accent-tint); } * { scrollbar-width: thin; scrollbar-color: var(--st-line) transparent; } *::-webkit-scrollbar { width: 10px; height: 10px; } *::-webkit-scrollbar-thumb { background: var(--st-line); border: 3px solid transparent; background-clip: content-box; border-radius: 9999px; } *::-webkit-scrollbar-track { background: transparent; } .app { display: grid; grid-template-columns: var(--st-nav-w) minmax(0, 1fr); height: 100%; transition: grid-template-columns var(--st-t-local) var(--st-ease-standard); } .app[data-rail='true'] { grid-template-columns: var(--st-nav-w-rail) minmax(0, 1fr); } .main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--st-bg); } .main__head { position: relative; flex: none; /* Liquid Glass lets content dissolve under a bar rather than colliding with a hard rule. A mask, not a gradient background, so the flat-surface rule and the audit's gradient check are both untouched. */ mask-image: linear-gradient(to bottom, #000 calc(100% - 10px), transparent); height: auto; min-height: var(--st-header-h); gap: 20px; padding: 12px 28px; background: var(--st-material-tint); -webkit-backdrop-filter: var(--st-material-thin); backdrop-filter: var(--st-material-thin); } .main__titles { min-width: 0; flex: 1; } /* The two title copies stack in one grid cell: the large one sets the height, the compact one overlays it. Scroll drives their opacities in opposite directions, so the title collapses rather than jumping. */ .main__titles { display: grid; grid-template-columns: minmax(0, 1fr); } .main__title--large, .main__title--compact { grid-area: 1 / 1; min-width: 0; } .main__title--compact { font-size: 17px; font-weight: 700; align-self: center; opacity: 0; animation-name: st-title-compact; animation-duration: auto; animation-timing-function: linear; animation-fill-mode: both; animation-timeline: --transcript; animation-range: 0 64px; } .main__title--large { animation-name: st-title-large; animation-duration: auto; animation-timing-function: linear; animation-fill-mode: both; animation-timeline: --transcript; animation-range: 0 64px; } @keyframes st-title-compact { to { opacity: 1; } } @keyframes st-title-large { to { opacity: 0; } } @media (prefers-reduced-motion: reduce) { .main__title--compact, .main__title--large { animation: none; } .main__title--compact { display: none; } } .main__title { font-size: 22px; font-weight: 900; letter-spacing: -0.01em; line-height: 1.2; margin: 0; color: var(--st-ink); } .main__sub { margin: 2px 0 0; font-size: var(--st-fs-sm); color: var(--st-ink-muted); max-width: 78ch; } .main__actions { display: flex; align-items: center; gap: 8px; flex: none; } .main__body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; } .wrap { max-width: var(--st-content-max); margin: 0 auto; padding: 28px 28px 80px; } .wrap--tight { max-width: 880px; } .wrap--wide { max-width: 1440px; } /* --------------------------------------------------------------- sidebar --- */ .nav { display: flex; flex-direction: column; min-width: 0; background: var(--st-surface); border-right: 1px solid var(--st-line); overflow: hidden; } .nav__top { display: flex; align-items: center; gap: 8px; height: var(--st-header-h); padding: 0 12px 0 18px; flex: none; border-bottom: 1px solid var(--st-line); } .nav__brand { display: flex; align-items: center; min-width: 0; min-height: 48px; flex: 1; color: inherit; } .chat-title-button { border: 0; padding: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-align: inherit; cursor: text; } .brand { display: inline-flex; align-items: center; justify-content: center; flex: none; position: relative; vertical-align: middle; line-height: 1; } .brand__img { display: block; width: 100%; height: 100%; object-fit: contain; } .brand__fallback { display: none; font-weight: 700; color: var(--st-ink); white-space: nowrap; } .brand:not(:has(.brand__img)) .brand__fallback { display: block; } .brand--mark .brand__fallback { font-size: 18px; } .brand--lockup .brand__fallback { font-size: 19px; } .nav__brand-compact { display: none; } .setup__brand-title, .snapshot__brand-title { display: flex; align-items: center; gap: 12px; } .setup__brand-title .h2, .snapshot__brand-title .h2 { margin: 0; } @media (forced-colors: active) { .brand__img { display: none; } .brand__fallback { display: block; color: CanvasText; } } .nav__scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 14px 12px 16px; display: flex; flex-direction: column; gap: 20px; } .nav__foot { flex: none; padding: 12px; border-top: 1px solid var(--st-line); background: var(--st-surface); display: flex; flex-direction: column; gap: 8px; } .navgroup__label { font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--st-ink-muted); padding: 0 10px 6px; white-space: nowrap; } .navitem { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--st-ink-soft); font: 500 var(--st-fs-md)/1 var(--st-font); cursor: pointer; text-align: left; transition: background var(--st-t-micro), color var(--st-t-micro); } .navitem:hover { background: var(--st-surface-2); color: var(--st-ink); } .navitem[aria-current='page'] { background: var(--st-surface-2); color: var(--st-ink); font-weight: 700; } .navitem svg { width: 19px; height: 19px; flex: none; color: var(--st-icon); } .navitem[aria-current='page'] svg { color: var(--st-accent); } .navitem__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .navitem__meta { font-size: var(--st-fs-xs); color: var(--st-ink-muted); font-variant-numeric: tabular-nums; flex: none; } /* ---------------------------------------------------------------- the rail --- Collapsed, the sidebar is 64px of icon targets. Everything below exists to hold one rule: **nothing is clipped, and every item is the same shape.** The previous version hid text on some elements but not others, so a conversation rendered as the first five pixels of its title, the model chip became an unlabelled dot in a bordered pill, and the bottom two controls sat side by side at different widths. */ .app[data-rail='true'] .navitem__text, .app[data-rail='true'] .navitem__meta, .app[data-rail='true'] .navgroup__label, .app[data-rail='true'] .nav__rail-hide, .app[data-rail='true'] .navsession__title, .app[data-rail='true'] .ws__tools, .app[data-rail='true'] .ws__search { display: none; } /* Shown only when there is no room for the word. */ .nav__rail-only { display: none; } .app[data-rail='true'] .nav__rail-only { display: flex; } .app[data-rail='true'] .nav__wide-only { display: none; } /* One target, one shape. 40×40 with the icon centred means every glyph in the rail sits on the same vertical line and the hover states line up. */ .app[data-rail='true'] .navitem, .app[data-rail='true'] .navsession, .app[data-rail='true'] .enginechip, .app[data-rail='true'] .ws__name, .app[data-rail='true'] .st-btn--icon { width: 40px; min-width: 40px; height: 40px; padding: 0; justify-content: center; align-items: center; gap: 0; border-radius: var(--st-r-md); } /* Icons carry the meaning here, so they are a step larger than in the expanded sidebar where a label does most of the work. */ .app[data-rail='true'] .navitem .st-icon, .app[data-rail='true'] .navsession .st-icon, .app[data-rail='true'] .ws__name .st-icon { width: 20px; height: 20px; } .app[data-rail='true'] .nav__top { justify-content: center; padding: 0; } /* The collapse control matched the nav items' width but not their height, so the one row with two controls in it broke the column's rhythm. */ .app[data-rail='true'] .nav__collapse { width: 40px; min-width: 40px; height: 40px; padding: 0; justify-content: center; } .app[data-rail='true'] .nav__brand { flex: none; width: 48px; justify-content: center; } .app[data-rail='true'] .nav__brand-lockup { display: none; } .app[data-rail='true'] .nav__brand-compact { display: inline-flex; } .app[data-rail='true'] .nav__scroll { padding: 14px 12px 16px; align-items: center; } .app[data-rail='true'] .nav__foot { padding: 12px; align-items: center; gap: 4px; } /* The model chip keeps its dot but loses the pill: a bordered box holding one small circle read as a broken button rather than a status light. */ .app[data-rail='true'] .enginechip { border: 0; background: transparent; } .app[data-rail='true'] .enginechip:hover { background: var(--st-surface-2); } .app[data-rail='true'] .enginechip__dot { width: 10px; height: 10px; } /* The expanded rail spaces its groups by 20px, and the workspace block adds an 8px margin on top of that. With the group heading hidden the two stack into a ~28px void between Skills and the first folder — a gap that reads as a missing element rather than as grouping. Tighter and uniform here. */ .app[data-rail='true'] .nav__scroll { gap: 8px; } .app[data-rail='true'] .ws { margin-top: 0; gap: 4px; } /* The "Workspaces" heading leaves a 26px block behind when its label and tools are hidden — empty space with nothing in it, which reads as a missing item. */ .app[data-rail='true'] .ws__head { display: none; } /* 1px between a folder and its conversations is tighter than the 4px the rest of the rail uses; at 40px targets they nearly touch. */ .app[data-rail='true'] .ws__group { gap: 4px; } .app[data-rail='true'] .ws__list { gap: 4px; } /* Stacked, so the two bottom controls match every other item instead of being squeezed into one row at two different widths. */ .app[data-rail='true'] .nav__foot { flex-direction: column; } .app[data-rail='true'] .nav__foot > .row { flex-direction: column; gap: 4px; width: 40px; } /* The workspace row is a folder and nothing else — the disclosure chevron had no room beside it and read as a stray glyph. */ .app[data-rail='true'] .ws__name { border-radius: var(--st-r-md); } /* The expanded tree indents a conversation under its folder by 22px. In a 64px rail that pushed the 40px target past the right edge, so the row rendered as a glyph sliced off by the sidebar boundary. */ .app[data-rail='true'] .ws__session { padding-left: 0; gap: 0; justify-content: center; } .app[data-rail='true'] .ws__sessions { padding-left: 0; margin-left: 0; gap: 4px; } .app[data-rail='true'] .ws { align-items: center; } .navsessions { display: flex; flex-direction: column; gap: 2px; } .navsession { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--st-ink-muted); font: 400 var(--st-fs-sm)/1 var(--st-font); cursor: pointer; text-align: left; width: 100%; transition: background var(--st-t-micro), color var(--st-t-micro); } .navsession:hover { background: var(--st-surface-2); color: var(--st-ink); } /* The chat row marks itself with aria-current="page", like every other current destination; the rule below used to look for "true", so the conversation you were reading was the one row with no mark at all. */ .navsession[aria-current='page'], .navsession[aria-current='true'] { color: var(--st-ink); background: var(--st-surface-2); font-weight: 500; } /* Targeted at the title, not at every span in the row. `.navsession span` also matched the timestamp and the unread dot, and being (0,1,1) it outranked their own (0,1,0) rules — so `flex: none` on the meta silently lost and the dot rendered as a 42px pill instead of a 6px dot. */ .navsession__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; } .navsessions .row .st-btn--icon { opacity: 0; transition: opacity var(--st-t-control); } .navsessions .row:hover .st-btn--icon, .navsessions .row:focus-within .st-btn--icon { opacity: 1; } /* The engine chip is the sidebar's status line: model + live state. */ .enginechip { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--st-line); background: var(--st-surface-2); cursor: pointer; text-align: left; transition: border-color var(--st-t-control); } .enginechip:hover { border-color: color-mix(in srgb, var(--st-ink-muted) 42%, var(--st-line)); } .enginechip__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--st-ink-muted); } .enginechip[data-state='ready'] .enginechip__dot { background: var(--st-accent); box-shadow: 0 0 0 4px var(--st-accent-tint); } .enginechip[data-state='busy'] .enginechip__dot { background: var(--st-info); box-shadow: 0 0 0 4px var(--st-info-tint); animation: st-pulse 1.6s var(--st-ease-in-out) infinite; } .enginechip[data-state='warn'] .enginechip__dot { background: var(--st-warn); box-shadow: 0 0 0 4px var(--st-warn-tint); } .enginechip__text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; } .enginechip__title { font-size: var(--st-fs-sm); font-weight: 700; color: var(--st-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .enginechip__sub { font-size: var(--st-fs-xs); color: var(--st-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } @keyframes st-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } } /* ============================================================ 3. utilities == */ .row { display: flex; align-items: center; gap: 12px; } .row--between { justify-content: space-between; } .col { display: flex; flex-direction: column; } .spacer { flex: 1; } .stack { display: flex; flex-direction: column; gap: 16px; } .stack--sm { gap: 10px; } .stack--lg { gap: 24px; } .grid { display: grid; gap: 14px; } .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* Cards size to their own content rather than to the tallest in the row. */ .grid--start { align-items: start; } @media (max-width: 1180px) { } @media (max-width: 900px) { .grid--2 { grid-template-columns: minmax(0, 1fr); } .wrap { padding: 20px 18px 64px; } .main__head { padding: 12px 18px; } } .eyebrow { font-size: var(--st-fs-xs); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--st-ink-muted); } .h1 { font-size: clamp(30px, 3.4vw, 40px); font-weight: 900; letter-spacing: -0.02em; line-height: 1.05; margin: 0; } .h2 { font-size: var(--st-fs-xl); font-weight: 700; letter-spacing: -0.01em; margin: 0; } .h3 { font-size: var(--st-fs-lg); font-weight: 700; margin: 0; } .h4 { font-size: var(--st-fs-base); font-weight: 700; margin: 0; } .muted { color: var(--st-ink-muted); } .soft { color: var(--st-ink-soft); } .small { font-size: var(--st-fs-sm); } .xs { font-size: var(--st-fs-xs); } .mono { font-family: var(--st-font-mono); font-size: 13px; } .num { font-variant-numeric: tabular-nums; } .strong { font-weight: 700; color: var(--st-ink); } .divider { height: 1px; background: var(--st-line-soft); border: 0; margin: 0; } /* Rows: the workhorse for model lists, files, skills and requests. */ .listrow { position: relative; display: flex; align-items: center; gap: 16px; padding: 18px 20px; transition: background var(--st-t-micro); } /* Separators start where the content starts rather than running edge to edge — the difference between a list that looks drawn and one that looks gridded. */ .listrow::before { content: ''; position: absolute; inset: 0 0 auto 20px; height: 1px; background: var(--st-line-soft); } .listrow:first-child::before { display: none; } .listrow:hover { background: var(--st-surface-2); } /* A row that carries a note and an action rather than content: no hover, no separator emphasis. */ .listrow--quiet { color: var(--st-ink-muted); } .listrow--quiet::before { background: transparent; } .listrow--quiet:hover { background: transparent; } .listrow--selectable { cursor: pointer; } .listrow[data-selected='true'] { background: var(--st-accent-tint); } .listrow__main { min-width: 0; flex: 1; } .listrow__title { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--st-ink); font-size: var(--st-fs-base); } .listrow__desc { font-size: var(--st-fs-sm); color: var(--st-ink-muted); margin-top: 3px; } .listrow__side { display: flex; align-items: center; gap: 10px; flex: none; } /* Selection radio, used by the model picker. */ .radio { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 1.5px solid var(--st-line); background: var(--st-surface); display: grid; place-items: center; transition: border-color var(--st-t-control), background var(--st-t-control); } .radio[data-on='true'] { border-color: var(--st-accent); border-width: 5px; background: var(--st-surface); } /* Metric rows — the reference grid of .st-metric cards. */ .metricgrid { display: grid; gap: 14px; } /* Text-valued metrics sit a step down from the numeric stat size, so a long name like "Apple M4 (8-core GPU)" stays on one line and the row keeps its rhythm. Uses the kit's --st-fs-lg. */ .st-metric__value--text { font-size: var(--st-fs-lg); font-weight: 700; line-height: 1.25; } /* Form rows inside a card. */ .field { display: flex; align-items: center; gap: 24px; padding: 18px 20px; border-top: 1px solid var(--st-line-soft); } .field:first-child { border-top: 0; } .field__main { flex: 1; min-width: 0; } .field__label { font-size: var(--st-fs-md); font-weight: 500; color: var(--st-ink); } .field__impact { margin-top: 4px; font-size: var(--st-fs-xs); color: var(--st-ink-soft); } .field__hint { font-size: var(--st-fs-sm); color: var(--st-ink-muted); margin-top: 3px; } .field__control { flex: none; width: 260px; display: flex; justify-content: flex-end; align-items: center; } .field__control--wide { width: 360px; } /* Select — a capsule field with a real chevron, and a glass popup. The popup replaces the OS-drawn menu a native