bereg-ds 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here. The project follows [Semantic Versioning](https://semver.org/):
4
+ a breaking change to a token name, a class name or a component prop is a major version.
5
+
6
+ ## 1.0.0 (unreleased)
7
+
8
+ First release.
9
+
10
+ - Design tokens in W3C DTCG format (`tokens/*.json`), built with Style Dictionary into CSS variables (rem) and JS/JSON (px).
11
+ - Strict scale of 4 for spacing, gaps and radii; type scale close to 1.25 (12 to 80px).
12
+ - Dark theme: semantic colors by role, text contrast 7:1 or more, `--line-strong` (3:1+) for interactive borders.
13
+ - Fonts: IBM Plex Sans (variable) and Mono through Fontsource, metric-matched fallbacks.
14
+ - CSS: base styles and text-style classes, components (Button, Link, Nav Link, Tag, Card, Quote, Book Promo,
15
+ Filter Tab, Section Head, Facts, Timeline, Post list, Site Header, Site Footer, Prose), blueprint grid background,
16
+ optional HDR accents.
17
+ - React components (TypeScript) over the same classes.
18
+ - Storybook with docs pages, all components and an accessibility check (axe-core) on every story.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Konstantin Beregovoy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,104 @@
1
- # Temporary Holding Version
1
+ # Bereg DS
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The **Engineering Blueprint** design system by [Konstantin Beregovoy](https://bereg.dev): dark, technical, drawn like a blueprint.
4
+ Design tokens, CSS components and React components from one source.
5
+
6
+ - **Docs and live components:** [ds.bereg.dev](https://ds.bereg.dev) (Storybook)
7
+ - **Figma:** [Bereg DS](https://www.figma.com/design/nWkFlhkomx90UBXw6nFAQj)
8
+ - **Live example:** [bereg.dev](https://bereg.dev)
9
+
10
+ ## Install
11
+
12
+ ```sh
13
+ npm i bereg-ds
14
+ ```
15
+
16
+ IBM Plex Sans and Mono come with it (self-hosted through Fontsource, no Google Fonts).
17
+
18
+ ## Use with CSS (any project: Astro, plain HTML, Vue...)
19
+
20
+ ```js
21
+ import 'bereg-ds/bereg-ds.css'; // fonts + tokens + base + components
22
+ ```
23
+
24
+ ```html
25
+ <a class="btn btn-primary" href="/projects/">Projects</a>
26
+ <article class="card">
27
+ <span class="meta">Open source · 2026</span>
28
+ <div class="card-body">
29
+ <h3 class="card-title"><a class="stretch" href="/projects/hdr-glow/">hdr-glow</a></h3>
30
+ <p class="card-text">Makes selected colors glow on HDR screens.</p>
31
+ </div>
32
+ <ul class="tags" aria-label="Stack"><li>TypeScript</li><li>React</li></ul>
33
+ </article>
34
+ ```
35
+
36
+ Import only what you need:
37
+
38
+ | File | What |
39
+ |---|---|
40
+ | `bereg-ds/fonts.css` | IBM Plex Sans (variable) and Mono 400, metric-matched fallbacks |
41
+ | `bereg-ds/tokens.css` | CSS variables: colors, spacing, radii, type scale, motion |
42
+ | `bereg-ds/base.css` | Page defaults, headings, text-style classes (`.text-h1`, `.text-meta`...), `.blueprint` grid |
43
+ | `bereg-ds/components.css` | Components: `.btn`, `.card`, `.quote`, `.tag`, `.filter-tab`, `.section-head`, `.facts`, `.timeline`, `.posts`, `.site-header`, `.site-footer`, `.prose` |
44
+ | `bereg-ds/hdr.css` | Optional HDR accents (`.hdr-logo`, `.hdr-card`) |
45
+
46
+ ## Use with React
47
+
48
+ ```tsx
49
+ import 'bereg-ds/bereg-ds.css';
50
+ import { Button, Card, Section, Sections } from 'bereg-ds/react';
51
+
52
+ <Sections>
53
+ <Section id="projects" title="Selected projects" link={{ href: '/projects/', label: 'All projects' }}>
54
+ <Card meta="Open source · 2026" title="hdr-glow" href="/projects/hdr-glow/" tags={['TypeScript', 'React']}>
55
+ Makes selected colors glow on HDR screens.
56
+ </Card>
57
+ </Section>
58
+ </Sections>
59
+ <Button href="/contact/">Contact</Button>
60
+ ```
61
+
62
+ React components only render markup and classes; all styles live in the CSS, so CSS and React look the same.
63
+ React is an optional peer dependency (18 or newer).
64
+
65
+ Components: `Button`, `Link`, `NavLink`, `Tag`, `Tags`, `Card`, `Quote`, `BookPromo`, `FilterTabs`, `Sections`, `Section`,
66
+ `Facts`, `Timeline`, `PostList`, `Subhead`, `SiteHeader`, `SiteFooter`, `Wrap`.
67
+
68
+ ## Tokens in JavaScript
69
+
70
+ ```js
71
+ import { colorAccent, space4 } from 'bereg-ds/tokens'; // px values
72
+ import tokens from 'bereg-ds/tokens.json';
73
+ ```
74
+
75
+ The source tokens (W3C DTCG format) are in `tokens/*.json`.
76
+
77
+ ## Rules of the system
78
+
79
+ 1. **Strict scale of 4.** Spacing, gaps and radii are multiples of 4. The name is the multiplier: `--space-3` = 12px.
80
+ Strokes (1/2/3px), corner ticks (11/22px) and breakpoints (640/760px) are separate sizes.
81
+ 2. **Tokens only.** No raw colors or pixel spacing in components (a test checks it).
82
+ 3. **Units.** Font sizes and spacing in rem, line height without units, letter spacing in em, strokes in px,
83
+ breakpoints in em (`40em`, `47.5em`).
84
+ 4. **Accessibility.** Text contrast 7:1 or more. Interactive borders use `--line-strong` (3:1 or more),
85
+ `--line` is decorative only. Visible focus on every interactive element. Links are underlined.
86
+ Respects `prefers-reduced-motion` and `forced-colors`.
87
+ 5. **Dark theme only** for now.
88
+ 6. **HDR is an optional accent**, not a default.
89
+ 7. **Exceptions belong to the project.** A special case lives in that project's CSS, not in the system.
90
+
91
+ ## Develop
92
+
93
+ ```sh
94
+ npm install
95
+ npm run build # tokens -> dist/css/tokens.css + dist/tokens, CSS, React
96
+ npm test # component and rule tests
97
+ npm run storybook # docs and live components on http://localhost:6006
98
+ ```
99
+
100
+ Change tokens in Figma first, then in `tokens/*.json`, then run `npm run build`.
101
+
102
+ ## License
103
+
104
+ MIT. IBM Plex is licensed under the SIL Open Font License (comes with the Fontsource packages).
package/SKILL.md ADDED
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: bereg-ds
3
+ description: Konstantin Beregovoy's design system (Engineering Blueprint, dark, IBM Plex). Use when building or changing UI in one of Konstantin's projects. First ask which design system the project uses; apply Bereg DS only if the answer is Bereg DS.
4
+ ---
5
+
6
+ # Bereg DS
7
+
8
+ ## Step 1: always ask first
9
+
10
+ Before writing or changing any UI, ask:
11
+
12
+ > Which design system does this project use: Bereg DS (my own) or another one?
13
+
14
+ - **Bereg DS** → follow this skill.
15
+ - **Another system** (a work project, a client's design system, Tailwind theme, MUI...) → do **not** apply Bereg DS.
16
+ Do not import its CSS, do not use its tokens, colors, fonts or class names. Work only with the project's own system.
17
+ - **Not sure / no answer** → do not apply Bereg DS; ask again before styling anything.
18
+
19
+ Do not mix systems in one project.
20
+
21
+ ## Step 2: install and import
22
+
23
+ ```sh
24
+ npm i bereg-ds
25
+ ```
26
+
27
+ ```js
28
+ import 'bereg-ds/bereg-ds.css'; // fonts + tokens + base + components
29
+ import { Button, Card } from 'bereg-ds/react'; // only in React projects
30
+ // import 'bereg-ds/hdr.css'; // only if an HDR accent is asked for
31
+ ```
32
+
33
+ Without React, use the same CSS classes in HTML (see README.md).
34
+
35
+ ## Rules
36
+
37
+ 1. **Use components first.** Button, Link, NavLink, Tag/Tags, Card, Quote, BookPromo, FilterTabs, Sections/Section,
38
+ Facts, Timeline, PostList, Subhead, SiteHeader, SiteFooter. Do not restyle them per page.
39
+ 2. **Tokens only.** Colors: `var(--bg)`, `--surface`, `--text`, `--muted`, `--line`, `--line-strong`, `--accent`,
40
+ `--accent-ink`, `--highlight`, `--focus`. Never hard-code hex colors or primitives (`--prim-*`).
41
+ 3. **Scale of 4.** Spacing, gaps and radii only from `--space-1` (4px) … `--space-16` (64px) and `--radius-sm|md|lg`.
42
+ No 6px, 10px, 14px. Strokes `--border-thin|medium|thick` in px.
43
+ 4. **Type.** Use the text-style classes (`.text-h1`, `.text-h2`, `.text-h3`, `.text-lede`, `.text-body`, `.text-small`,
44
+ `.text-meta`, `.text-label`, `.text-caps`, `.text-tag`, `.text-code`) or `--font-size-*` tokens. Fonts: `var(--font)`,
45
+ `var(--mono)`. Sizes in rem, line height unitless.
46
+ 5. **Accessibility.** Borders that identify an interactive element use `--line-strong`; `--line` is decorative.
47
+ Keep the focus ring (`:focus-visible`, 3px `--focus`, offset 3px). Underline links. Every section has a heading
48
+ (`Section` does it). Respect `prefers-reduced-motion` and `forced-colors`.
49
+ 6. **Dark theme only.** Do not invent light colors.
50
+ 7. **HDR only when asked**, for one accent at a time, always with an SDR fallback (`hdr.css`).
51
+ 8. **Exceptions stay in the project.** If a design needs a value the system does not have, put it in the project's
52
+ own CSS with a comment, and tell Konstantin. Do not edit the package for one project.
53
+
54
+ ## Links
55
+
56
+ - Docs and live components: https://ds.bereg.dev
57
+ - Figma: https://www.figma.com/design/nWkFlhkomx90UBXw6nFAQj
58
+ - Source: https://github.com/KonstantinBeregovoy/bereg-ds
@@ -0,0 +1,93 @@
1
+ /* Bereg DS base: page defaults, typography and text-style classes. Needs tokens.css.
2
+ Text-style classes mirror the Figma text styles (Display/H1 -> .text-h1, Mono/Caps -> .text-caps, ...). */
3
+
4
+ *, *::before, *::after { box-sizing: border-box; }
5
+
6
+ html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
7
+ @media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
8
+
9
+ body {
10
+ margin: 0;
11
+ background: var(--bg);
12
+ color: var(--text);
13
+ font-family: var(--font);
14
+ font-size: var(--font-size-base);
15
+ line-height: var(--leading-body);
16
+ -webkit-font-smoothing: antialiased;
17
+ }
18
+
19
+ img, svg, video { max-width: 100%; height: auto; }
20
+ img { display: block; }
21
+
22
+ a { color: var(--accent); text-underline-offset: 3px; }
23
+ a:hover { color: var(--highlight); text-decoration-thickness: 2px; }
24
+
25
+ :focus-visible { outline: var(--border-thick) solid var(--focus); outline-offset: var(--focus-offset); border-radius: var(--radius-sm); }
26
+ ::selection { background: var(--selection); color: var(--selection-text); }
27
+
28
+ /* Skip link: first element in <body>, visible on keyboard focus. */
29
+ .skip {
30
+ position: absolute; left: var(--space-4); top: -100px; z-index: 10;
31
+ background: var(--accent); color: var(--accent-ink);
32
+ padding: var(--space-2) var(--space-4); border-radius: var(--radius-md);
33
+ }
34
+ .skip:focus { top: var(--space-4); }
35
+
36
+ /* Page container: content width = --wrap minus side padding. */
37
+ .wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--space-6); }
38
+
39
+ /* Headings */
40
+ h1, h2, h3 { font-family: var(--font); margin: 0; }
41
+ h1, .text-h1 { font-size: clamp(2.625rem, 1.5rem + 5vw, var(--font-size-display)); font-weight: var(--weight-bold); line-height: var(--leading-tight); letter-spacing: var(--tracking-display); }
42
+ h2, .text-h2 { font-size: clamp(1.75rem, 1.25rem + 2.4vw, var(--font-size-3xl)); font-weight: var(--weight-semibold); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }
43
+ h3, .text-h3 { font-size: var(--font-size-lg); font-weight: var(--weight-semibold); line-height: var(--leading-tight); letter-spacing: var(--tracking-snug); }
44
+ p { margin: 0 0 var(--space-4); }
45
+
46
+ /* Text styles (classes). Sizes in rem follow the user's browser font size. */
47
+ .text-h1-subtitle { font-size: var(--font-size-2xl); font-weight: var(--weight-light); line-height: var(--leading-tight); letter-spacing: var(--tracking-snug); }
48
+ .text-facts { font-size: var(--font-size-4xl); font-weight: var(--weight-semibold); line-height: var(--leading-tight); letter-spacing: var(--tracking-tighter); }
49
+ .text-h2-article { font-size: var(--font-size-2xl); font-weight: var(--weight-semibold); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }
50
+ .text-post-title { font-size: var(--font-size-xl); font-weight: var(--weight-semibold); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }
51
+ .text-brand { font-size: var(--font-size-base); font-weight: var(--weight-bold); letter-spacing: var(--tracking-tight); }
52
+ .text-lede, .lede { font-size: clamp(1.125rem, 1rem + 0.6vw, var(--font-size-lg)); font-weight: var(--weight-light); line-height: var(--leading-snug); color: var(--muted); max-width: 62ch; }
53
+ .text-lede-hero { font-size: var(--font-size-lg); font-weight: var(--weight-regular); line-height: var(--leading-snug); color: var(--text); max-width: 62ch; }
54
+ .text-body { font-size: var(--font-size-base); line-height: var(--leading-body); }
55
+ .text-small { font-size: var(--font-size-md); line-height: var(--leading-body); }
56
+ .text-caption { font-size: var(--font-size-sm); line-height: var(--leading-body); }
57
+ .text-strong { font-weight: var(--weight-bold); }
58
+ .text-meta, .meta { font-family: var(--mono); font-size: var(--font-size-xs); letter-spacing: var(--tracking-none); color: var(--muted); }
59
+ .text-label { font-family: var(--mono); font-size: var(--font-size-xs); letter-spacing: var(--tracking-label); }
60
+ .text-caps { font-family: var(--mono); font-size: var(--font-size-xs); letter-spacing: var(--tracking-caps); text-transform: uppercase; }
61
+ .text-tag { font-family: var(--mono); font-size: var(--font-size-2xs); line-height: 1.3333; }
62
+ .text-footnote { font-family: var(--mono); font-size: var(--font-size-2xs); letter-spacing: var(--tracking-note); }
63
+ .text-code { font-family: var(--mono); font-size: var(--font-size-sm); line-height: var(--leading-snug); }
64
+ .muted { color: var(--muted); }
65
+
66
+ /* Blueprint grid background (opt-in): add class="blueprint" to <body> or a section.
67
+ Top of the area only, fades out downwards, crosshair dots on the major lines. Decorative. */
68
+ .blueprint { position: relative; isolation: isolate; }
69
+ .blueprint::before {
70
+ content: ''; position: absolute; inset: 0 0 auto 0; height: min(1100px, 100%); z-index: -1; pointer-events: none;
71
+ background-image:
72
+ linear-gradient(to right, var(--grid) 1px, transparent 1px),
73
+ linear-gradient(to bottom, var(--grid) 1px, transparent 1px),
74
+ linear-gradient(to right, var(--grid-major) 1px, transparent 1px),
75
+ linear-gradient(to bottom, var(--grid-major) 1px, transparent 1px),
76
+ radial-gradient(circle at 50% 50%, var(--grid-dot) 1.5px, transparent 2.5px);
77
+ background-size: var(--grid-size) var(--grid-size), var(--grid-size) var(--grid-size), var(--grid-major-size) var(--grid-major-size), var(--grid-major-size) var(--grid-major-size), var(--grid-major-size) var(--grid-major-size);
78
+ background-position: 0 0, 0 0, 0 0, 0 0, calc(var(--grid-major-size) / -2) calc(var(--grid-major-size) / -2);
79
+ -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
80
+ mask-image: linear-gradient(to bottom, #000, transparent);
81
+ }
82
+
83
+ /* Accessibility and print */
84
+ @media (prefers-reduced-motion: reduce) {
85
+ *, *::before, *::after { animation: none !important; transition: none !important; }
86
+ }
87
+ @media (forced-colors: active) {
88
+ .blueprint::before { display: none; }
89
+ }
90
+ @media print {
91
+ *, *::before, *::after { animation: none !important; transition: none !important; }
92
+ .blueprint::before { display: none; }
93
+ }
@@ -0,0 +1,5 @@
1
+ /* Bereg DS: everything except the optional HDR accents. Import once at the root of your app. */
2
+ @import './fonts.css';
3
+ @import './tokens.css';
4
+ @import './base.css';
5
+ @import './components.css';
@@ -0,0 +1,207 @@
1
+ /* Bereg DS components. Needs tokens.css (and base.css for page defaults).
2
+ Every value comes from a token. Spacing, gaps and radii follow the scale of 4.
3
+ Names match the Figma components: Button, Link, Nav Link, Tag, Card, Quote, Filter Tab, Section Head,
4
+ Facts, Timeline Item, Post Item, Book Promo, Site Header, Site Footer. */
5
+
6
+ @property --tick { syntax: '<length>'; inherits: false; initial-value: 11px; }
7
+
8
+ /* ---------- Button ---------- */
9
+ .btn {
10
+ display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
11
+ padding: var(--space-3) var(--space-5);
12
+ border: var(--border-thin) solid var(--accent); border-radius: var(--radius-sm);
13
+ font-family: var(--mono); font-size: var(--font-size-xs); font-weight: var(--weight-regular);
14
+ letter-spacing: var(--tracking-caps); text-transform: uppercase; line-height: var(--leading-body);
15
+ text-decoration: none; cursor: pointer; background: transparent; color: var(--accent);
16
+ transition: background var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast);
17
+ }
18
+ .btn-primary { background: var(--accent); color: var(--accent-ink); }
19
+ .btn-primary:hover { background: var(--highlight); border-color: var(--highlight); color: var(--accent-ink); text-decoration: none; }
20
+ .btn-secondary { color: var(--accent); }
21
+ .btn-secondary:hover { background: var(--accent-subtle); color: var(--accent); text-decoration: none; }
22
+ .btn:disabled, .btn[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; }
23
+
24
+ /* ---------- Link ---------- */
25
+ /* Inline links use the base <a> style. Muted: footer and secondary links. */
26
+ .link-muted { color: var(--muted); }
27
+ .link-muted:hover { color: var(--text); }
28
+
29
+ /* ---------- Nav Link ---------- */
30
+ .nav-link {
31
+ display: inline-block; padding: var(--space-1) 0;
32
+ border-bottom: var(--border-medium) solid transparent;
33
+ color: var(--muted); text-decoration: none;
34
+ font-family: var(--mono); font-size: var(--font-size-xs); letter-spacing: var(--tracking-label);
35
+ }
36
+ .nav-link:hover { color: var(--text); }
37
+ .nav-link[aria-current='page'], .nav-link[aria-current='true'] { color: var(--accent); border-bottom-color: var(--accent); }
38
+
39
+ /* ---------- Tag ---------- */
40
+ .tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-2) 0 0; padding: 0; list-style: none; }
41
+ .tag, .tags > li {
42
+ font-family: var(--mono); font-size: var(--font-size-2xs); line-height: 1.3333; color: var(--muted);
43
+ border: var(--border-thin) solid var(--line); border-radius: var(--radius-sm); padding: var(--space-1) var(--space-2);
44
+ }
45
+
46
+ /* ---------- Grid layouts ---------- */
47
+ .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--space-6); }
48
+ .grid-4 { grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr)); }
49
+ .grid-wide { grid-template-columns: repeat(auto-fill, minmax(18.75rem, 1fr)); }
50
+
51
+ /* ---------- Card (and Quote, Book Promo share the frame) ---------- */
52
+ .card, .quote {
53
+ position: relative; background: var(--surface);
54
+ border: var(--border-thin) solid var(--line); border-radius: var(--radius-sm);
55
+ transition: border-color var(--duration-fast);
56
+ }
57
+ .card { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); }
58
+ .card-body { display: flex; flex-direction: column; gap: var(--space-3); }
59
+ .card-title { margin: 0; font-size: var(--font-size-lg); font-weight: var(--weight-semibold); line-height: var(--leading-tight); letter-spacing: var(--tracking-snug); }
60
+ .card-text { margin: 0; color: var(--muted); font-size: var(--font-size-md); }
61
+ /* The title link covers the whole card. */
62
+ .card .stretch { color: inherit; text-decoration: none; }
63
+ .card .stretch::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius-sm); }
64
+
65
+ /* Corner ticks: a blueprint detail. Grow and turn highlight on hover and keyboard focus. */
66
+ .card::before, .quote::before {
67
+ --tc: var(--accent);
68
+ content: ''; position: absolute; inset: -1px; pointer-events: none; opacity: 0.5;
69
+ background:
70
+ linear-gradient(var(--tc), var(--tc)) top left / var(--tick) 1px no-repeat,
71
+ linear-gradient(var(--tc), var(--tc)) top left / 1px var(--tick) no-repeat,
72
+ linear-gradient(var(--tc), var(--tc)) top right / var(--tick) 1px no-repeat,
73
+ linear-gradient(var(--tc), var(--tc)) top right / 1px var(--tick) no-repeat,
74
+ linear-gradient(var(--tc), var(--tc)) bottom left / var(--tick) 1px no-repeat,
75
+ linear-gradient(var(--tc), var(--tc)) bottom left / 1px var(--tick) no-repeat,
76
+ linear-gradient(var(--tc), var(--tc)) bottom right / var(--tick) 1px no-repeat,
77
+ linear-gradient(var(--tc), var(--tc)) bottom right / 1px var(--tick) no-repeat;
78
+ transition: opacity var(--duration-fast), --tick var(--duration-base) var(--ease);
79
+ }
80
+ .card:hover, .card:focus-within { border-color: var(--line-hover); }
81
+ .card:hover::before, .card:focus-within::before { --tick: var(--tick-hover); --tc: var(--highlight); opacity: 1; }
82
+ /* Focus: the ring goes around the whole card, not only around the title link. */
83
+ .card:has(.stretch:focus-visible) { outline: var(--border-thick) solid var(--focus); outline-offset: var(--focus-offset); }
84
+ .card .stretch:focus-visible { outline: none; }
85
+
86
+ /* ---------- Quote ---------- */
87
+ .quotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(18.75rem, 1fr)); gap: var(--space-6); }
88
+ .quote { margin: 0; padding: var(--space-6); display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-4); }
89
+ .quote > p { margin: 0; font-size: var(--font-size-md); }
90
+ .quote-author { font-size: var(--font-size-sm); color: var(--muted); }
91
+ .quote-author strong { display: block; color: var(--text); font-size: var(--font-size-md); }
92
+ .quote-author a { color: inherit; }
93
+
94
+ /* ---------- Book Promo ---------- */
95
+ .book-promo { padding: var(--space-3); gap: var(--space-3); align-items: center; width: max-content; font-family: var(--mono); font-size: var(--font-size-xs); letter-spacing: var(--tracking-note); }
96
+ .book-promo img { width: 7.5rem; height: auto; border: var(--border-thin) solid var(--line); box-shadow: var(--shadow-cover); }
97
+ .book-promo-row { flex-direction: row; gap: var(--space-4); padding-inline-end: var(--space-6); }
98
+ .book-promo-row img { width: 4rem; }
99
+
100
+ /* ---------- Filter Tab ---------- */
101
+ .filters { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-6); padding: 0; list-style: none; }
102
+ .filter-tab {
103
+ display: inline-block; padding: var(--space-2) var(--space-4);
104
+ border: var(--border-thin) solid var(--line-strong); border-radius: var(--radius-sm);
105
+ font-family: var(--mono); font-size: var(--font-size-xs); color: var(--muted); text-decoration: none;
106
+ }
107
+ .filter-tab:hover { color: var(--text); border-color: var(--accent); }
108
+ .filter-tab[aria-current='true'], .filter-tab[aria-current='page'] { background: var(--highlight); color: var(--accent-ink); border-color: var(--highlight); }
109
+
110
+ /* ---------- Section Head ---------- */
111
+ /* Numbered with a CSS counter (put counter-reset: sec on a parent, .sections does it), with a dimension line that draws itself. */
112
+ .sections { counter-reset: sec; }
113
+ .section + .section { margin-top: var(--space-16); }
114
+ .section-head {
115
+ position: relative; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap;
116
+ gap: var(--space-4); margin-bottom: var(--space-6); padding-bottom: var(--space-4);
117
+ }
118
+ .section-head::after {
119
+ content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 9px; transform-origin: left center;
120
+ background:
121
+ linear-gradient(var(--line), var(--line)) left bottom / 1px 9px no-repeat,
122
+ linear-gradient(var(--line), var(--line)) right bottom / 1px 9px no-repeat,
123
+ linear-gradient(var(--line), var(--line)) center bottom / 100% 1px no-repeat;
124
+ animation: bds-draw var(--duration-draw) var(--ease) both;
125
+ }
126
+ .section-head h2::before {
127
+ counter-increment: sec;
128
+ content: counter(sec, decimal-leading-zero) ' /';
129
+ content: counter(sec, decimal-leading-zero) ' /' / '';
130
+ font-family: var(--mono); font-size: var(--font-size-xs); font-weight: var(--weight-regular); letter-spacing: var(--tracking-label);
131
+ color: var(--highlight); margin-right: 0.9em; vertical-align: 0.35em;
132
+ }
133
+
134
+ /* ---------- Facts (blueprint title block) ---------- */
135
+ .facts {
136
+ display: grid; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); gap: 1px;
137
+ margin: 0; padding: 0; list-style: none; background: var(--line); border: var(--border-thin) solid var(--line);
138
+ }
139
+ .facts > li { background: var(--surface); padding: var(--space-4) var(--space-6) var(--space-6); }
140
+ .facts strong { display: block; font-size: var(--font-size-4xl); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-tighter); line-height: var(--leading-tight); }
141
+ .facts span { display: block; color: var(--muted); font-size: var(--font-size-md); }
142
+
143
+ /* ---------- Timeline Item ---------- */
144
+ .timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-6); }
145
+ .timeline > li { display: grid; grid-template-columns: 10rem 1fr; gap: var(--space-6); border-top: var(--border-thin) solid var(--line); padding-top: var(--space-4); }
146
+ .timeline h3 { font-size: var(--font-size-lg); }
147
+ .timeline p { margin: var(--space-1) 0 0; color: var(--muted); font-size: var(--font-size-md); }
148
+
149
+ /* ---------- Post Item ---------- */
150
+ .subhead { font-family: var(--mono); font-size: var(--font-size-xs); font-weight: var(--weight-regular); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--muted); margin: var(--space-8) 0 var(--space-4); }
151
+ .subhead:first-child { margin-top: 0; }
152
+ .posts { list-style: none; margin: 0; padding: 0; }
153
+ .posts > li { border-top: var(--border-thin) solid var(--line); padding: var(--space-4) 0; display: grid; grid-template-columns: 8.125rem 1fr; gap: var(--space-6); }
154
+ .posts h2, .posts h3 { font-size: var(--font-size-xl); }
155
+ .posts h2 a, .posts h3 a { color: var(--text); text-decoration: none; }
156
+ .posts h2 a:hover, .posts h3 a:hover { color: var(--accent); }
157
+ .posts p { margin: var(--space-1) 0 0; color: var(--muted); font-size: var(--font-size-md); }
158
+
159
+ @media (max-width: 40em) {
160
+ .timeline > li, .posts > li { grid-template-columns: 1fr; gap: var(--space-1); }
161
+ }
162
+
163
+ /* ---------- Actions row ---------- */
164
+ .actions { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }
165
+
166
+ /* ---------- Site Header ---------- */
167
+ .site-header { border-bottom: var(--border-thin) solid var(--line); background: var(--header-bg); }
168
+ .site-header > .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap; min-height: 4.5rem; padding-block: var(--space-2); }
169
+ .brand { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--text); text-decoration: none; font-weight: var(--weight-bold); font-size: var(--font-size-base); letter-spacing: var(--tracking-tight); }
170
+ .brand:hover { color: var(--text); }
171
+ .brand img { height: 2.5rem; width: auto; }
172
+ .site-nav ul { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); list-style: none; margin: 0; padding: 0; }
173
+
174
+ /* ---------- Site Footer ---------- */
175
+ .site-footer { border-top: var(--border-thin) solid var(--line); padding: var(--space-8) 0; color: var(--muted); font-family: var(--mono); font-size: var(--font-size-xs); }
176
+ .site-footer > .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); }
177
+ .site-footer a { color: var(--muted); }
178
+ .site-footer a:hover { color: var(--text); }
179
+ .site-note { flex-basis: 100%; font-size: var(--font-size-2xs); letter-spacing: var(--tracking-note); }
180
+
181
+ /* ---------- Prose (articles) ---------- */
182
+ .prose { max-width: 68ch; }
183
+ .prose h2 { margin: var(--space-8) 0 var(--space-4); font-size: var(--font-size-2xl); }
184
+ .prose h3 { margin: var(--space-6) 0 var(--space-2); }
185
+ .prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 var(--space-4); }
186
+ .prose li { margin-bottom: var(--space-2); }
187
+ .prose img { border-radius: var(--radius-lg); margin: var(--space-4) 0; }
188
+ .prose code { font-family: var(--mono); font-size: 0.9em; background: var(--surface); border: var(--border-thin) solid var(--line); border-radius: var(--radius-sm); padding: 0 var(--space-1); }
189
+ .prose pre { max-width: 100%; background: var(--surface); border: var(--border-thin) solid var(--line); border-radius: var(--radius-sm); padding: var(--space-4); overflow-x: auto; font-size: var(--font-size-sm); line-height: var(--leading-snug); }
190
+ .prose pre code { background: none; border: 0; padding: 0; }
191
+ .prose blockquote { border-left: var(--border-thick) solid var(--accent); margin: var(--space-4) 0; padding: 0 var(--space-4); color: var(--muted); }
192
+ .prose table { width: 100%; border-collapse: collapse; font-size: var(--font-size-sm); }
193
+ .prose th, .prose td { padding: var(--space-2) var(--space-3); border-bottom: var(--border-thin) solid var(--line); text-align: left; vertical-align: top; }
194
+ .prose th { font-family: var(--mono); font-size: var(--font-size-2xs); font-weight: var(--weight-regular); color: var(--muted); }
195
+
196
+ /* ---------- Motion ---------- */
197
+ @keyframes bds-draw { from { transform: scaleX(0); } }
198
+ @keyframes bds-rise { from { opacity: 0; transform: translateY(14px); } }
199
+ @supports (animation-timeline: view()) {
200
+ .section-head::after { animation: bds-draw linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
201
+ }
202
+
203
+ /* ---------- Forced colors (Windows high contrast) ---------- */
204
+ @media (forced-colors: active) {
205
+ .card::before, .quote::before, .section-head::after { display: none; }
206
+ .btn-primary, .filter-tab[aria-current='true'], .filter-tab[aria-current='page'] { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
207
+ }
@@ -0,0 +1,12 @@
1
+ /* Bereg DS fonts: IBM Plex Sans (variable, 100-700) and IBM Plex Mono 400, self-hosted through Fontsource.
2
+ The font files and their OFL license come with the @fontsource packages (dependencies of bereg-ds).
3
+ Each subset has its own unicode-range, so the browser loads only the scripts a page uses (latin, cyrillic...).
4
+ For Hebrew use IBM Plex Sans Hebrew (@fontsource/ibm-plex-sans-hebrew) and add it to --font in your project. */
5
+ @import '@fontsource-variable/ibm-plex-sans/wght.css';
6
+ @import '@fontsource/ibm-plex-mono/400.css';
7
+
8
+ /* Metric-matched fallbacks: system fonts scaled to Plex's size and line box, so the font swap does not shift layout.
9
+ Variable names in tokens.css (--font, --mono) list these right after Plex. */
10
+ @font-face { font-family: 'IBM Plex Sans Fallback'; font-weight: 100 500; src: local('Arial'); size-adjust: 100.8%; ascent-override: 101.7%; descent-override: 27.3%; line-gap-override: 0%; }
11
+ @font-face { font-family: 'IBM Plex Sans Fallback'; font-weight: 600 900; src: local('Arial Bold'), local('Arial-BoldMT'); size-adjust: 98.7%; ascent-override: 103.8%; descent-override: 27.9%; line-gap-override: 0%; }
12
+ @font-face { font-family: 'IBM Plex Mono Fallback'; src: local('Courier New'); size-adjust: 100%; ascent-override: 102.5%; descent-override: 27.5%; line-gap-override: 0%; }
@@ -0,0 +1,37 @@
1
+ /* Bereg DS HDR accents (optional). Not part of the default style: use only for single accents,
2
+ for example one logo or one card. Everything has an SDR fallback, so nothing disappears on normal screens.
3
+ HDR assets (Ultra HDR JPEG with a gain map) can be made with https://glow.bereg.dev.
4
+
5
+ Usage:
6
+ <img class="hdr-logo" src="logo-hdr.jpg" alt=""> logo on a black background, black disappears
7
+ <article class="card hdr-card" style="--hdr-swatch: url(swatch.jpg)"> border and title glow on HDR screens */
8
+
9
+ /* Logo exported on black: "screen" removes the black so the logo sits on any dark background. */
10
+ .hdr-logo { mix-blend-mode: screen; }
11
+
12
+ .hdr-card .stretch, .hdr-card .card-title { color: var(--text); }
13
+
14
+ @media (dynamic-range: high) {
15
+ .hdr-card {
16
+ border: var(--border-medium) solid transparent;
17
+ padding: calc(var(--space-6) - 1px);
18
+ background:
19
+ linear-gradient(var(--surface), var(--surface)) padding-box,
20
+ linear-gradient(color-mix(in oklab, var(--bg) 40%, transparent), color-mix(in oklab, var(--bg) 40%, transparent)) border-box,
21
+ var(--hdr-swatch, none) center / cover border-box,
22
+ linear-gradient(var(--accent), var(--accent)) border-box;
23
+ }
24
+ @supports (background-clip: text) or (-webkit-background-clip: text) {
25
+ .hdr-card .stretch, .hdr-card .hdr-text {
26
+ background: var(--hdr-swatch, none) center / cover, linear-gradient(var(--text), var(--text));
27
+ -webkit-background-clip: text;
28
+ background-clip: text;
29
+ color: transparent;
30
+ }
31
+ }
32
+ }
33
+
34
+ @media (forced-colors: active) {
35
+ .hdr-card { background: Canvas; border-color: CanvasText; }
36
+ .hdr-card .stretch, .hdr-card .hdr-text { background: none; color: LinkText; }
37
+ }