mirror of
https://github.com/bitbaum/substrata.git
synced 2026-12-04 05:30:25 +01:00
346 lines
10 KiB
CSS
346 lines
10 KiB
CSS
@import 'tailwindcss';
|
|
@import '@bitbaum/chatkit/styles.css';
|
|
@import '@bitbaum/chartkit/styles.css';
|
|
@import '@bitbaum/accountkit/styles.css';
|
|
/* The renderers live in the sitekit package now; Tailwind must scan them or
|
|
their semantic classes are never emitted. */
|
|
@source '../node_modules/sitekit/dist';
|
|
|
|
/**
|
|
* Substrata's design tokens — the SSOT for every visual decision.
|
|
*
|
|
* Geometric sans, black/white, almost no radius: closer to a launch-vehicle
|
|
* manufacturer than to a journal. System stacks only — no webfont fetch.
|
|
* Dark, light and auto (prefers-color-scheme) share the same names; a small
|
|
* boot script on <html> sets data-theme before paint.
|
|
*/
|
|
@theme {
|
|
--font-heading: 'Helvetica Neue', Helvetica, Arial, ui-sans-serif, system-ui, sans-serif;
|
|
--font-sans: 'Helvetica Neue', Helvetica, Arial, ui-sans-serif, system-ui, sans-serif;
|
|
--font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, 'Cascadia Mono', monospace;
|
|
|
|
--tracking-display: -0.04em;
|
|
--tracking-caps: 0.18em;
|
|
|
|
--spacing-shell: 76rem;
|
|
/* The shell's frame (app/styles/shell.css). */
|
|
--spacing-sidebar: 15rem;
|
|
--spacing-rail: 5rem;
|
|
--spacing-topbar: 3.5rem;
|
|
--spacing-tabbar: 4rem;
|
|
|
|
--primitive-black: #000000;
|
|
--primitive-white: #ffffff;
|
|
--primitive-red: #e82127;
|
|
--primitive-green-500: #3d9a5f;
|
|
--primitive-amber-500: #c48a2a;
|
|
--diagram-page: #111111;
|
|
--diagram-card: #1a1a1a;
|
|
--diagram-border: #3d3d3d;
|
|
--diagram-text: #f5f5f5;
|
|
--diagram-muted: #8a8a8a;
|
|
--diagram-source: #f5f5f5;
|
|
--diagram-unverified: #6a6a6a;
|
|
|
|
--color-surface-page: #000000;
|
|
--color-surface-raised: #111111;
|
|
--color-fg-primary: #ffffff;
|
|
--color-fg-secondary: #c6c6c6;
|
|
--color-fg-tertiary: #8a8a8a;
|
|
--color-fg-muted: #6a6a6a;
|
|
--color-border-subtle: #222222;
|
|
--color-border-strong: #3d3d3d;
|
|
--color-accent: #ffffff;
|
|
--color-status-positive: var(--primitive-green-500);
|
|
--color-status-warning: var(--primitive-amber-500);
|
|
--color-status-negative: var(--primitive-red);
|
|
|
|
--shadow-overlay: 0 16px 48px color-mix(in srgb, var(--primitive-black) 35%, transparent);
|
|
--color-scrim: color-mix(in srgb, var(--primitive-black) 55%, transparent);
|
|
}
|
|
|
|
:root {
|
|
/* The globe (components/portal/Globe.tsx reads these from script, so they
|
|
live outside @theme, which Tailwind prunes to what CSS uses; hex, since
|
|
the globe fades them to alpha): one sequential ramp, used only to mean "more of it", the
|
|
ink accent for the selected country, and everything else neutral. The
|
|
ramp's first step is clearly off the land grey, so a small share still
|
|
reads as "some", never as "not listed". */
|
|
--map-ocean: #000000;
|
|
--map-sphere: #07090c;
|
|
--map-sphere-light: #161b22;
|
|
--map-atmosphere: #7d9cc0;
|
|
--map-graticule: #ffffff0d;
|
|
--map-limb: #000000;
|
|
--map-land: #2a2c30;
|
|
--map-border: #0b0c0e;
|
|
--map-seq-1: #4d3b1a;
|
|
--map-seq-2: #735520;
|
|
--map-seq-3: #9c7026;
|
|
--map-seq-4: #cb8f2e;
|
|
--map-seq-5: #f2b74e;
|
|
}
|
|
|
|
/* The shared grammar uses our own monochrome engineering identity.
|
|
* Only reusable interaction roles are mapped; no foreign brand palette.
|
|
*/
|
|
:root {
|
|
--bb-action-bg: var(--color-fg-primary);
|
|
--bb-action-fg: var(--color-surface-page);
|
|
--bb-control-bg: var(--color-surface-raised);
|
|
--bb-control-fg: var(--color-fg-primary);
|
|
--bb-line: var(--color-border-strong);
|
|
--bb-muted: var(--color-fg-tertiary);
|
|
--bb-focus: var(--color-accent);
|
|
--bb-radius-control: 0.25rem;
|
|
--bb-stack-gap: 1rem;
|
|
--bb-list-row-y: 0.75rem;
|
|
}
|
|
|
|
/*
|
|
* How much of the bottom of the screen the shell owns: the phone's tab bar
|
|
* plus the home-indicator inset, and nothing from 768px up. Anything fixed or
|
|
* sticky to the bottom (the Ask button, a sticky composer or save bar) sits
|
|
* above it by adding this, rather than each guessing the bar's height.
|
|
*/
|
|
:root {
|
|
--shell-offset-bottom: 0px;
|
|
}
|
|
|
|
/*
|
|
* The smallest a control may be in either direction, and the smallest text.
|
|
* A finger needs 48px; a mouse pointer is served by 44px, so the larger size
|
|
* applies only where the primary pointer is coarse. Every button, tab and
|
|
* standalone link sizes itself with --size-target rather than a number of
|
|
* its own, and no label is set below --text-label (12px).
|
|
*/
|
|
:root {
|
|
--size-target: 2.75rem;
|
|
--text-label: 0.75rem;
|
|
}
|
|
@media (pointer: coarse) {
|
|
:root {
|
|
--size-target: 3rem;
|
|
}
|
|
}
|
|
@media (max-width: 767px) {
|
|
:root {
|
|
--shell-offset-bottom: calc(var(--spacing-tabbar) + env(safe-area-inset-bottom, 0px));
|
|
/* Room above the tab bar for the feedback launcher (a 3rem circle). */
|
|
--widget-reserve: 4rem;
|
|
}
|
|
}
|
|
|
|
/* Ask is @bitbaum/chatkit; it takes its look from these. Each points at a
|
|
token, so the light and dark themes flip it with nothing else to keep in
|
|
sync. The send button is the ink colour, like every primary button here. */
|
|
:root {
|
|
/* The page behind a chat screen and its fades (chatkit 0.15); unmapped, it
|
|
fell back to chatkit's near-white, so in the dark theme the thread was
|
|
light text on a light page. */
|
|
--ck-page: var(--color-surface-page);
|
|
--ck-bg: var(--color-surface-page);
|
|
--ck-raised: var(--color-surface-raised);
|
|
--ck-overlay: var(--color-surface-raised);
|
|
--ck-fg: var(--color-fg-primary);
|
|
--ck-fg-2: var(--color-fg-secondary);
|
|
--ck-fg-3: var(--color-fg-tertiary);
|
|
--ck-muted: var(--color-fg-muted);
|
|
--ck-line: var(--color-border-subtle);
|
|
--ck-line-2: var(--color-border-strong);
|
|
--ck-accent: var(--color-fg-primary);
|
|
--ck-on-accent: var(--color-surface-page);
|
|
--ck-danger: var(--color-status-negative);
|
|
--ck-warning: var(--color-status-warning);
|
|
--ck-radius: 0.75rem;
|
|
--ck-radius-sm: 0.4rem;
|
|
--ck-font: var(--font-sans);
|
|
--ck-mono: var(--font-mono);
|
|
/* @bitbaum/chartkit shares the prefix: --ck-line, --ck-accent, --ck-bg,
|
|
--ck-font and --ck-mono above are its too. These are the chart's own.
|
|
The accent is the ink here, so a second series is told apart by its
|
|
dash and a lighter grey, never by a colour the site does not have. */
|
|
--ck-ink: var(--color-fg-primary);
|
|
--ck-ink-muted: var(--color-fg-muted);
|
|
--ck-up: var(--color-status-positive);
|
|
--ck-down: var(--color-status-negative);
|
|
--ck-series-2: var(--color-fg-tertiary);
|
|
}
|
|
|
|
:root {
|
|
/* @bitbaum/accountkit's sign-in error screen, on the same tokens as the chat. */
|
|
--acct-fg: var(--color-fg-primary);
|
|
--acct-fg-2: var(--color-fg-secondary);
|
|
--acct-fg-3: var(--color-fg-tertiary);
|
|
--acct-line: var(--color-border-subtle);
|
|
--acct-line-2: var(--color-border-strong);
|
|
--acct-action: var(--color-fg-primary);
|
|
--acct-on-action: var(--color-surface-page);
|
|
--acct-focus: var(--color-accent);
|
|
--acct-radius-sm: 0.4rem;
|
|
--acct-font: var(--font-sans);
|
|
}
|
|
|
|
html[data-theme='light'] {
|
|
--diagram-page: #f4f4f4;
|
|
--diagram-card: #ffffff;
|
|
--diagram-border: #c8c8c8;
|
|
--diagram-text: #111111;
|
|
--diagram-muted: #5a5a5a;
|
|
--diagram-source: #111111;
|
|
--diagram-unverified: #8a8a8a;
|
|
--color-surface-page: #ffffff;
|
|
--color-surface-raised: #f4f4f4;
|
|
--color-fg-primary: #000000;
|
|
--color-fg-secondary: #333333;
|
|
--color-fg-tertiary: #5a5a5a;
|
|
--color-fg-muted: #7a7a7a;
|
|
--color-border-subtle: #e6e6e6;
|
|
--color-border-strong: #bdbdbd;
|
|
--color-accent: #000000;
|
|
--map-ocean: #ffffff;
|
|
--map-sphere: #dfe5ec;
|
|
--map-sphere-light: #f7f9fb;
|
|
--map-atmosphere: #9db3cc;
|
|
--map-graticule: #0000000d;
|
|
--map-limb: #6d7c8c;
|
|
--map-land: #c9ccd1;
|
|
--map-border: #f7f9fb;
|
|
--map-seq-1: #f3e6cc;
|
|
--map-seq-2: #e6c88f;
|
|
--map-seq-3: #cf9c4c;
|
|
--map-seq-4: #a56d22;
|
|
--map-seq-5: #6b4210;
|
|
}
|
|
|
|
html {
|
|
color-scheme: dark;
|
|
scroll-padding-top: 8rem;
|
|
}
|
|
/* Focus, tab and #anchor scrolls keep a control clear of the sticky top bar. */
|
|
:is(a, button, input, select, textarea, summary, [tabindex]):not([tabindex='-1']) {
|
|
scroll-margin-top: calc(var(--spacing-topbar) + 1.5rem);
|
|
}
|
|
html[data-theme='light'] {
|
|
color-scheme: light;
|
|
}
|
|
|
|
/* A link that stands on its own (not a word in a sentence): a full target. */
|
|
.link-target {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
min-height: var(--size-target);
|
|
min-width: var(--size-target);
|
|
}
|
|
/* A link in a row of text that must still be a full target: the hit area
|
|
grows to --size-target without moving the line it sits on. */
|
|
.tap {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
min-height: var(--size-target);
|
|
min-width: var(--size-target);
|
|
margin-block: calc((1.5em - var(--size-target)) / 2);
|
|
}
|
|
.inquire-open {
|
|
min-height: var(--size-target);
|
|
padding: 0 0.2rem;
|
|
font-size: 0.85rem;
|
|
color: var(--color-fg-secondary);
|
|
text-decoration: underline;
|
|
text-underline-offset: 0.25em;
|
|
cursor: pointer;
|
|
background: none;
|
|
border: 0;
|
|
}
|
|
.inquire-form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.6rem;
|
|
margin-top: 1rem;
|
|
max-width: 36rem;
|
|
text-align: left;
|
|
}
|
|
/* The message box is chatkit's Composer and keeps its own look; only the
|
|
optional fields beside it are styled here. */
|
|
.inquire-form > input {
|
|
border: 1px solid var(--color-border-strong);
|
|
padding: 0.8rem;
|
|
background: var(--color-surface-page);
|
|
color: var(--color-fg-primary);
|
|
}
|
|
.inquire-note,
|
|
.inquire-receipt {
|
|
font-size: 0.8rem;
|
|
color: var(--color-fg-tertiary);
|
|
}
|
|
.rabbit-holes {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 0.5rem;
|
|
margin: 2rem 0 0;
|
|
}
|
|
.rabbit-holes a {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
min-height: 2.5rem;
|
|
padding: 0 0.9rem;
|
|
border: 1px solid var(--color-border-strong);
|
|
font-size: 0.85rem;
|
|
}
|
|
.changelog-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0;
|
|
}
|
|
.changelog-list article {
|
|
padding: 1.5rem 0;
|
|
border-top: 1px solid var(--color-border-subtle);
|
|
}
|
|
.changelog-list time {
|
|
font-family: var(--font-mono);
|
|
font-size: 0.75rem;
|
|
letter-spacing: 0.08em;
|
|
color: var(--color-fg-tertiary);
|
|
}
|
|
.research-button-ghost {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
min-height: var(--size-target);
|
|
padding: 0.8rem 1.2rem;
|
|
border: 1px solid var(--color-border-strong);
|
|
border-radius: 0.4rem;
|
|
color: var(--color-fg-primary);
|
|
font-weight: 550;
|
|
}
|
|
.research-button-ghost:hover {
|
|
border-color: var(--color-accent);
|
|
color: var(--color-accent);
|
|
}
|
|
:focus-visible {
|
|
outline: 2px solid var(--color-accent);
|
|
outline-offset: 4px;
|
|
}
|
|
@media (prefers-reduced-motion: reduce) {
|
|
html {
|
|
scroll-behavior: auto;
|
|
}
|
|
*,
|
|
*::before,
|
|
*::after {
|
|
animation-duration: 0.01ms !important;
|
|
transition-duration: 0.01ms !important;
|
|
}
|
|
}
|
|
body {
|
|
background-color: var(--color-surface-page);
|
|
color: var(--color-fg-primary);
|
|
font-family: var(--font-sans);
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
.scrollbar-hide {
|
|
scrollbar-width: none;
|
|
}
|
|
.scrollbar-hide::-webkit-scrollbar {
|
|
display: none;
|
|
}
|