@stnd/styles 0.10.2 → 0.10.4

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @stnd/styles
2
2
 
3
+ ## 0.10.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Auto-bumped @stnd/styles due to modified code.
8
+
9
+ ## 0.10.3
10
+
11
+ ### Patch Changes
12
+
13
+ - Auto-bumped @stnd/styles due to modified code.
14
+
3
15
  ## 0.10.2
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -183,8 +183,8 @@ All 17 files verified via a running dev server (both `stnd.gd` and `stnd.build`)
183
183
  - **`.rhythm`'s base 1x-spacing rule has no `>` combinator; every other rule in the same block does** (`_standard-05-rhythm.scss`) — applies at any nesting depth instead of direct children only. Left alone: adding `>` risks a real regression on nested content (e.g. a paragraph inside a `.callout` inside `.rhythm`) that's impossible to fully rule out without a visual pass over every place `.rhythm` is used.
184
184
  - **`.compact`/`.relaxed` are unnamespaced and collide across `_standard-09-lists.scss` and `_standard-50-utilities.scss`** — resolving this properly means renaming part of the framework's public class API, which is an architectural decision, not a mechanical fix.
185
185
 
186
- **Documented, not a bug:**
187
- - The `generate-scale` mixin's `"trim"`/`"leading"` scale keys (feeding `.mt-trim`, `.p-leading`, etc.) use `--size-2xs`/`--size-xs` — not the real `--trim`/`--leading` rhythm tokens that happen to share the same words. `.mt-trim` does not use `--trim`. A naming collision worth knowing about, not something to change.
186
+ **Resolved:**
187
+ - The `generate-scale` mixin's `"trim"` and `"leading"` scale keys (feeding `.mt-trim`, `.mb-leading`, etc.) now directly connect to the real vertical rhythm tokens `var(--trim)` and `var(--leading)`, aligning spacing utilities with typographic rhythm. Invalid combinations like `padding: auto` and `gap: auto` are filtered out.
188
188
 
189
189
  **Where the mechanism is real but the hook is currently unused:**
190
190
  - `--corner` (theme override for `--radius`) — documented, no theme sets
package/TOKENS.md CHANGED
@@ -80,42 +80,17 @@ Powered by `pow(var(--optical-ratio), N)`.
80
80
  | `--scale-7` | 6 | |
81
81
  | `--scale-8` | 7 | Largest |
82
82
 
83
- ## T-Shirt Size Aliases
84
-
85
- | Token | Maps to |
86
- | ------------- | ------------ |
87
- | `--size-3xs` | `--scale-d5` |
88
- | `--size-2xs` | `--scale-d4` |
89
- | `--size-xs` | `--scale-d3` |
90
- | `--size-sm` | `--scale-d2` |
91
- | `--size-base` | `--scale` |
92
- | `--size-lg` | `--scale-2` |
93
- | `--size-xl` | `--scale-3` |
94
- | `--size-2xl` | `--scale-4` |
95
- | `--size-3xl` | `--scale-5` |
96
- | `--size-4xl` | `--scale-6` |
97
- | `--size-5xl` | `--scale-7` |
98
- | `--size-6xl` | `--scale-8` |
99
-
100
83
  ## Layout Widths
101
84
 
102
- Two independent scopes. `.prose`'s own box reads `--body-max-width`
103
- directly, so `.hero`/`.full` breakout elements grow all the way to the page
104
- shell. `.feature` and tables/`.editorial` don't reference either width
105
- token — they break out by a fixed rhythm increment off `--line-width`
106
- (`--space-2` / `--space-4` each side).
107
-
108
- | Token | Default | Description |
109
- | ------------------- | --------------------------------- | --------------------------------------------- |
110
- | `--body-max-width` | `900px` | The whole page shell — header, footer, content, and the ceiling `.hero`/`.full` grow into |
111
- | `--body-max-width` | `900px` | The whole page shell — header, footer, content, and the ceiling `.hero`/`.full` grow into |
112
- | `--line-width-xs` | `24rem` | Extra small |
113
- | `--line-width-sm` | `32rem` | Small |
114
- | `--line-width-md` | `42rem` | Medium (default reading width) |
115
- | `--line-width-lg` | `50rem` | Large |
116
- | `--line-width-xl` | `60rem` | Extra large |
117
- | `--line-width-full` | `calc(100vw - space*2)` | Full viewport minus gutters |
118
- | `--line-width` | `var(--measure, --line-width-md)` | Active line width (themeable via `--measure`) |
85
+ The page layout uses a two-tier containment model: `--page-max-width` defines the outer
86
+ viewport boundary for the page shell, header, and footer, while `--prose-width` defines the
87
+ optimal reading measure for readable text elements (60–75 characters). Breakout tracks
88
+ extend outwards from `--prose-width` in rhythm steps towards `--page-max-width`.
89
+
90
+ | Token | Default | Description |
91
+ | ------------------ | --------- | --------------------------------------------------------------------- |
92
+ | `--page-max-width` | `1400px` | The whole page shell — header, footer, content, and breakout ceiling |
93
+ | `--prose-width` | `42rem` | Active readable column measure (60–75 characters) |
119
94
 
120
95
  ## Line Heights
121
96
 
@@ -133,23 +108,31 @@ token — they break out by a fixed rhythm increment off `--line-width`
133
108
  | `--tracking-neutral` | `0em` | Neutral tracking |
134
109
  | `--tracking-open` | `0.01em` | Open tracking |
135
110
 
136
- ## Stroke & Radius
111
+ ## Stroke, Radius & Interactive States
137
112
 
138
113
  | Token | Default | Description |
139
114
  | ------------------- | ------------------------------- | ---------------------------------------- |
140
115
  | `--stroke-width` | `max(1px, 0.06rem)` | Hairline stroke |
141
- | `--stroke-width-lg` | `calc(stroke-width * 2)` | Heavy stroke |
142
- | `--radius` | `var(--corner, var(--leading))` | Border radius (themeable via `--corner`) |
116
+ | `--stroke-width-lg` | `calc(var(--stroke-width) * 2)` | Heavy stroke |
117
+ | `--radius` | `var(--leading)` | Macro border radius (cards, panels) |
118
+ | `--radius-sm` | `var(--trim)` | Micro border radius (buttons, tags, inputs)|
119
+ | `--border` | `var(--stroke-width) solid var(--color-border)` | Active border state |
120
+ | `--border-hover` | `var(--stroke-width) solid var(--color-foreground)` | Hover border state |
121
+ | `--shadow` | Layered elevation | Resting shadow |
122
+ | `--shadow-hover` | Layered elevation + glow | Active hover shadow |
143
123
  | `--filter-blur` | `blur(8px)` | Standard blur filter |
144
124
 
145
- ## Gaps
125
+ ## Layout Padding & Vertical Rhythm
146
126
 
147
- | Token | Default | Description |
148
- | ------------------- | ------------------------------------- | --------------------- |
149
- | `--gap-body` | `clamp(space, 0.5vi+0.5rlh, space-3)` | Body gutter |
150
- | `--gap-grid` | `0.25lh` | Grid gutter |
151
- | `--gap-body-mobile` | `var(--space)` | Body gutter on mobile |
152
- | `--gap-mobile` | `1rlh` | General gap on mobile |
127
+ | Token | Default | Description |
128
+ | ---------------------- | ----------------------------- | --------------------------------------------------------------- |
129
+ | `--page-padding` | `clamp(1rem, 3vw, 2.5rem)` | Fluid horizontal page gutter (desktop and mobile) |
130
+ | `--rhythm-block-scale` | `2` | Vertical rhythm multiplier for non-text block elements |
131
+ | `--space` | `1rlh` | Fundamental vertical rhythm unit |
132
+ | `--space-half` | `calc(var(--space) / 2)` | Half-step vertical rhythm unit |
133
+ | `--gap` | `calc(var(--space))` | Rhythm layout gap |
134
+ | `--gap-compact` | `var(--trim)` | Compact micro-gap for inline groups and chips |
135
+ | `--gap-grid` | `0.25lh` | Grid gutter |
153
136
 
154
137
  ## Z-Index
155
138
 
@@ -275,25 +258,24 @@ Active tokens that resolve to light or dark palette.
275
258
  | `--color-muted` | `foreground 60%` | Muted text |
276
259
  | `--color-subtle` | `foreground 40%` | Subtle text / decoration |
277
260
  | `--color-border` | `foreground 10%` | Default border |
278
- | `--color-surface-low` | `foreground 3%` opaque | Slight surface tint |
279
- | `--color-surface` | `foreground 3%` opaque | Secondary background |
280
- | `--color-surface-high` | `foreground 5%` transparent | Hover state |
281
- | `--color-darker` | `dark 15%` transparent | Shadow helper |
282
- | `--color-light` | light background | Pole light |
283
- | `--color-dark` | light foreground | Pole dark |
284
- | `--color-shadow` | `dark 5%` transparent | Shadow color base |
285
-
286
- ## Surface Elevation
287
-
288
- Progressive foreground tinting for depth. Pairs with shadow presets.
289
-
290
- | Token | Tint | Shadow | Use case |
291
- | ------------------------- | --------------- | ------------- | ----------------------- |
292
- | `--color-surface-lowest` | 14% (background) | none | Page background |
293
- | `--color-surface-low` | 7% | `--shadow` | Cards, inputs |
294
- | `--color-surface` | 3% | `--shadow-lg` | Raised panels, popovers |
295
- | `--color-surface-high` | 7% | `--shadow-xl` | Overlays, drawers |
296
- | `--color-surface-highest` | 14% | `--shadow-xl` | Modals, toasts |
261
+ | `--color-surface` | `var(--color-surface-light-1)` | Active base surface |
262
+ | `--color-surface-light-1`| `color-mix(in srgb, white 4%, bg)` | Light step 1 (subtle lift)|
263
+ | `--color-surface-light-2`| `color-mix(in srgb, white 9%, bg)` | Light step 2 (cards) |
264
+ | `--color-surface-light-3`| `color-mix(in srgb, white 16%, bg)` | Light step 3 (popovers) |
265
+ | `--color-surface-dark-1` | `color-mix(in srgb, black 4%, bg)` | Dark step 1 (subtle wells)|
266
+ | `--color-surface-dark-2` | `color-mix(in srgb, black 9%, bg)` | Dark step 2 (wells/inputs)|
267
+ | `--color-surface-dark-3` | `color-mix(in srgb, black 16%, bg)` | Dark step 3 (deep wells) |
268
+ | `--color-darker` | `dark 15%` transparent | Shadow helper |
269
+ | `--color-light` | light background | Pole light |
270
+ | `--color-dark` | light foreground | Pole dark |
271
+ | `--color-shadow` | `dark 5%` transparent | Shadow color base |
272
+
273
+ ## Directional Surfaces
274
+
275
+ Standard uses directional surface tokens relative to canvas background:
276
+ - **Light steps (`--color-surface-light-1..3`)**: Blend subtle amounts of white into the background canvas, lifting elements up into elevation regardless of light/dark mode.
277
+ - **Dark steps (`--color-surface-dark-1..3`)**: Blend subtle amounts of black into the background canvas, sinking elements into wells/recessed areas.
278
+ - **Default surface (`--color-surface`)**: Resolves to `--color-surface-light-1` by default, customizable per theme.
297
279
 
298
280
  ## Shadows (Layered System)
299
281
 
@@ -406,13 +388,12 @@ box-shadow: var(--shadow-inset), var(--shadow-ambient);
406
388
 
407
389
  ## Layout — Prose Grid
408
390
 
409
- | Token | Default | Description |
410
- | --------------------------- | ----------------------------- | ------------------------ |
411
- | `--content-width` | `min(--line-width, 100%)` | Content column width |
412
- | `--content-width-sm` | `max(space-2 - space, space)` | Sidebar margin inset |
413
- | `--content-width-editorial` | `minmax(0, --space-2)` | Editorial column |
414
- | `--content-width-feature` | `minmax(0, --space-4)` | Feature column |
415
- | `--content-width-hero` | `minmax(0, 1fr)` | Hero (full bleed) column |
391
+ | Token | Default | Description |
392
+ | ---------------------- | -------------------------------------------- | --------------------------- |
393
+ | `--prose-width` | `42rem` | Optimal reading line length |
394
+ | `--prose-inset` | `max(calc(var(--space-2) - var(--space)), var(--space))` | Narrow elements margin inset |
395
+ | `--prose-breakout` | `minmax(0, var(--space-4))` | Wide breakout column track |
396
+ | `--prose-track-full` | `minmax(0, 1fr)` | Full page breakout track |
416
397
 
417
398
  ## Analog (Noise Overlay)
418
399
 
@@ -32,7 +32,7 @@
32
32
  * @see standard-01-token.scss
33
33
  */
34
34
 
35
- $mobile: 600px;
35
+ $mobile: 640px;
36
36
  $small: 768px;
37
37
  $large: 1024px;
38
38
  $wide: 1440px;
@@ -45,11 +45,11 @@ $text-elements: "a, kbd, div, span, mark, callout-title::before, span, li::befor
45
45
  // Vertical rhythm system (_standard-05-rhythm.scss): consecutive "simple"
46
46
  // elements get 1x --gap margin between them; the moment either neighbor is
47
47
  // a "double" (heavier block-level: tables, cards, figures, sections...) the
48
- // margin becomes --gap * --gap-multiplicator (2x by default) — extra
48
+ // margin becomes --space * --rhythm-block-scale (2x by default) — extra
49
49
  // breathing room around visually heavier blocks. $rhythm-tags is the union,
50
50
  // used for the heading-follows-anything spacing rules.
51
51
  $rhythm-simple-tags: ".alert, #comments, h1, h2, h3, h4, h5, h6, blockquote, ul, ol, li, dl, dt, dd, p, pre, figure, hr, form, fieldset, button, aside, .callout, .card, .box, .btn, .grid";
52
- $rhythm-double-tags: "table, blockquote, div:has(.video), section, article, header, footer, hr, #comments, .callout, pre, figure, p:has(img), section, .box, .card, .small, .editorial, .feature, .hero, .full, .scroll, hr, aside, .stnd-code-block";
52
+ $rhythm-double-tags: "table, blockquote, div:has(.video), section, article, header, footer, hr, #comments, .callout, pre, figure, p:has(img), section, .box, .card, .narrow, .wide, .full, .scroll, hr, aside, .stnd-code-block";
53
53
  $rhythm-tags: $rhythm-simple-tags + ", div, " + $rhythm-double-tags;
54
54
 
55
55
  // Reusable style fragments via @extend (not applied directly — SCSS
@@ -66,7 +66,7 @@ $rhythm-tags: $rhythm-simple-tags + ", div, " + $rhythm-double-tags;
66
66
  }
67
67
 
68
68
  %padding-text {
69
- padding: var(--space-d4) var(--space-d2);
69
+ padding: var(--trim) var(--leading);
70
70
  }
71
71
 
72
72
  // Single-target on purpose (not ":root, body") — a token declared on both
@@ -92,23 +92,20 @@
92
92
  --nl: calc(var(--leading) * var(--line-height));
93
93
 
94
94
  /**
95
- * @name Rhythm & Gaps
96
- * @description Spacing intervals between major layout blocks, page sections, headers, and footers.
95
+ * @name Rhythm & Page Padding
96
+ * @description Spacing intervals between major layout blocks, page sections, and screen edges.
97
97
  *
98
- * @property {variable} --gap Dynamic gap between rhythm blocks (`calc(var(--space) * var(--optical-ratio))`).
99
- * @property {variable} --gap-body Standard gutter for body content containers (`var(--space-2)`).
100
- * @property {variable} --gap-header Top margin gutter above page headers (`var(--space-8)`).
101
- * @property {variable} --gap-footer Bottom margin gutter above page footers (`calc(var(--gap-body) * 1.5)`).
102
- * @property {variable} --gap-grid-img Micro-gap separating adjacent images in rhythm grids (`var(--space-d4)`).
103
- * @property {variable} --gap-multiplicator Gutter multiplier factor (`2`).
98
+ * @property {variable} --gap Dynamic gap between rhythm blocks (`calc(var(--space))`).
99
+ * @property {variable} --gap-compact Compact micro-gap for inline groups, metadata, breadcrumbs (`var(--trim)`).
100
+ * @property {variable} --page-padding Fluid outer margin/padding preventing content from touching device bezels (`clamp(1rem, 3vw, 2.5rem)`).
101
+ * @property {variable} --gap-grid-img Micro-gap separating adjacent images in rhythm grids (`var(--space-half)`).
102
+ * @property {variable} --rhythm-block-scale Ratio multiplier factor for non-text blocks (`2`).
104
103
  */
105
- /* Gap, space between blocks in rhythm, goes to --space in mobile */
106
104
  --gap: calc(var(--space));
107
- --gap-body: var(--space-2);
108
- --gap-header: var(--space-8);
109
- --gap-footer: calc(var(--gap-body) * 1.5);
110
- --gap-grid-img: var(--space-d4);
111
- --gap-multiplicator: 2;
105
+ --gap-compact: var(--trim);
106
+ --page-padding: clamp(1rem, 3vw, 2.5rem);
107
+ --gap-grid-img: var(--space-half);
108
+ --rhythm-block-scale: 2;
112
109
 
113
110
  /**
114
111
  * @name Breakpoints
@@ -125,18 +122,16 @@
125
122
  --breakpoint-wide: #{$wide};
126
123
 
127
124
  /**
128
- * @name Content Breakout Widths
129
- * @description Grid breakout track sizes allowing editorial content, features, and media to extend past the reading measure.
125
+ * @name Prose Breakout Tracks & Insets
126
+ * @description Grid breakout track sizes allowing wide content and full-width elements to extend past the reading measure, plus narrow element insets.
130
127
  *
131
- * @property {variable} --content-width-sm Small layout breakout track width (`max(calc(var(--space-2) - var(--space)), var(--space))`).
132
- * @property {variable} --content-width-editorial Editorial column breakout track width (`minmax(0, var(--space-2))`).
133
- * @property {variable} --content-width-feature Feature callout breakout track width (`minmax(0, var(--space-4))`).
134
- * @property {variable} --content-width-hero Full-bleed hero breakout track width (`minmax(0, 1fr)`).
128
+ * @property {variable} --prose-inset Narrow layout inset margin (`max(calc(var(--space-2) - var(--space)), var(--space))`).
129
+ * @property {variable} --prose-breakout Wide column breakout track width (`minmax(0, var(--space-4))`).
130
+ * @property {variable} --prose-track-full Full-width page breakout track (`minmax(0, 1fr)`).
135
131
  */
136
- --content-width-sm: max(calc(var(--space-2) - var(--space)), var(--space));
137
- --content-width-editorial: minmax(0, var(--space-2));
138
- --content-width-feature: minmax(0, var(--space-4));
139
- --content-width-hero: minmax(0, 1fr);
132
+ --prose-inset: max(calc(var(--space-2) - var(--space)), var(--space));
133
+ --prose-breakout: minmax(0, var(--space-4));
134
+ --prose-track-full: minmax(0, 1fr);
140
135
 
141
136
  /**
142
137
  * @name Stroke, Radius & Filters
@@ -144,21 +139,17 @@
144
139
  *
145
140
  * @property {variable} --stroke-width Hairline border stroke width (`max(1px, 0.06rem)`).
146
141
  * @property {variable} --stroke-width-lg Heavy border stroke width (`calc(var(--stroke-width) * 2)`).
147
- * @property {variable} --radius Border radius proportional to leading. Resolves theme hook `--corner` or derives proportionally from `--leading`.
148
- * @property {variable} --radius-sm Small border radius for badges, inputs, and buttons (`min(8px, var(--radius))`).
142
+ * @property {variable} --radius Macro border radius for cards, dialogs, and large containers (`var(--leading)`).
143
+ * @property {variable} --radius-sm Micro border radius for tags, badges, buttons, and inputs (`var(--trim)`).
149
144
  * @property {variable} --filter-blur Standard blur filter (`blur(8px)`).
150
145
  * @property {variable} --filter-glass Deep glassmorphic blur filter for overlays and floating panels (`blur(20px)`).
151
146
  */
152
- /* Design system tokens */
153
147
  --filter-blur: blur(8px);
154
148
  --filter-glass: blur(20px);
155
149
  --stroke-width: max(1px, 0.06rem);
156
150
  --stroke-width-lg: calc(var(--stroke-width) * 2);
157
- /* --corner is a documented theme-authoring hook (TOKENS.md) — no theme
158
- currently sets it, so --radius always resolves through --leading
159
- (proportional to line-height/font-size) today. Not dead, just unused. */
160
- --radius: var(--corner, var(--leading));
161
- --radius-sm: min(8px, var(--radius));
151
+ --radius: var(--leading);
152
+ --radius-sm: var(--trim);
162
153
 
163
154
  /**
164
155
  * @name Shadows & Elevation
@@ -216,38 +207,11 @@
216
207
  * @name Layout & Reading Widths
217
208
  * @description Column constraints for prose reading measure and outer page boundaries.
218
209
  *
219
- * @property {variable} --body-max-width Maximum width of the entire page shell (`900px`). Constrains headers, prose, and footers.
220
- * @property {variable} --line-width-xs Extra-small reading width (`24rem`). Ideal for cards, sidebars, and captions.
221
- * @property {variable} --line-width-sm Small reading width (`32rem`).
222
- * @property {variable} --line-width-md Medium reading width (`42rem`). Optimal reading line length (approx. 65-75 characters).
223
- * @property {variable} --line-width-lg Large reading width (`50rem`).
224
- * @property {variable} --line-width-xl Extra-large reading width (`60rem`).
225
- * @property {variable} --line-width-full Full viewport width minus gutters (`calc(100vw - (var(--space) * 2))`).
226
- * @property {variable} --line-width Active reading column measure. Resolves `--font-line-width`, `--measure`, or `--line-width-md`.
227
- * @property {variable} --content-width Effective content width constrained to container (`min(var(--line-width), 100%)`).
210
+ * @property {variable} --page-max-width Maximum width of the entire page shell (`1400px`).
211
+ * @property {variable} --prose-width Optimal reading line length (approx. 65 characters / `42rem`).
228
212
  */
229
- /* Layout width — body-max-width is the whole page shell (header, footer,
230
- content); .prose's own box reads it directly, so .hero/.full breakout
231
- elements grow into it too. line-width is a single line of readable
232
- text — .feature and tables/.editorial break out by a fixed rhythm
233
- increment off this (space-2 / space-4 each side), not off
234
- body-max-width. */
235
- --body-max-width: 900px;
236
-
237
- --line-width-xs: 24rem;
238
- --line-width-sm: 32rem;
239
- --line-width-md: 42rem;
240
- --line-width-lg: 50rem;
241
- --line-width-xl: 60rem;
242
- --line-width-full: calc(100vw - (var(--space) * 2));
243
- /* --font-line-width is the theme-authoring hook (e.g. humanist, book,
244
- 2064 themes); --measure is a second, editor-specific override read by
245
- apps/stnd.gd's Writer component. Same override-ladder shape as
246
- --font-ratio above — a note's frontmatter can also set --line-width
247
- directly, bypassing both. */
248
- --line-width: var(--font-line-width, var(--measure, var(--line-width-md)));
249
-
250
- --content-width: min(var(--line-width), 100%);
213
+ --page-max-width: 1400px;
214
+ --prose-width: 42rem;
251
215
 
252
216
  /**
253
217
  * @name Line Heights & Letter Spacing
@@ -312,10 +276,10 @@
312
276
  * @name Optical Harmony Scale & Sizes
313
277
  * @description Modular geometric scale driven by `--optical-ratio` for typography and sizing. Sub-base steps (d5..d2) use a flattened divisor and floor at 11px to protect legibility.
314
278
  *
315
- * @property {variable} --scale-d5 Sub-base optical step -5 (`max(calc(var(--font-size) / (var(--optical-ratio) * var(--optical-ratio))), 11px)`).
316
- * @property {variable} --scale-d4 Sub-base optical step -4 (`max(calc(var(--font-size) / (var(--optical-ratio) * 1.25)), 11px)`).
317
- * @property {variable} --scale-d3 Sub-base optical step -3 (`max(calc(var(--font-size) / var(--optical-ratio)), 11px)`).
318
- * @property {variable} --scale-d2 Sub-base optical step -2 (`max(calc(var(--font-size) / (1 + (var(--optical-ratio) - 1) * 0.5)), 11px)`).
279
+ * @property {variable} --scale-d5 Sub-base optical step -5 (`max(calc(var(--font-size) * pow(var(--optical-ratio), -2)), 9px)`).
280
+ * @property {variable} --scale-d4 Sub-base optical step -4 (`max(calc(var(--font-size) * pow(var(--optical-ratio), -1.5)), 9px)`).
281
+ * @property {variable} --scale-d3 Sub-base optical step -3 (`max(calc(var(--font-size) * pow(var(--optical-ratio), -1)), 9px)`).
282
+ * @property {variable} --scale-d2 Sub-base optical step -2 (`max(calc(var(--font-size) * pow(var(--optical-ratio), -0.5)), 9px)`).
319
283
  * @property {variable} --scale Base optical scale step (`var(--font-size)`).
320
284
  * @property {variable} --scale-2 Super-base optical step 2 (`calc(var(--font-size) * var(--optical-ratio))`).
321
285
  * @property {variable} --scale-3 Super-base optical step 3 (`calc(var(--scale-2) * var(--optical-ratio))`).
@@ -324,36 +288,15 @@
324
288
  * @property {variable} --scale-6 Super-base optical step 6 (`calc(var(--scale-5) * var(--optical-ratio))`).
325
289
  * @property {variable} --scale-7 Super-base optical step 7 (`calc(var(--scale-6) * var(--optical-ratio))`).
326
290
  * @property {variable} --scale-8 Super-base optical step 8 (`calc(var(--scale-7) * var(--optical-ratio))`).
327
- * @property {variable} --size-3xs T-shirt size alias for `--scale-d5`. Used for micro-badges and metadata captions.
328
- * @property {variable} --size-2xs T-shirt size alias for `--scale-d4`. Used for tooltips, footnotes, and tags.
329
- * @property {variable} --size-xs T-shirt size alias for `--scale-d3`. Used for secondary labels and table metadata.
330
- * @property {variable} --size-sm T-shirt size alias for `--scale-d2`. Used for UI controls, inputs, and captions.
331
- * @property {variable} --size-base T-shirt size alias for `--scale`. Base body text size (`1rem`).
332
- * @property {variable} --size-lg T-shirt size alias for `--scale-2`. Subheadings and lead paragraphs.
333
- * @property {variable} --size-xl T-shirt size alias for `--scale-3`. Section headers (`h3`).
334
- * @property {variable} --size-2xl T-shirt size alias for `--scale-4`. Major headings (`h2`).
335
- * @property {variable} --size-3xl T-shirt size alias for `--scale-5`. Page titles (`h1`).
336
- * @property {variable} --size-4xl T-shirt size alias for `--scale-6`. Hero display headings.
337
- * @property {variable} --size-5xl T-shirt size alias for `--scale-7`. Large hero numbers and display text.
338
- * @property {variable} --size-6xl T-shirt size alias for `--scale-8`. Maximum display typography scale.
339
291
  */
340
292
  /* Optical harmony scale. --scale-2 upward is a clean geometric progression
341
293
  (each step = previous * --optical-ratio). Below base (d5..d2) the
342
- divisor is deliberately NOT the mirrored geometric inverse (ratio^-1,
343
- ratio^-2...) — it's flattened (ratio*1.25, then a 0.5-blended exponent
344
- for d2) so small text doesn't shrink as aggressively as a pure
345
- geometric scale would, staying legible; each step also floors at 11px
346
- regardless of ratio math. */
347
- --scale-d5: max(
348
- calc(var(--font-size) / (var(--optical-ratio) * var(--optical-ratio))),
349
- 11px
350
- );
351
- --scale-d4: max(calc(var(--font-size) / (var(--optical-ratio) * 1.25)), 11px);
352
- --scale-d3: max(calc(var(--font-size) / var(--optical-ratio)), 11px);
353
- --scale-d2: max(
354
- calc(var(--font-size) / (1 + (var(--optical-ratio) - 1) * 0.5)),
355
- 11px
356
- );
294
+ scale steps down by fractional power increments (ratio^-0.5, ratio^-1,
295
+ ratio^-1.5, ratio^-2) floored at 9px so micro text stays legible and distinct. */
296
+ --scale-d5: max(calc(var(--font-size) * pow(var(--optical-ratio), -2)), 9px);
297
+ --scale-d4: max(calc(var(--font-size) * pow(var(--optical-ratio), -1.5)), 9px);
298
+ --scale-d3: max(calc(var(--font-size) * pow(var(--optical-ratio), -1)), 9px);
299
+ --scale-d2: max(calc(var(--font-size) * pow(var(--optical-ratio), -0.5)), 9px);
357
300
  --scale: var(--font-size);
358
301
  --scale-2: calc(var(--font-size) * var(--optical-ratio));
359
302
  --scale-3: calc(var(--scale-2) * var(--optical-ratio));
@@ -363,34 +306,13 @@
363
306
  --scale-7: calc(var(--scale-6) * var(--optical-ratio));
364
307
  --scale-8: calc(var(--scale-7) * var(--optical-ratio));
365
308
 
366
- /* Industrial Size Scale (T-Shirt Aliases) */
367
- --size-3xs: var(--scale-d5);
368
- --size-2xs: var(--scale-d4);
369
- --size-xs: var(--scale-d3);
370
- --size-sm: var(--scale-d2);
371
- --size-base: var(--scale);
372
- --size-lg: var(--scale-2);
373
- --size-xl: var(--scale-3);
374
- --size-2xl: var(--scale-4);
375
- --size-3xl: var(--scale-5);
376
- --size-4xl: var(--scale-6);
377
- --size-5xl: var(--scale-7);
378
- --size-6xl: var(--scale-8);
379
-
380
309
  /**
381
310
  * @name Mobile Settings
382
311
  * @description Responsive overrides applied on mobile screen sizes.
383
312
  *
384
313
  * @property {variable} --font-size-mobile Base font size override on mobile viewports (`1.125rem`).
385
- * @property {variable} --gap-body-mobile Body gutter override on mobile viewports (`var(--space)`).
386
- * @property {variable} --gap-mobile General layout gap override on mobile viewports (`var(--space)`).
387
- * @property {variable} --gap-header-mobile Header gutter override on mobile viewports (`var(--space-4)`).
388
314
  */
389
- /* Mobile settings */
390
315
  --font-size-mobile: 1.125rem;
391
- --gap-body-mobile: var(--space);
392
- --gap-mobile: var(--space);
393
- --gap-header-mobile: var(--space-4);
394
316
 
395
317
  /**
396
318
  * @name Z-Index Scale
@@ -537,23 +459,22 @@
537
459
  #{$text-elements},
538
460
  a {
539
461
  text-box-trim: trim-both;
540
- text-box-edge: cap alphabetic;
462
+ text-box-edge: cap text;
541
463
  }
542
464
 
543
- /* Table cells opt back out of text-box-trim — vertical-align/padding math
544
- in table cells doesn't play well with the trimmed ascender/descender
545
- box, so cells keep normal line-box sizing instead. */
465
+ /* Table cells and site footers opt back out of text-box-trim — vertical-align/padding
466
+ math and compact interface metadata don't play well with trimmed line boxes,
467
+ so they keep normal line-box sizing instead. */
546
468
  td,
547
- th {
469
+ th,
470
+ footer,
471
+ .stnd-footer {
548
472
  text-box-trim: none;
549
473
  }
550
474
 
551
475
  /* Responsive adjustments */
552
476
  @media only screen and (max-width: #{$small}) {
553
477
  #{$stnd-theme-scope} {
554
- --gap-body: var(--gap-body-mobile) !important;
555
- --gap-header: var(--gap-header-mobile) !important;
556
- --gap: var(--gap-mobile) !important;
557
478
  --font-size: var(--font-size-mobile) !important;
558
479
  }
559
480
  }