@cogenta/theme-entreprise 1.1.3 → 1.4.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.
Files changed (115) hide show
  1. package/dist/src/index.d.ts +1 -0
  2. package/dist/src/index.d.ts.map +1 -1
  3. package/dist/src/index.js +1 -0
  4. package/dist/src/index.js.map +1 -1
  5. package/dist/src/render/blocks/accordion.d.ts.map +1 -1
  6. package/dist/src/render/blocks/accordion.js +12 -15
  7. package/dist/src/render/blocks/accordion.js.map +1 -1
  8. package/dist/src/render/blocks/collection-list.d.ts +5 -7
  9. package/dist/src/render/blocks/collection-list.d.ts.map +1 -1
  10. package/dist/src/render/blocks/collection-list.js +61 -32
  11. package/dist/src/render/blocks/collection-list.js.map +1 -1
  12. package/dist/src/render/blocks/cta.d.ts +6 -6
  13. package/dist/src/render/blocks/cta.d.ts.map +1 -1
  14. package/dist/src/render/blocks/cta.js +12 -12
  15. package/dist/src/render/blocks/cta.js.map +1 -1
  16. package/dist/src/render/blocks/embed.d.ts.map +1 -1
  17. package/dist/src/render/blocks/embed.js +22 -27
  18. package/dist/src/render/blocks/embed.js.map +1 -1
  19. package/dist/src/render/blocks/faq.d.ts.map +1 -1
  20. package/dist/src/render/blocks/faq.js +13 -16
  21. package/dist/src/render/blocks/faq.js.map +1 -1
  22. package/dist/src/render/blocks/feature-grid.d.ts.map +1 -1
  23. package/dist/src/render/blocks/feature-grid.js +22 -22
  24. package/dist/src/render/blocks/feature-grid.js.map +1 -1
  25. package/dist/src/render/blocks/gallery.d.ts +7 -8
  26. package/dist/src/render/blocks/gallery.d.ts.map +1 -1
  27. package/dist/src/render/blocks/gallery.js +16 -14
  28. package/dist/src/render/blocks/gallery.js.map +1 -1
  29. package/dist/src/render/blocks/hero.d.ts +13 -8
  30. package/dist/src/render/blocks/hero.d.ts.map +1 -1
  31. package/dist/src/render/blocks/hero.js +27 -17
  32. package/dist/src/render/blocks/hero.js.map +1 -1
  33. package/dist/src/render/blocks/logo-strip.d.ts.map +1 -1
  34. package/dist/src/render/blocks/logo-strip.js +14 -11
  35. package/dist/src/render/blocks/logo-strip.js.map +1 -1
  36. package/dist/src/render/blocks/logos.d.ts.map +1 -1
  37. package/dist/src/render/blocks/logos.js +21 -12
  38. package/dist/src/render/blocks/logos.js.map +1 -1
  39. package/dist/src/render/blocks/media-figure.d.ts +10 -6
  40. package/dist/src/render/blocks/media-figure.d.ts.map +1 -1
  41. package/dist/src/render/blocks/media-figure.js +18 -13
  42. package/dist/src/render/blocks/media-figure.js.map +1 -1
  43. package/dist/src/render/blocks/pricing-table.d.ts.map +1 -1
  44. package/dist/src/render/blocks/pricing-table.js +15 -11
  45. package/dist/src/render/blocks/pricing-table.js.map +1 -1
  46. package/dist/src/render/blocks/prose.d.ts +9 -3
  47. package/dist/src/render/blocks/prose.d.ts.map +1 -1
  48. package/dist/src/render/blocks/prose.js +11 -4
  49. package/dist/src/render/blocks/prose.js.map +1 -1
  50. package/dist/src/render/blocks/quote.d.ts +10 -10
  51. package/dist/src/render/blocks/quote.d.ts.map +1 -1
  52. package/dist/src/render/blocks/quote.js +14 -13
  53. package/dist/src/render/blocks/quote.js.map +1 -1
  54. package/dist/src/render/blocks/stat-counter.d.ts.map +1 -1
  55. package/dist/src/render/blocks/stat-counter.js +11 -13
  56. package/dist/src/render/blocks/stat-counter.js.map +1 -1
  57. package/dist/src/render/blocks/stats.d.ts.map +1 -1
  58. package/dist/src/render/blocks/stats.js +12 -13
  59. package/dist/src/render/blocks/stats.js.map +1 -1
  60. package/dist/src/render/blocks/testimonial.d.ts +9 -9
  61. package/dist/src/render/blocks/testimonial.d.ts.map +1 -1
  62. package/dist/src/render/blocks/testimonial.js +15 -14
  63. package/dist/src/render/blocks/testimonial.js.map +1 -1
  64. package/dist/src/render/chrome.d.ts +3 -1
  65. package/dist/src/render/chrome.d.ts.map +1 -1
  66. package/dist/src/render/chrome.js +71 -46
  67. package/dist/src/render/chrome.js.map +1 -1
  68. package/dist/src/render/layout.d.ts +26 -0
  69. package/dist/src/render/layout.d.ts.map +1 -0
  70. package/dist/src/render/layout.js +51 -0
  71. package/dist/src/render/layout.js.map +1 -0
  72. package/dist/src/render/render-block.d.ts.map +1 -1
  73. package/dist/src/render/render-block.js +23 -2
  74. package/dist/src/render/render-block.js.map +1 -1
  75. package/dist/src/render/term-archive.d.ts +8 -6
  76. package/dist/src/render/term-archive.d.ts.map +1 -1
  77. package/dist/src/render/term-archive.js +22 -16
  78. package/dist/src/render/term-archive.js.map +1 -1
  79. package/dist/src/render/widget-areas.d.ts +13 -0
  80. package/dist/src/render/widget-areas.d.ts.map +1 -0
  81. package/dist/src/render/widget-areas.js +20 -0
  82. package/dist/src/render/widget-areas.js.map +1 -0
  83. package/dist/theme.config.js +2 -2
  84. package/dist/theme.config.js.map +1 -1
  85. package/package.json +5 -5
  86. package/src/index.ts +1 -0
  87. package/src/render/blocks/accordion.ts +32 -27
  88. package/src/render/blocks/collection-list.ts +103 -53
  89. package/src/render/blocks/cta.ts +27 -28
  90. package/src/render/blocks/embed.ts +46 -43
  91. package/src/render/blocks/faq.ts +25 -21
  92. package/src/render/blocks/feature-grid.ts +42 -35
  93. package/src/render/blocks/gallery.ts +21 -16
  94. package/src/render/blocks/hero.ts +40 -28
  95. package/src/render/blocks/logo-strip.ts +26 -16
  96. package/src/render/blocks/logos.ts +33 -17
  97. package/src/render/blocks/media-figure.ts +22 -14
  98. package/src/render/blocks/pricing-table.ts +26 -15
  99. package/src/render/blocks/prose.ts +18 -4
  100. package/src/render/blocks/quote.ts +18 -14
  101. package/src/render/blocks/stat-counter.ts +25 -20
  102. package/src/render/blocks/stats.ts +31 -21
  103. package/src/render/blocks/testimonial.ts +22 -18
  104. package/src/render/chrome.ts +84 -49
  105. package/src/render/layout.ts +67 -0
  106. package/src/render/render-block.ts +24 -1
  107. package/src/render/term-archive.ts +54 -50
  108. package/src/render/widget-areas.ts +23 -0
  109. package/src/styles/archive.css +137 -38
  110. package/src/styles/base.css +553 -426
  111. package/src/styles/blocks.css +1343 -1010
  112. package/src/styles/theme.css +18 -24
  113. package/src/styles/tokens.css +166 -192
  114. package/src/styles/widgets.css +914 -0
  115. package/tokens.json +17 -17
@@ -1,36 +1,30 @@
1
1
  /*
2
- * `@cogenta/theme-entreprise`'s stylesheet — the entry point, and nothing
2
+ * `@cogenta/theme-entreprise`'s stylesheet: the entry point, and nothing
3
3
  * else.
4
4
  *
5
- * Three layers, in the only order that works:
5
+ * tokens.css the design system, derived from the skin's `--cogenta-*`
6
+ * custom properties (contract D)
7
+ * base.css document, accessibility floor, grid, chrome, actions
8
+ * blocks.css the seventeen vocabulary blocks and the entry header
9
+ * archive.css the taxonomy-term archive
10
+ * widgets.css the widget areas: the side column, the bands, the footer row
6
11
  *
7
- * tokens.css the design system, derived entirely from the skin's
8
- * `--cogenta-*` custom properties (contract D)
9
- * base.css document, accessibility floor, page frame, chrome, actions
10
- * blocks.css the seventeen vocabulary blocks
12
+ * Not one colour is written literally in any of them: every value comes from
13
+ * a skin token or from a `--cg-*` property composed from those.
11
14
  *
12
- * Not one colour, font, radius, duration or shadow is written literally in
13
- * any of the three: every value comes from a `--cogenta-<group>-<name>`
14
- * property produced from the skin's tokens, or from a `--cg-*` property
15
- * composed from those. A single hard-coded hex would be a colour no skin
16
- * can change.
17
- *
18
- * `@import` is resolved at build time by Astro, and by `@cogenta/cli`'s own
19
- * inliner when `cogenta serve` renders without a build. Both flatten these
20
- * three into one sheet, so no visitor ever pays for three round trips.
21
- *
22
- * The one thing this file adds on its own: the Google Fonts request for the
23
- * two type families `tokens.json` names (Archivo for the sans, Source Serif
24
- * 4 for the serif accents in `quote`, `prose`'s blockquotes and the
25
- * numbered indices in `featureGrid`/`faq`) — loaded here, once, rather than
26
- * per skin, since a skin only ever *names* a font family; it does not fetch
27
- * one. Both fall back to a real system stack (`tokens.json`'s `font.sans`/
28
- * `font.serif`) if Google Fonts is unreachable.
15
+ * The one thing this file adds on its own is the Google Fonts request for the
16
+ * two families `tokens.json` names: Geist (display, headings, text and
17
+ * interface, on one variable weight axis) and Geist Mono (labels, indices,
18
+ * figures and captions, the register of an engineering document). A skin only
19
+ * names a family; it never fetches one. Both fall back to real system stacks
20
+ * if Google Fonts is unreachable, and `display=swap` keeps text visible while
21
+ * they load. `cogenta serve` hoists this `@import` above the skin's rules.
29
22
  */
30
23
 
31
- @import url("https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;1,8..60,400&display=swap");
24
+ @import url("https://fonts.googleapis.com/css2?family=Geist:wght@300..700&family=Geist+Mono:wght@400..600&display=swap");
32
25
 
33
26
  @import "./tokens.css";
34
27
  @import "./base.css";
35
28
  @import "./blocks.css";
36
29
  @import "./archive.css";
30
+ @import "./widgets.css";
@@ -1,30 +1,25 @@
1
1
  /*
2
2
  * `@cogenta/theme-entreprise`'s design system.
3
3
  *
4
- * Contract D fixes a *closed* skin token set — seven colours, five type
5
- * tokens, two spacing tokens, three radii, three motion tokens, two shadows
6
- * — and refuses any skin that adds one. So this layer adds nothing to the
7
- * skin: every value below is *derived* from `--cogenta-*` by composition
8
- * (`calc`, `color-mix`, relative colour syntax). A skin swap rewrites the
9
- * generated `--cogenta-*` sheet and this whole system follows, with no
10
- * build step.
4
+ * The register is an engineering company's: precise, factual, quietly
5
+ * technical. Neutrals carry the page (a cool grey paper and a blue-black ink),
6
+ * one signal green is spent rarely (links, markers, one bar in a chart), and
7
+ * depth comes from hairlines, full-bleed photographs and ink bands, never from
8
+ * shadows or tinted boxes. Labels, indices and figures are set in a monospace,
9
+ * as on a drawing or a data sheet.
11
10
  *
12
- * Two rules hold everywhere in this file and the two that import it:
11
+ * Contract D fixes a closed skin token set, so nothing here adds a token:
12
+ * every value is derived from a `--cogenta-*` property (`calc`,
13
+ * `color-mix`, relative colour syntax). A skin swap rewrites that sheet and
14
+ * this whole system follows.
13
15
  *
14
- * 1. **No colour literal.** Not one hex, `rgb()`, `hsl()` or bare `oklch()`.
15
- * Every colour is either a skin token or a function *of* a skin token.
16
- * 2. **No second scale.** The type steps come from `--cogenta-font-size-*`
17
- * and the spacing multiplier from `--cogenta-space-scale`, both emitted
18
- * by `renderSkin` from the same tokens the validator checked.
16
+ * Two rules hold in every stylesheet of this theme:
19
17
  *
20
- * The default skin (`tokens.json`) is a light-mode-forward palette built
21
- * around one confident accent — a deep forest green rather than the more
22
- * expected "corporate blue" — on a warm near-white ground. This file's own
23
- * decisions are what turn that into a full system: the light mode is
24
- * "structured and edged" (hairline borders carry most of the depth, shadow
25
- * reserved for genuine hover elevation), and the dark mode is designed on
26
- * its own terms rather than mechanically inverted — see the colour section
27
- * below for the five choices that make it so.
18
+ * 1. No colour literal. Every colour is a skin token or a function of one.
19
+ * 2. No second scale. Type steps come from `--cogenta-font-size-*`; the
20
+ * display steps above `3xl` continue the same ratio
21
+ * (`--cogenta-font-scale`), and fluid sizes only interpolate between
22
+ * steps of that one ladder.
28
23
  */
29
24
 
30
25
  :where(:root) {
@@ -40,10 +35,7 @@
40
35
  }
41
36
 
42
37
  /* --------------------------------------------------------------------------
43
- Space — a slightly more generous scale than the type steps alone would
44
- suggest: the aesthetic direction asks for "real breathing room", which
45
- this theme spends mostly in its section rhythm (`--cg-section-y`) and
46
- its row/card padding, not in a larger base unit.
38
+ Space: one unit, one section rhythm, one grid.
47
39
  -------------------------------------------------------------------------- */
48
40
 
49
41
  :where(:root) {
@@ -61,18 +53,30 @@
61
53
  --cg-s12: calc(var(--cg-unit) * 12);
62
54
  --cg-s16: calc(var(--cg-unit) * 16);
63
55
  --cg-s20: calc(var(--cg-unit) * 20);
64
- --cg-s28: calc(var(--cg-unit) * 28);
65
-
66
- --cg-gutter: var(--cg-s6);
67
- --cg-gap-tight: var(--cg-s2);
68
- --cg-gap: var(--cg-s5);
69
- --cg-gap-loose: var(--cg-s10);
70
- --cg-section-y: var(--cg-s20);
56
+ --cg-s24: calc(var(--cg-unit) * 24);
57
+ --cg-s32: calc(var(--cg-unit) * 32);
58
+
59
+ /* The only vertical rhythm between sections. Every block is padded by
60
+ half of it above and below, so any two blocks sit one full step apart
61
+ whatever their order; a band (the call to action, a muted variant) is
62
+ padded by the whole step. */
63
+ --cg-section: clamp(var(--cg-s16), 9vw, var(--cg-s32));
64
+
65
+ /* A twelve-column grid with constant gutters. */
66
+ --cg-columns: 12;
67
+ --cg-gutter: clamp(var(--cg-s5), 4.5vw, var(--cg-s16));
68
+ --cg-col-gap: clamp(var(--cg-s4), 2.2vw, var(--cg-s8));
69
+ --cg-page: 80rem;
70
+
71
+ /* One column's width, for an element that hangs into the margin (a prose
72
+ heading). Unregistered custom properties are substituted where they are
73
+ used, so `cqi` resolves against the grid container around that element. */
74
+ --cg-col: calc((100cqi - (var(--cg-columns) - 1) * var(--cg-col-gap)) / var(--cg-columns));
71
75
 
72
76
  --cg-measure: 66ch;
73
- --cg-measure-narrow: 44ch;
74
- --cg-page: 78rem;
75
- --cg-page-narrow: 50rem;
77
+ --cg-measure-narrow: 48ch;
78
+
79
+ --cg-header-height: var(--cg-s20);
76
80
  }
77
81
 
78
82
  :where([data-density="compact"]) {
@@ -88,109 +92,93 @@
88
92
  }
89
93
 
90
94
  /* --------------------------------------------------------------------------
91
- Type — the skin's scale, named; plus the rhythm the scale does not carry.
95
+ Type: Geist for display, headings and text, Geist Mono for labels, indices
96
+ and figures. The skin names both; the theme only decides where each goes.
92
97
  -------------------------------------------------------------------------- */
93
98
 
94
99
  :where(:root) {
95
- --cg-text-xs: var(--cogenta-font-size-xs, 0.69rem);
96
- --cg-text-sm: var(--cogenta-font-size-sm, 0.83rem);
97
- --cg-text-md: var(--cogenta-font-size-md, var(--cogenta-font-base-size, 1rem));
98
- --cg-text-lg: var(--cogenta-font-size-lg, 1.2rem);
99
- --cg-text-xl: var(--cogenta-font-size-xl, 1.44rem);
100
- --cg-text-2xl: var(--cogenta-font-size-2xl, 1.728rem);
101
- --cg-text-3xl: var(--cogenta-font-size-3xl, 2.0736rem);
102
-
103
- --cg-leading-tight: 1.08;
104
- --cg-leading-snug: 1.24;
105
- --cg-leading-normal: 1.55;
106
- --cg-leading-relaxed: 1.72;
107
-
108
- /* A confident display face wants tighter tracking at large sizes, and a
109
- label set in small caps wants the opposite — both scale with the font
110
- size because they are written in `em`. */
111
- --cg-tracking-tight: -0.018em;
112
- --cg-tracking-snug: -0.008em;
113
- --cg-tracking-normal: 0em;
114
- --cg-tracking-wide: 0.1em;
115
-
100
+ --cg-font-display: var(--cogenta-font-serif);
101
+ --cg-font-text: var(--cogenta-font-sans);
102
+ --cg-font-label: var(--cogenta-font-mono);
103
+
104
+ --cg-text-xs: var(--cogenta-font-size-xs, 0.68rem);
105
+ --cg-text-sm: var(--cogenta-font-size-sm, 0.85rem);
106
+ --cg-text-md: var(--cogenta-font-size-md, var(--cogenta-font-base-size, 1.0625rem));
107
+ --cg-text-lg: var(--cogenta-font-size-lg, 1.33rem);
108
+ --cg-text-xl: var(--cogenta-font-size-xl, 1.66rem);
109
+ --cg-text-2xl: var(--cogenta-font-size-2xl, 2.08rem);
110
+ --cg-text-3xl: var(--cogenta-font-size-3xl, 2.59rem);
111
+ /* The same ladder, continued: each step is the previous one times the
112
+ skin's own ratio. */
113
+ --cg-text-4xl: calc(var(--cg-text-3xl) * var(--cogenta-font-scale, 1.25));
114
+ --cg-text-5xl: calc(var(--cg-text-4xl) * var(--cogenta-font-scale, 1.25));
115
+ --cg-text-6xl: calc(var(--cg-text-5xl) * var(--cogenta-font-scale, 1.25));
116
+ /* Interface text (navigation, buttons, labels in forms) sits between two
117
+ steps: `sm` is too small for a primary control, `md` too loud. */
118
+ --cg-text-ui: calc((var(--cg-text-sm) + var(--cg-text-md)) / 2);
119
+
120
+ /* Fluid sizes interpolate between two steps of the ladder above. */
121
+ --cg-size-display: clamp(var(--cg-text-3xl), calc(1.1rem + 4.2vw), var(--cg-text-6xl));
122
+ --cg-size-heading: clamp(var(--cg-text-2xl), calc(1rem + 2.3vw), var(--cg-text-4xl));
123
+ --cg-size-subheading: clamp(var(--cg-text-xl), calc(0.95rem + 1vw), var(--cg-text-2xl));
124
+ --cg-size-quote: clamp(var(--cg-text-xl), calc(1rem + 1.8vw), var(--cg-text-3xl));
125
+ --cg-size-figure: clamp(var(--cg-text-3xl), calc(1rem + 3vw), var(--cg-text-5xl));
126
+ --cg-size-lead: clamp(var(--cg-text-lg), calc(0.9rem + 0.6vw), var(--cg-text-xl));
127
+
128
+ --cg-leading-display: 0.98;
129
+ --cg-leading-heading: 1.08;
130
+ --cg-leading-snug: 1.3;
131
+ --cg-leading-text: 1.62;
132
+
133
+ --cg-tracking-display: -0.042em;
134
+ --cg-tracking-heading: -0.03em;
135
+ --cg-tracking-label: 0.04em;
136
+
137
+ --cg-weight-light: 350;
116
138
  --cg-weight-regular: 400;
117
139
  --cg-weight-medium: 500;
118
140
  --cg-weight-semibold: 600;
119
- --cg-weight-bold: 700;
141
+ /* Display and headings: a grotesk reads confident at medium, not light. */
142
+ --cg-weight-display: 500;
120
143
  }
121
144
 
122
145
  /* --------------------------------------------------------------------------
123
- Radius — deliberately sharper than a typical marketing template: a
124
- consultancy or a software vendor reads as more serious with edges that
125
- are structured rather than soft. `--cg-radius-pill` is the one rounded
126
- shape this theme uses freely (the eyebrow tag, small badges) precisely
127
- because everything else stays close to square.
146
+ Shape and motion: corners are square, and motion is a colour change.
128
147
  -------------------------------------------------------------------------- */
129
148
 
130
149
  :where(:root) {
131
- --cg-radius-xs: calc(var(--cogenta-radius-sm) / 2);
132
- --cg-radius-sm: var(--cogenta-radius-sm);
133
- --cg-radius-md: var(--cogenta-radius-md);
134
- --cg-radius-lg: var(--cogenta-radius-lg);
135
- --cg-radius-xl: calc(var(--cogenta-radius-lg) * 1.5);
136
- --cg-radius-pill: 999rem;
137
- }
138
-
139
- /* --------------------------------------------------------------------------
140
- Motion
141
- -------------------------------------------------------------------------- */
150
+ --cg-radius: var(--cogenta-radius-sm);
151
+ --cg-radius-portrait: var(--cogenta-radius-md);
142
152
 
143
- :where(:root) {
144
- --cg-duration-fast: calc(var(--cogenta-motion-duration) * 0.65);
145
- --cg-duration: var(--cogenta-motion-duration);
146
- --cg-duration-slow: calc(var(--cogenta-motion-duration) * 3);
153
+ --cg-duration: min(var(--cogenta-motion-duration), 150ms);
147
154
  --cg-ease: var(--cogenta-motion-easing);
155
+
156
+ --cg-rule: 1px;
157
+ --cg-rule-strong: 2px;
148
158
  }
149
159
 
150
160
  /* --------------------------------------------------------------------------
151
- Colour — one palette per scheme, both derived from the same seven tokens.
161
+ Colour: one palette per scheme, both derived from the same seven tokens.
152
162
  --------------------------------------------------------------------------
153
163
 
154
- The block below declares the **light** palette in plain terms; the
155
- scheme-aware values live in the `@supports` block after it, guarded the
156
- same way for the same reason `theme-canonical` guards it: a browser that
157
- cannot parse `light-dark()` must still get a usable light palette rather
158
- than an `unset` custom property.
159
-
160
- **This dark palette is designed on its own terms, not inverted — five
161
- decisions, each the opposite of what a mechanical `bg`/`fg` swap would
162
- produce:**
163
-
164
- 1. *Elevation is a hairline, almost everywhere.* Light mode expresses a
165
- raised surface mostly as a **border**, reserving `box-shadow` for
166
- genuine hover lift (a card, a service row). Dark mode keeps that same
167
- restraint: elevation is a ring that steps *up* in lightness, never a
168
- shadow — a shadow on ink conveys nothing.
169
- 2. *The accent is lifted less than a mechanical swap would allow, and
170
- **desaturated** rather than just brightened.* A forest green pushed to
171
- the same lightness a mechanical fix would pick reads as neon; this
172
- palette lifts it to L 0.68 and pulls a third of its chroma back, which
173
- is what makes it still read as "the same considered green" instead of
174
- a highlighter.
175
- 3. *The accent's foreground flips to ink.* Light text on a lifted accent
176
- fails contrast, so `accent-fg` is derived dark from the accent's own
177
- hue rather than kept as the skin's white.
178
- 4. *Text is never pure light and never fully desaturated.* Ink carries a
179
- trace of the accent's hue at low chroma — an off-white that still
180
- belongs to this palette rather than a generic dark-mode grey.
181
- 5. *A border lightens rather than darkens against its surface* — a
182
- darker line on dark ink is invisible.
183
-
184
- The hue and chroma of every dark value come from a skin token, so a skin
185
- with a different accent gets a dark palette tuned the same way without
186
- touching this file. Every ratio these values produce is computed for
187
- real, from this file, by `test/design-system.test.ts`, in both schemes.
188
-
189
- Known limit, same one `theme-canonical` records: the derivation assumes a
190
- light-first skin (`bg` lighter than `fg`) — what contract D's default and
191
- every blueprint use. A skin that starts dark would need a second colour
192
- group in the contract, a `theme@2.0` change no single theme can make on
193
- its own.
164
+ The first block declares the light palette plainly; the scheme-aware
165
+ values follow behind a feature query, so a browser that cannot parse
166
+ `light-dark()` still gets a complete light palette.
167
+
168
+ The dark palette is designed, not inverted:
169
+
170
+ 1. The ground is deep ink, derived from the skin's own `fg` hue, never a
171
+ neutral grey and never pure black. Surfaces step up in lightness
172
+ (sunken, canvas, raised); nothing casts a shadow.
173
+ 2. Text is the paper colour, lifted: the ivory's own hue at a lower
174
+ lightness than white, so long reading on ink stays calm.
175
+ 3. The accent is lifted and desaturated, and its foreground flips to ink.
176
+ 4. Hairlines step up in lightness from the surface they sit on.
177
+ 5. The ink band keeps its role (the one dark plane of a light page) by
178
+ becoming the raised ink surface, framed by hairlines.
179
+
180
+ Every ratio is computed from this file by `test/design-system.test.ts`,
181
+ in both schemes.
194
182
  -------------------------------------------------------------------------- */
195
183
 
196
184
  :where(:root) {
@@ -198,27 +186,28 @@
198
186
  --cg-surface: var(--cogenta-color-bg);
199
187
  --cg-surface-raised: var(--cogenta-color-bg);
200
188
  --cg-surface-sunken: var(--cogenta-color-muted);
201
- --cg-surface-tinted: color-mix(in oklab, var(--cogenta-color-accent) 7%, var(--cogenta-color-bg));
202
189
 
203
190
  --cg-ink: var(--cogenta-color-fg);
204
191
  --cg-ink-muted: var(--cogenta-color-muted-fg);
205
- --cg-ink-subtle: color-mix(in oklab, var(--cogenta-color-muted-fg) 85%, var(--cogenta-color-bg));
192
+ --cg-ink-subtle: color-mix(in oklab, var(--cogenta-color-muted-fg) 88%, var(--cogenta-color-bg));
206
193
 
207
194
  --cg-accent: var(--cogenta-color-accent);
208
195
  --cg-accent-fg: var(--cogenta-color-accent-fg);
209
- --cg-accent-hover: color-mix(in oklab, var(--cogenta-color-accent) 84%, var(--cogenta-color-fg));
210
- --cg-accent-soft: color-mix(in oklab, var(--cogenta-color-accent) 9%, var(--cogenta-color-bg));
211
- --cg-accent-soft-fg: color-mix(
212
- in oklab,
213
- var(--cogenta-color-accent) 70%,
214
- var(--cogenta-color-fg)
215
- );
196
+ --cg-accent-hover: color-mix(in oklab, var(--cogenta-color-accent) 70%, var(--cogenta-color-fg));
216
197
 
217
198
  --cg-line: var(--cogenta-color-border);
218
- --cg-line-soft: color-mix(in oklab, var(--cogenta-color-border) 50%, var(--cogenta-color-bg));
219
- --cg-line-strong: color-mix(in oklab, var(--cogenta-color-border) 60%, var(--cogenta-color-fg));
220
-
221
- --cg-scrim: color-mix(in oklab, var(--cogenta-color-fg) 58%, transparent);
199
+ --cg-line-soft: color-mix(in oklab, var(--cogenta-color-border) 60%, var(--cogenta-color-bg));
200
+ --cg-line-strong: color-mix(in oklab, var(--cogenta-color-border) 42%, var(--cogenta-color-fg));
201
+
202
+ --cg-band: var(--cogenta-color-fg);
203
+ --cg-band-ink: var(--cogenta-color-bg);
204
+ --cg-band-muted: color-mix(in oklab, var(--cogenta-color-bg) 74%, var(--cogenta-color-fg));
205
+ --cg-band-line: color-mix(in oklab, var(--cogenta-color-bg) 24%, var(--cogenta-color-fg));
206
+
207
+ --cg-action: var(--cogenta-color-fg);
208
+ --cg-action-fg: var(--cogenta-color-bg);
209
+ --cg-action-hover: var(--cogenta-color-accent);
210
+ --cg-action-hover-fg: var(--cogenta-color-accent-fg);
222
211
  }
223
212
 
224
213
  @supports (color: light-dark(currentColor, currentColor)) and
@@ -226,101 +215,86 @@
226
215
  :where(:root) {
227
216
  --cg-canvas: light-dark(
228
217
  var(--cogenta-color-bg),
229
- oklch(from var(--cogenta-color-fg) 0.155 calc(c * 0.65) h)
218
+ oklch(from var(--cogenta-color-fg) 0.19 calc(c * 0.8) h)
230
219
  );
231
220
  --cg-surface: light-dark(
232
221
  var(--cogenta-color-bg),
233
- oklch(from var(--cogenta-color-fg) 0.155 calc(c * 0.65) h)
222
+ oklch(from var(--cogenta-color-fg) 0.19 calc(c * 0.8) h)
234
223
  );
235
224
  --cg-surface-raised: light-dark(
236
225
  var(--cogenta-color-bg),
237
- oklch(from var(--cogenta-color-fg) 0.225 calc(c * 0.6) h)
226
+ oklch(from var(--cogenta-color-fg) 0.24 calc(c * 0.8) h)
238
227
  );
239
228
  --cg-surface-sunken: light-dark(
240
229
  var(--cogenta-color-muted),
241
- oklch(from var(--cogenta-color-fg) 0.115 calc(c * 0.75) h)
242
- );
243
- --cg-surface-tinted: light-dark(
244
- color-mix(in oklab, var(--cogenta-color-accent) 7%, var(--cogenta-color-bg)),
245
- oklch(from var(--cogenta-color-accent) 0.235 calc(c * 0.55) h)
230
+ oklch(from var(--cogenta-color-fg) 0.16 calc(c * 0.8) h)
246
231
  );
247
232
 
248
- --cg-ink: light-dark(
249
- var(--cogenta-color-fg),
250
- oklch(from var(--cogenta-color-accent) 0.93 0.01 h)
251
- );
233
+ --cg-ink: light-dark(var(--cogenta-color-fg), oklch(from var(--cogenta-color-bg) 0.93 c h));
252
234
  --cg-ink-muted: light-dark(
253
235
  var(--cogenta-color-muted-fg),
254
- oklch(from var(--cogenta-color-accent) 0.76 0.016 h)
236
+ oklch(from var(--cogenta-color-bg) 0.79 c h)
255
237
  );
256
238
  --cg-ink-subtle: light-dark(
257
- color-mix(in oklab, var(--cogenta-color-muted-fg) 85%, var(--cogenta-color-bg)),
258
- oklch(from var(--cogenta-color-accent) 0.63 0.014 h)
239
+ color-mix(in oklab, var(--cogenta-color-muted-fg) 88%, var(--cogenta-color-bg)),
240
+ oklch(from var(--cogenta-color-bg) 0.69 c h)
259
241
  );
260
242
 
261
243
  --cg-accent: light-dark(
262
244
  var(--cogenta-color-accent),
263
- oklch(from var(--cogenta-color-accent) 0.68 calc(c * 0.72) h)
245
+ oklch(from var(--cogenta-color-accent) 0.76 calc(c * 0.72) h)
264
246
  );
265
247
  --cg-accent-fg: light-dark(
266
248
  var(--cogenta-color-accent-fg),
267
- oklch(from var(--cogenta-color-accent) 0.16 calc(c * 0.5) h)
249
+ oklch(from var(--cogenta-color-accent) 0.18 calc(c * 0.5) h)
268
250
  );
269
251
  --cg-accent-hover: light-dark(
270
- color-mix(in oklab, var(--cogenta-color-accent) 84%, var(--cogenta-color-fg)),
271
- oklch(from var(--cogenta-color-accent) 0.77 calc(c * 0.68) h)
272
- );
273
- --cg-accent-soft: light-dark(
274
- color-mix(in oklab, var(--cogenta-color-accent) 9%, var(--cogenta-color-bg)),
275
- oklch(from var(--cogenta-color-accent) 0.28 calc(c * 0.45) h)
276
- );
277
- --cg-accent-soft-fg: light-dark(
278
252
  color-mix(in oklab, var(--cogenta-color-accent) 70%, var(--cogenta-color-fg)),
279
- oklch(from var(--cogenta-color-accent) 0.87 calc(c * 0.4) h)
253
+ oklch(from var(--cogenta-color-accent) 0.85 calc(c * 0.55) h)
280
254
  );
281
255
 
282
256
  --cg-line: light-dark(
283
257
  var(--cogenta-color-border),
284
- oklch(from var(--cogenta-color-accent) 0.34 calc(c * 0.2) h)
258
+ oklch(from var(--cogenta-color-fg) 0.33 calc(c * 0.8) h)
285
259
  );
286
260
  --cg-line-soft: light-dark(
287
- color-mix(in oklab, var(--cogenta-color-border) 50%, var(--cogenta-color-bg)),
288
- oklch(from var(--cogenta-color-accent) 0.27 calc(c * 0.18) h)
261
+ color-mix(in oklab, var(--cogenta-color-border) 60%, var(--cogenta-color-bg)),
262
+ oklch(from var(--cogenta-color-fg) 0.27 calc(c * 0.8) h)
289
263
  );
290
264
  --cg-line-strong: light-dark(
291
- color-mix(in oklab, var(--cogenta-color-border) 60%, var(--cogenta-color-fg)),
292
- oklch(from var(--cogenta-color-accent) 0.55 calc(c * 0.22) h)
265
+ color-mix(in oklab, var(--cogenta-color-border) 42%, var(--cogenta-color-fg)),
266
+ oklch(from var(--cogenta-color-fg) 0.55 calc(c * 0.6) h)
293
267
  );
294
- }
295
- }
296
268
 
297
- /* --------------------------------------------------------------------------
298
- Elevation — a hairline ring by default in both schemes; a real shadow is
299
- spent only on hover, never on a resting surface. This is the theme's own
300
- "structured, edged" answer to elevation, distinct from a shadow-first
301
- system: a resting card looks like a plate on a desk, not a sticker
302
- floating above the page.
303
- -------------------------------------------------------------------------- */
304
-
305
- :where(:root) {
306
- --cg-ring: inset 0 0 0 1px var(--cg-line);
307
- --cg-ring-accent: inset 0 0 0 1px var(--cg-accent);
308
- --cg-ring-strong: inset 0 0 0 1px var(--cg-line-strong);
309
-
310
- --cg-elevation-0: none;
311
- --cg-elevation-1: var(--cg-ring);
312
- --cg-elevation-2: var(--cogenta-shadow-sm), var(--cg-ring);
313
- --cg-elevation-3: var(--cogenta-shadow-md), var(--cg-ring);
314
- }
269
+ --cg-band: light-dark(
270
+ var(--cogenta-color-fg),
271
+ oklch(from var(--cogenta-color-fg) 0.25 calc(c * 0.9) h)
272
+ );
273
+ --cg-band-ink: light-dark(
274
+ var(--cogenta-color-bg),
275
+ oklch(from var(--cogenta-color-bg) 0.95 c h)
276
+ );
277
+ --cg-band-muted: light-dark(
278
+ color-mix(in oklab, var(--cogenta-color-bg) 74%, var(--cogenta-color-fg)),
279
+ oklch(from var(--cogenta-color-bg) 0.8 c h)
280
+ );
281
+ --cg-band-line: light-dark(
282
+ color-mix(in oklab, var(--cogenta-color-bg) 24%, var(--cogenta-color-fg)),
283
+ oklch(from var(--cogenta-color-fg) 0.37 calc(c * 0.8) h)
284
+ );
315
285
 
316
- @media (prefers-color-scheme: dark) {
317
- :where(:root:not([data-theme="light"])) {
318
- --cg-elevation-2: var(--cg-ring-strong);
319
- --cg-elevation-3: var(--cg-ring-strong), var(--cogenta-shadow-md);
286
+ --cg-action: light-dark(var(--cogenta-color-fg), oklch(from var(--cogenta-color-bg) 0.93 c h));
287
+ --cg-action-fg: light-dark(
288
+ var(--cogenta-color-bg),
289
+ oklch(from var(--cogenta-color-fg) 0.19 calc(c * 0.8) h)
290
+ );
291
+ --cg-action-hover: light-dark(
292
+ var(--cogenta-color-accent),
293
+ oklch(from var(--cogenta-color-accent) 0.76 calc(c * 0.72) h)
294
+ );
295
+ --cg-action-hover-fg: light-dark(
296
+ var(--cogenta-color-accent-fg),
297
+ oklch(from var(--cogenta-color-accent) 0.18 calc(c * 0.5) h)
298
+ );
320
299
  }
321
300
  }
322
-
323
- :where(:root[data-theme="dark"]) {
324
- --cg-elevation-2: var(--cg-ring-strong);
325
- --cg-elevation-3: var(--cg-ring-strong), var(--cogenta-shadow-md);
326
- }