@gramlot/gramlot 0.2.1 → 0.2.3

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 (40) hide show
  1. package/assets/branding/gramlot-logo-dark.svg +3 -0
  2. package/assets/branding/gramlot-logo.svg +3 -0
  3. package/assets/branding/gramlot-mark-dark.png +0 -0
  4. package/assets/branding/gramlot-mark.png +0 -0
  5. package/assets/branding/svg/gramlot-horizontal-black.svg +3 -0
  6. package/assets/branding/svg/gramlot-horizontal-blue.svg +3 -0
  7. package/assets/branding/svg/gramlot-horizontal-ink.svg +3 -0
  8. package/assets/branding/svg/gramlot-horizontal-inverse.svg +3 -0
  9. package/assets/branding/svg/gramlot-horizontal-primary.svg +3 -0
  10. package/assets/branding/svg/gramlot-horizontal-white.svg +3 -0
  11. package/assets/branding/svg/gramlot-logo-black.svg +3 -0
  12. package/assets/branding/svg/gramlot-logo-blue.svg +3 -0
  13. package/assets/branding/svg/gramlot-logo-ink.svg +3 -0
  14. package/assets/branding/svg/gramlot-logo-inverse.svg +3 -0
  15. package/assets/branding/svg/gramlot-logo-primary.svg +3 -0
  16. package/assets/branding/svg/gramlot-logo-white.svg +3 -0
  17. package/assets/branding/svg/gramlot-mark-black.svg +2 -0
  18. package/assets/branding/svg/gramlot-mark-blue.svg +2 -0
  19. package/assets/branding/svg/gramlot-mark-ink.svg +2 -0
  20. package/assets/branding/svg/gramlot-mark-inverse.svg +2 -0
  21. package/assets/branding/svg/gramlot-mark-primary.svg +2 -0
  22. package/assets/branding/svg/gramlot-mark-white.svg +2 -0
  23. package/assets/branding/svg/gramlot-wordmark-black.svg +2 -0
  24. package/assets/branding/svg/gramlot-wordmark-blue.svg +2 -0
  25. package/assets/branding/svg/gramlot-wordmark-ink.svg +2 -0
  26. package/assets/branding/svg/gramlot-wordmark-inverse.svg +2 -0
  27. package/assets/branding/svg/gramlot-wordmark-primary.svg +2 -0
  28. package/assets/branding/svg/gramlot-wordmark-white.svg +2 -0
  29. package/dist/gramlot.js +126 -35
  30. package/package.json +7 -3
  31. package/src/binding/inline.js +26 -13
  32. package/src/binding/providers.js +8 -8
  33. package/src/builder/source.js +65 -1
  34. package/src/gramlot.js +7 -3
  35. package/src/renderer/attributes.js +30 -0
  36. package/src/renderer/gramlot-html-renderer.js +7 -4
  37. package/src/renderer/gramlot-svg-renderer.js +10 -3
  38. package/src/view/html.js +1 -1
  39. package/themes/gramlot-base/README.md +30 -0
  40. package/themes/gramlot-base/theme.css +264 -0
@@ -1,5 +1,7 @@
1
1
  import {SvgRenderer, svgAttributes} from '@genrojs/builders';
2
- import {boundaryAttributes, domNames, textValue, withoutBindingAttributes, withoutNullValues} from './attributes.js';
2
+ import {
3
+ boundaryAttributes, domNames, requireNoScriptAttributes, textValue, withoutBindingAttributes, withoutNullValues,
4
+ } from './attributes.js';
3
5
 
4
6
  // SVG elements written `<tag … />`, as the Python SvgRenderer of Builder (the grammar gives them no children).
5
7
  const SVG_VOID_TAGS = new Set([
@@ -26,9 +28,14 @@ export class GramlotSvgRenderer extends SvgRenderer {
26
28
 
27
29
  get owner() { return this._owner; }
28
30
 
29
- /** Builder's meta on the attributes with the `==` evaluated by the owner; a sub-builder boundary node keeps its attributes literal, with the Gramlot filters and names. */
31
+ /**
32
+ * Builder's meta on the attributes with the `==` evaluated by the owner, with no `on<event>` and no
33
+ * `javascript:` URL; a sub-builder boundary node keeps its attributes literal, with the Gramlot filters and names.
34
+ */
30
35
  _handleMeta(node, runtimeAttrs) {
31
- const [tag, attrs] = super._handleMeta(node, this.owner.evaluateExpressions(node, runtimeAttrs));
36
+ const evaluated = this.owner.evaluateExpressions(node, runtimeAttrs);
37
+ requireNoScriptAttributes(node, evaluated);
38
+ const [tag, attrs] = super._handleMeta(node, evaluated);
32
39
  return node._getMeta('subbuilder') ? [tag, svgAttributes(boundaryAttributes(attrs))] : [tag, attrs];
33
40
  }
34
41
 
package/src/view/html.js CHANGED
@@ -30,7 +30,7 @@ function domPropertyName(name) {
30
30
  }
31
31
 
32
32
  /**
33
- * Native elements in HTML documents, including embedded SVG. Grammar stays on the builder; attribute
33
+ * HTML elements of an HTML document, including embedded SVG elements. Grammar stays on the builder; attribute
34
34
  * names and style arrive adapted by the renderers (GramlotHtmlRenderer, GramlotSvgRenderer).
35
35
  */
36
36
  export class HtmlElement {
@@ -0,0 +1,30 @@
1
+ # Gramlot Base theme
2
+
3
+ `theme.css` is a standalone application stylesheet. Include it once on a page built with Gramlot Source. It has no JavaScript, server, or database dependency. Example pages and the runner can reference this file by URL; they do not need a copy.
4
+
5
+ ```html
6
+ <link rel="stylesheet" href="/themes/gramlot-base/theme.css">
7
+ ```
8
+
9
+ The URL above is illustrative: the host must serve this file at that path. The theme styles semantic HTML, forms, tables, dialogs, details, code, focus states, and a few optional layout classes: `.example-page`, `.stack`, `.grid`, `.card`, `.muted`, and fluid SVG `.example-art`. Secondary button variants are `.button--secondary` and `.button--quiet`; status chips use `.status` with a semantic modifier. SVG icons can use `.gramlot-icon` (fill) or `.gramlot-icon--stroke` (stroke) and inherit `currentColor`. Supply an accessible name or mark decorative icons `aria-hidden="true"` in the application.
10
+
11
+ ## Tokens and extension
12
+
13
+ The light palette follows [`assets/branding/theme-tokens.json`](../../assets/branding/theme-tokens.json) and the [visual guide](../../assets/branding/theme-guide.md). All theme variables use the `--gramlot-` prefix. The design primitives include spacing, radii, font stacks, a shadow, focus ring, and page width. Override variables after this stylesheet to customize a page or create a sibling theme:
14
+
15
+ ```css
16
+ :root {
17
+ --gramlot-page-width: 80rem;
18
+ --gramlot-radius: 0.625rem;
19
+ }
20
+ ```
21
+
22
+ Rules are grouped in cascade layers (`gramlot.reset`, `gramlot.tokens`, `gramlot.base`, `gramlot.components`, `gramlot.utilities`). Unlayered application CSS takes precedence. A new theme should provide the same semantic token names, then define its own rules instead of modifying this theme in place. `data-theme="light"` or `data-theme="dark"` on `<html>` selects an explicit mode; otherwise the operating system preference is used. Dark values are theme adaptations of the approved light palette and are not additional approved brand colors.
23
+
24
+ The logo assets in `assets/branding/` have opaque white or navy backgrounds. Choose the matching file for the surface and respect the [asset limitations](../../assets/branding/theme-guide.md#2-asset-files-and-limitations); the theme does not recolor them. The application theme does not replace the required classic Read the Docs appearance of documentation sites.
25
+
26
+ Modern evergreen browsers are the intended target. Cascade layers, `clamp()`, CSS grid, logical properties, `color-scheme`, and container queries are used; no legacy browser fallback is included. This stylesheet is an application presentation layer, not a claim that every Gramlot component or integration has been visually verified.
27
+
28
+ Syntax highlighting uses `.hljs-*` token classes mapped to the same semantic colors in light and dark mode. Python and JavaScript detection belongs to the runtime; the theme only styles the resulting code spans.
29
+
30
+ The base text size is 14px with compact headings and spacing. Runner navigation uses the approved navy navigation surface, blue selected item and yellow brand accent; these are the existing palette tokens, not new colors.
@@ -0,0 +1,264 @@
1
+ /* Gramlot Base: application UI theme. Brand sources: assets/branding/theme-tokens.json. */
2
+ @layer gramlot.reset, gramlot.tokens, gramlot.base, gramlot.components, gramlot.utilities;
3
+
4
+ @layer gramlot.reset {
5
+ *, *::before, *::after { box-sizing: border-box; }
6
+ html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
7
+ body { margin: 0; }
8
+ img, picture, video, canvas { display: block; max-inline-size: 100%; }
9
+ svg { max-inline-size: 100%; }
10
+ button, input, select, textarea { font: inherit; }
11
+ }
12
+
13
+ @layer gramlot.tokens {
14
+ :root {
15
+ color-scheme: light;
16
+ --gramlot-brand-blue: #456bc4;
17
+ --gramlot-brand-yellow: #ffc400;
18
+ --gramlot-ink: #243449;
19
+ --gramlot-background: #f7f8f5;
20
+ --gramlot-surface: #ffffff;
21
+ --gramlot-surface-subtle: #edf1f7;
22
+ --gramlot-text-secondary: #566579;
23
+ --gramlot-border: #d5dce5;
24
+ --gramlot-border-control: #7a8798;
25
+ --gramlot-navigation: #182333;
26
+ --gramlot-navigation-text: #edf2fa;
27
+ --gramlot-action: #456bc4;
28
+ --gramlot-action-hover: #3557ab;
29
+ --gramlot-selected: #eaf0fc;
30
+ --gramlot-success: #23745b;
31
+ --gramlot-success-background: #eaf5ef;
32
+ --gramlot-warning: #785000;
33
+ --gramlot-warning-background: #fff4cf;
34
+ --gramlot-error: #b13d48;
35
+ --gramlot-error-background: #fceef0;
36
+
37
+ --gramlot-font-ui: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
38
+ --gramlot-font-code: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
39
+ --gramlot-space-1: 0.25rem;
40
+ --gramlot-space-2: 0.5rem;
41
+ --gramlot-space-3: 0.75rem;
42
+ --gramlot-space-4: 1rem;
43
+ --gramlot-space-6: 1.5rem;
44
+ --gramlot-space-8: 2rem;
45
+ --gramlot-space-12: 3rem;
46
+ --gramlot-radius-sm: 0.375rem;
47
+ --gramlot-radius: 0.5rem;
48
+ --gramlot-radius-lg: 0.75rem;
49
+ --gramlot-shadow: 0 1px 2px rgb(24 35 51 / 5%), 0 8px 24px rgb(24 35 51 / 5%);
50
+ --gramlot-focus-ring: #456bc4;
51
+ --gramlot-page-width: 72rem;
52
+ }
53
+
54
+ @media (prefers-color-scheme: dark) {
55
+ :root:not([data-theme="light"]) {
56
+ color-scheme: dark;
57
+ --gramlot-ink: #edf2fa;
58
+ --gramlot-background: #111b29;
59
+ --gramlot-surface: #1b293b;
60
+ --gramlot-surface-subtle: #24354b;
61
+ --gramlot-text-secondary: #bdc9d9;
62
+ --gramlot-border: #44566d;
63
+ --gramlot-border-control: #9bacbf;
64
+ --gramlot-navigation: #0b1420;
65
+ --gramlot-navigation-text: #edf2fa;
66
+ --gramlot-action: #91adf4;
67
+ --gramlot-action-hover: #b3c6fa;
68
+ --gramlot-selected: #283c61;
69
+ --gramlot-success: #89d4b7;
70
+ --gramlot-success-background: #163c34;
71
+ --gramlot-warning: #ffdc86;
72
+ --gramlot-warning-background: #483718;
73
+ --gramlot-error: #ffb3bb;
74
+ --gramlot-error-background: #4d2630;
75
+ --gramlot-focus-ring: #ffc400;
76
+ --gramlot-shadow: 0 1px 2px rgb(0 0 0 / 15%), 0 8px 24px rgb(0 0 0 / 12%);
77
+ }
78
+ }
79
+
80
+ :root[data-theme="dark"] {
81
+ color-scheme: dark;
82
+ --gramlot-ink: #edf2fa;
83
+ --gramlot-background: #111b29;
84
+ --gramlot-surface: #1b293b;
85
+ --gramlot-surface-subtle: #24354b;
86
+ --gramlot-text-secondary: #bdc9d9;
87
+ --gramlot-border: #44566d;
88
+ --gramlot-border-control: #9bacbf;
89
+ --gramlot-navigation: #0b1420;
90
+ --gramlot-navigation-text: #edf2fa;
91
+ --gramlot-action: #91adf4;
92
+ --gramlot-action-hover: #b3c6fa;
93
+ --gramlot-selected: #283c61;
94
+ --gramlot-success: #89d4b7;
95
+ --gramlot-success-background: #163c34;
96
+ --gramlot-warning: #ffdc86;
97
+ --gramlot-warning-background: #483718;
98
+ --gramlot-error: #ffb3bb;
99
+ --gramlot-error-background: #4d2630;
100
+ --gramlot-shadow: 0 1px 2px rgb(0 0 0 / 15%), 0 8px 24px rgb(0 0 0 / 12%);
101
+ }
102
+ }
103
+
104
+ @layer gramlot.base {
105
+ html { font-size: 14px; scroll-behavior: smooth; }
106
+ body {
107
+ min-block-size: 100vh;
108
+ background: var(--gramlot-background);
109
+ color: var(--gramlot-ink);
110
+ font: 400 1rem/1.5 var(--gramlot-font-ui);
111
+ text-rendering: optimizeLegibility;
112
+ }
113
+ :where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl, blockquote, pre, figure) { margin-block: 0 .75rem; }
114
+ :where(h1, h2, h3, h4, h5, h6) { line-height: 1.25; letter-spacing: -0.025em; text-wrap: balance; }
115
+ h1 { font-size: clamp(1.4rem, 1.2rem + .7vw, 1.8rem); }
116
+ h2 { font-size: clamp(1.15rem, 1rem + .4vw, 1.35rem); }
117
+ h3 { font-size: 1.125rem; }
118
+ :where(p, li, dd, td, th) { overflow-wrap: anywhere; }
119
+ :where(ul, ol) { padding-inline-start: 1.5rem; }
120
+ :where(li + li) { margin-block-start: 0.25rem; }
121
+ :where(a) { color: var(--gramlot-action); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
122
+ :where(a:hover) { color: var(--gramlot-action-hover); }
123
+ :where(a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
124
+ textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible) {
125
+ outline: 2px solid var(--gramlot-focus-ring);
126
+ outline-offset: 2px;
127
+ }
128
+ :where(code, kbd, samp, pre) { font-family: var(--gramlot-font-code); }
129
+ :where(code, kbd) { border-radius: var(--gramlot-radius-sm); background: var(--gramlot-surface-subtle); padding: 0.1em 0.3em; font-size: 0.9em; }
130
+ pre { overflow-x: auto; border: 1px solid var(--gramlot-border); border-radius: var(--gramlot-radius); background: var(--gramlot-surface-subtle); padding: 1rem; }
131
+ pre code { background: none; padding: 0; }
132
+ blockquote { border-inline-start: 3px solid var(--gramlot-brand-blue); padding-inline-start: 1rem; color: var(--gramlot-text-secondary); }
133
+ hr { border: 0; border-block-start: 1px solid var(--gramlot-border); margin-block: 2rem; }
134
+ :where(small, figcaption, caption) { color: var(--gramlot-text-secondary); font-size: 0.875rem; }
135
+ :where(svg.gramlot-icon) { inline-size: 1.25em; block-size: 1.25em; flex: none; fill: currentColor; vertical-align: -0.2em; }
136
+ :where(svg.gramlot-icon--stroke) { fill: none; stroke: currentColor; }
137
+ :where(svg.gramlot-icon--stroke *) { vector-effect: non-scaling-stroke; }
138
+ :where([hidden]) { display: none !important; }
139
+ }
140
+
141
+ @layer gramlot.components {
142
+ :where(button, input[type="button"], input[type="submit"], input[type="reset"],
143
+ .button) {
144
+ display: inline-flex;
145
+ align-items: center;
146
+ justify-content: center;
147
+ gap: var(--gramlot-space-2);
148
+ min-block-size: 2.75rem;
149
+ border: 1px solid var(--gramlot-action);
150
+ border-radius: var(--gramlot-radius-sm);
151
+ background: var(--gramlot-action);
152
+ color: var(--gramlot-surface);
153
+ padding: 0.6rem 1rem;
154
+ font-size: 0.875rem;
155
+ font-weight: 650;
156
+ line-height: 1.5;
157
+ text-align: center;
158
+ text-decoration: none;
159
+ cursor: pointer;
160
+ transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
161
+ }
162
+ :where(button, input[type="button"], input[type="submit"], input[type="reset"], .button):hover:not(:disabled) {
163
+ background: var(--gramlot-action-hover);
164
+ border-color: var(--gramlot-action-hover);
165
+ color: var(--gramlot-surface);
166
+ }
167
+ :where(button, input[type="button"], input[type="submit"], input[type="reset"], .button):active:not(:disabled) { transform: translateY(1px); }
168
+ :where(button, input[type="button"], input[type="submit"], input[type="reset"], .button):disabled { opacity: 0.55; cursor: not-allowed; }
169
+ :where(.button--secondary, button.secondary) {
170
+ background: var(--gramlot-surface);
171
+ color: var(--gramlot-action);
172
+ border-color: var(--gramlot-border-control);
173
+ }
174
+ :where(.button--secondary, button.secondary):hover:not(:disabled) {
175
+ background: var(--gramlot-selected);
176
+ color: var(--gramlot-action-hover);
177
+ border-color: var(--gramlot-action-hover);
178
+ }
179
+ :where(.button--quiet, button.quiet) { background: transparent; color: var(--gramlot-action); border-color: transparent; }
180
+ :where(.button--quiet, button.quiet):hover:not(:disabled) { background: var(--gramlot-selected); color: var(--gramlot-action-hover); border-color: transparent; }
181
+
182
+ :where(label) { display: inline-block; margin-block-end: var(--gramlot-space-1); font-size: 0.875rem; font-weight: 600; }
183
+ :where(label:has(input:disabled)) { color: var(--gramlot-text-secondary); }
184
+ :where(input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]), select, textarea) {
185
+ display: block;
186
+ inline-size: 100%;
187
+ min-inline-size: 0;
188
+ min-block-size: 2.75rem;
189
+ border: 1px solid var(--gramlot-border-control);
190
+ border-radius: var(--gramlot-radius-sm);
191
+ background: var(--gramlot-surface);
192
+ color: var(--gramlot-ink);
193
+ padding: 0.55rem 0.75rem;
194
+ font-size: 0.875rem;
195
+ line-height: 1.5;
196
+ }
197
+ :where(textarea) { min-block-size: 7rem; resize: vertical; }
198
+ :where(input, textarea)::placeholder { color: var(--gramlot-text-secondary); opacity: 1; }
199
+ :where(input, select, textarea):disabled { opacity: 0.6; cursor: not-allowed; }
200
+ :where(input, select, textarea)[aria-invalid="true"] { border-color: var(--gramlot-error); }
201
+ :where(input, select, textarea):user-invalid { border-color: var(--gramlot-error); }
202
+ :where(input[type="checkbox"], input[type="radio"], input[type="range"], input[type="color"], progress) { accent-color: var(--gramlot-brand-blue); }
203
+ :where(input[type="checkbox"], input[type="radio"]) { inline-size: 1.125rem; block-size: 1.125rem; margin: 0; vertical-align: -0.2em; cursor: pointer; }
204
+ :where(input[type="range"]) { inline-size: 100%; cursor: pointer; }
205
+ :where(input[type="color"]) { min-inline-size: 3rem; min-block-size: 2.75rem; border: 1px solid var(--gramlot-border-control); border-radius: var(--gramlot-radius-sm); background: var(--gramlot-surface); cursor: pointer; }
206
+ :where(input[type="file"]) { max-inline-size: 100%; color: var(--gramlot-text-secondary); font-size: 0.875rem; }
207
+ :where(input[type="file"])::file-selector-button { margin-inline-end: 0.75rem; border: 1px solid var(--gramlot-border-control); border-radius: var(--gramlot-radius-sm); background: var(--gramlot-surface); color: var(--gramlot-ink); padding: 0.5rem 0.75rem; font: inherit; cursor: pointer; }
208
+ :where(fieldset) { min-inline-size: 0; margin: 0 0 1rem; border: 1px solid var(--gramlot-border); border-radius: var(--gramlot-radius); padding: 1rem; }
209
+ :where(legend) { padding-inline: 0.25rem; font-weight: 650; }
210
+ :where(form > * + *) { margin-block-start: var(--gramlot-space-4); }
211
+ :where(output) { font-variant-numeric: tabular-nums; }
212
+
213
+ :where(table) { inline-size: 100%; border-collapse: collapse; font-size: 0.875rem; font-variant-numeric: tabular-nums; }
214
+ :where(caption) { text-align: start; padding-block-end: var(--gramlot-space-2); }
215
+ :where(th, td) { border-block-end: 1px solid var(--gramlot-border); padding: 0.7rem 0.8rem; text-align: start; vertical-align: top; }
216
+ :where(thead) { background: var(--gramlot-surface-subtle); }
217
+ :where(th) { font-weight: 650; }
218
+ :where(tbody tr:hover) { background: var(--gramlot-selected); }
219
+ :where(tr[aria-selected="true"]) { background: var(--gramlot-selected); }
220
+
221
+ :where(details) { border: 1px solid var(--gramlot-border); border-radius: var(--gramlot-radius); background: var(--gramlot-surface); padding: 0.75rem 1rem; }
222
+ :where(summary) { cursor: pointer; font-weight: 650; }
223
+ :where(details[open] > summary) { margin-block-end: 0.75rem; }
224
+ :where(dialog) { max-inline-size: min(90vw, 40rem); border: 1px solid var(--gramlot-border); border-radius: var(--gramlot-radius-lg); background: var(--gramlot-surface); color: var(--gramlot-ink); padding: clamp(1rem, 3vw, 2rem); box-shadow: var(--gramlot-shadow); }
225
+ :where(dialog::backdrop) { background: rgb(11 20 32 / 70%); }
226
+ :where(progress, meter) { inline-size: 100%; block-size: 0.75rem; }
227
+ :where([role="status"]) { color: var(--gramlot-success); }
228
+ :where([role="alert"]) { color: var(--gramlot-error); }
229
+ :where(mark) { background: var(--gramlot-brand-yellow); color: #182333; padding-inline: 0.2em; }
230
+ }
231
+
232
+ @layer gramlot.components {
233
+ .hljs { color: var(--gramlot-ink); }
234
+ .hljs-keyword, .hljs-selector-tag, .hljs-built_in { color: var(--gramlot-action); }
235
+ .hljs-string, .hljs-regexp { color: var(--gramlot-success); }
236
+ .hljs-number, .hljs-literal { color: var(--gramlot-warning); }
237
+ .hljs-title, .hljs-attr, .hljs-property { color: var(--gramlot-action); }
238
+ .hljs-comment, .hljs-meta { color: var(--gramlot-text-secondary); }
239
+ .hljs-comment { font-style: italic; }
240
+ }
241
+
242
+ @layer gramlot.utilities {
243
+ .example-page { inline-size: min(100% - 2rem, var(--gramlot-page-width)); margin-inline: auto; padding-block: clamp(.75rem, 2vw, 1.25rem); }
244
+ .stack { display: grid; gap: var(--gramlot-space-4); align-content: start; }
245
+ .stack > * { margin-block: 0; }
246
+ .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: var(--gramlot-space-4); align-items: start; }
247
+ .card { container-type: inline-size; min-inline-size: 0; border: 1px solid var(--gramlot-border); border-radius: var(--gramlot-radius-lg); background: var(--gramlot-surface); padding: clamp(.75rem, 1.5vw, 1rem); box-shadow: var(--gramlot-shadow); }
248
+ .card > :last-child { margin-block-end: 0; }
249
+ .example-art { display: block; inline-size: 100%; block-size: auto; }
250
+ .example-art { display: block; inline-size: 100%; block-size: auto; }
251
+ .muted { color: var(--gramlot-text-secondary); }
252
+ .surface-subtle { background: var(--gramlot-surface-subtle); }
253
+ .status { display: inline-flex; align-items: center; gap: 0.4em; border-radius: 999px; padding: 0.25em 0.65em; font-size: 0.75rem; font-weight: 650; }
254
+ .status--success { background: var(--gramlot-success-background); color: var(--gramlot-success); }
255
+ .status--warning { background: var(--gramlot-warning-background); color: var(--gramlot-warning); }
256
+ .status--error { background: var(--gramlot-error-background); color: var(--gramlot-error); }
257
+ .sr-only { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
258
+ @container (max-width: 25rem) { .card .grid { grid-template-columns: 1fr; } }
259
+ }
260
+
261
+ @media (prefers-reduced-motion: reduce) {
262
+ html { scroll-behavior: auto; }
263
+ *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
264
+ }