flexr 1.1.0 → 1.2.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 (101) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -0
  3. data/CHANGELOG.md +116 -0
  4. data/CONTRIBUTING.md +13 -1
  5. data/README.md +6 -2
  6. data/Rakefile +41 -5
  7. data/Steepfile +7 -0
  8. data/benchmark/golden/calculator_lexer.rb +276 -0
  9. data/benchmark/golden/graphql_lexer.rb +310 -0
  10. data/benchmark/golden/json_lexer.rb +292 -0
  11. data/benchmark/golden/regexp_tokenizer.rb +293 -0
  12. data/benchmark/golden/ruby_subset_lexer.rb +280 -0
  13. data/benchmark/golden/sql_lexer.rb +293 -0
  14. data/benchmark/golden/toml_lexer.rb +292 -0
  15. data/benchmark/golden/toy_lang_lexer.rb +273 -0
  16. data/benchmark/golden/with_lrama_lexer.rb +264 -0
  17. data/benchmark/golden/with_racc_lexer.rb +264 -0
  18. data/benchmark/lrama_lexer.rb +165 -0
  19. data/benchmark/matrix.rb +79 -0
  20. data/benchmark/profile.rb +109 -0
  21. data/benchmark/run.rb +4 -1
  22. data/benchmark/state_dispatch.rb +78 -0
  23. data/docs/README.md +1 -2
  24. data/docs/RELEASING.md +9 -2
  25. data/docs/migration-v2.md +73 -0
  26. data/docs/perf-log.md +108 -0
  27. data/docs/reference/README.md +2 -0
  28. data/docs/reference/cli.md +71 -5
  29. data/docs/reference/compatibility.md +9 -2
  30. data/docs/reference/diagnostics.md +338 -0
  31. data/docs/reference/dsl.md +8 -5
  32. data/docs/reference/errors.md +28 -0
  33. data/docs/reference/generated-artifacts.md +11 -0
  34. data/docs/reference/public-api.md +32 -8
  35. data/docs/reference/regexp.md +19 -7
  36. data/docs/reference/ruby-lsp.md +34 -0
  37. data/docs/reference/testing.md +57 -0
  38. data/examples/graphql/README.md +14 -0
  39. data/examples/graphql/lexer.flexr.rb +29 -0
  40. data/examples/sql/README.md +16 -0
  41. data/examples/sql/lexer.flexr.rb +23 -0
  42. data/examples/toml/README.md +14 -0
  43. data/examples/toml/lexer.flexr.rb +23 -0
  44. data/gemfiles/ruby_lsp.gemfile +4 -0
  45. data/gemfiles/types.gemfile +7 -0
  46. data/lib/flexr/automaton/accel.rb +11 -1
  47. data/lib/flexr/automaton/analysis.rb +161 -7
  48. data/lib/flexr/automaton/compiler.rb +175 -24
  49. data/lib/flexr/cli.rb +117 -17
  50. data/lib/flexr/codegen/firstmatch.rb +1 -7
  51. data/lib/flexr/codegen/table.rb +2 -2
  52. data/lib/flexr/configuration.rb +8 -0
  53. data/lib/flexr/deprecations.rb +26 -0
  54. data/lib/flexr/diagnostics.rb +39 -3
  55. data/lib/flexr/dsl.rb +11 -9
  56. data/lib/flexr/errors.rb +6 -6
  57. data/lib/flexr/generated.rb +27 -15
  58. data/lib/flexr/generator.rb +44 -29
  59. data/lib/flexr/grammar.rb +41 -0
  60. data/lib/flexr/ir.rb +2 -2
  61. data/lib/flexr/migration.rb +31 -0
  62. data/lib/flexr/minitest.rb +24 -0
  63. data/lib/flexr/options.rb +4 -2
  64. data/lib/flexr/regexp/matcher.rb +26 -0
  65. data/lib/flexr/regexp/normalizer.rb +4 -8
  66. data/lib/flexr/regexp/parser.rb +127 -21
  67. data/lib/flexr/regexp/tokenizer.rb +4 -4
  68. data/lib/flexr/rspec.rb +51 -0
  69. data/lib/flexr/runtime/core.rb +21 -15
  70. data/lib/flexr/runtime/errors.rb +6 -4
  71. data/lib/flexr/runtime/interpreter.rb +47 -45
  72. data/lib/flexr/runtime/location.rb +5 -4
  73. data/lib/flexr/runtime/token.rb +1 -0
  74. data/lib/flexr/runtime.rb +6 -2
  75. data/lib/flexr/source/passthrough.rb +14 -11
  76. data/lib/flexr/source/prism_reader.rb +45 -14
  77. data/lib/flexr/testing.rb +47 -0
  78. data/lib/flexr/trace.rb +197 -0
  79. data/lib/flexr/unicode/property.rb +1 -2
  80. data/lib/flexr/unicode/reference_regexp.rb +8 -9
  81. data/lib/flexr/version.rb +1 -1
  82. data/lib/flexr.rb +1 -0
  83. data/lib/ruby_lsp/flexr/addon.rb +114 -0
  84. data/sig/flexr.rbs +185 -0
  85. data/site/src/layouts/SiteLayout.astro +8 -2
  86. data/site/src/pages/index.astro +69 -155
  87. data/site/src/styles/custom.css +4 -287
  88. data/site/src/styles/landing.css +239 -0
  89. data/test/ruby_lsp_addon_spec.rb +135 -0
  90. data/tools/docs_verify.rb +1 -0
  91. data/tools/golden.rb +54 -0
  92. data/tools/release_notes.rb +16 -0
  93. metadata +44 -11
  94. data/benchmark/golden/calculator_lexer.sha256 +0 -1
  95. data/benchmark/golden/json_lexer.sha256 +0 -1
  96. data/benchmark/golden/regexp_tokenizer.sha256 +0 -1
  97. data/benchmark/golden/ruby_subset_lexer.sha256 +0 -1
  98. data/benchmark/golden/toy_lang_lexer.sha256 +0 -1
  99. data/benchmark/golden/with_lrama_lexer.sha256 +0 -1
  100. data/benchmark/golden/with_racc_lexer.sha256 +0 -1
  101. data/docs/releases/v1.1.0.md +0 -44
@@ -1,174 +1,88 @@
1
1
  ---
2
2
  import SiteLayout from '../layouts/SiteLayout.astro';
3
+ import '../styles/landing.css';
3
4
 
4
5
  const base = import.meta.env.BASE_URL.endsWith('/') ? import.meta.env.BASE_URL : `${import.meta.env.BASE_URL}/`;
5
6
  const repo = 'https://github.com/ydah/flexr';
6
7
  ---
7
8
  <SiteLayout
8
- title="Ruby-native lexer tooling"
9
- description="flexr lets parser authors write lexer specifications in ordinary Ruby, inspect matching decisions, and generate deterministic Ruby for deployment."
9
+ title="A lexer generator that speaks Ruby"
10
+ description="Define lexer rules in Ruby, understand every match, and generate deterministic Ruby with flexr."
10
11
  >
11
- <div class="home-shell">
12
- <header class="home-hero">
13
- <div>
14
- <div class="eyebrow">Ruby lexer tooling for parser authors</div>
15
- <h1>Write lexers in Ruby. See why each token wins.</h1>
16
- <p class="hero-copy">
17
- flexr lets you write a lexer specification as ordinary Ruby, run it while developing,
18
- inspect its matching behavior, and generate deterministic Ruby for deployment.
12
+ <main class="landing">
13
+ <section class="hero" aria-labelledby="hero-title">
14
+ <div class="hero-heading">
15
+ <p>Lexer generation, in Ruby</p>
16
+ <h1 id="hero-title">Write the rules.<br /><em>Know what wins.</em></h1>
17
+ </div>
18
+ <div class="hero-intro">
19
+ <p>
20
+ flexr keeps lexer specifications in the language they serve. Define readable rules,
21
+ inspect every decision, then generate deterministic Ruby for deployment.
19
22
  </p>
20
23
  <div class="hero-actions">
21
- <a class="button button-primary" href={`${base}playground/`}>Open the playground</a>
22
- <a class="button button-secondary" href={`${base}learn/getting-started/`}>Get started</a>
24
+ <a class="action action-primary" href={`${base}learn/getting-started/`}>Build your first lexer</a>
25
+ <a class="action action-link" href={`${base}playground/`}>Open the playground</a>
23
26
  </div>
24
27
  </div>
28
+ </section>
25
29
 
26
- <div class="demo-window" aria-label="Longest-match example">
27
- <div class="window-bar">
28
- <span class="window-dot"></span>
29
- <span class="window-dot"></span>
30
- <span class="window-dot"></span>
31
- <span>lexer.flexr.rb</span>
32
- </div>
33
- <pre class="code-block"><code><span class="code-keyword">class</span> Lexer &lt; Flexr::Lexer
34
- rule(<span class="code-string">/==/</span>) &#123; emit <span class="code-string">:EQ</span> &#125;
35
- rule(<span class="code-string">/=/</span>) &#123; emit <span class="code-string">:ASSIGN</span> &#125;
36
- rule(<span class="code-string">/if/</span>) &#123; emit <span class="code-string">:IF</span> &#125;
37
- rule(<span class="code-string">/[a-z_][a-z0-9_]*/</span>) &#123; emit <span class="code-string">:IDENT</span> &#125;
38
- <span class="code-keyword">end</span></code></pre>
39
- <div class="decision-panel">
40
- <div class="decision-label"><span>input: <strong>if == total</strong></span><span>step 02</span></div>
41
- <div class="decision-row winner"><strong>/==/ → EQ</strong><span>longest match · 2 chars</span></div>
42
- <div class="decision-row"><strong>/=/ → ASSIGN</strong><span>shorter match · 1 char</span></div>
43
- </div>
30
+ <section class="specimen" aria-labelledby="specimen-title">
31
+ <header>
32
+ <p>One input, four decisions</p>
33
+ <h2 id="specimen-title">A match you can read.</h2>
34
+ </header>
35
+ <div class="source-line">
36
+ <span>source</span>
37
+ <code>if total == 42</code>
44
38
  </div>
45
- </header>
39
+ <ol class="token-line" aria-label="Generated token stream">
40
+ <li><span>if</span><strong>IF</strong></li>
41
+ <li><span>total</span><strong>IDENT</strong></li>
42
+ <li class="token-accent"><span>==</span><strong>EQ</strong></li>
43
+ <li><span>42</span><strong>INTEGER</strong></li>
44
+ </ol>
45
+ <p class="decision"><code>/==/</code> wins over <code>/=/</code> because the longest match wins.</p>
46
+ </section>
46
47
 
47
- <main>
48
- <section class="home-section" aria-labelledby="why-heading">
49
- <div class="section-heading">
50
- <div>
51
- <div class="eyebrow">Why flexr</div>
52
- <h2>One specification, two useful ways to run it.</h2>
53
- </div>
54
- <p>
55
- Keep the feedback loop in Ruby. When the lexer is ready to ship, compile the same
56
- rules into a predictable artifact and keep the behavior easy to reason about.
57
- </p>
58
- </div>
59
- <div class="card-grid">
60
- <article class="site-card">
61
- <div class="card-index">01 / RUBY-NATIVE</div>
62
- <h3>Ordinary Ruby specifications</h3>
63
- <p>Use classes, constants, interpolation, and familiar Ruby actions without learning a separate lexer language.</p>
64
- </article>
65
- <article class="site-card">
66
- <div class="card-index">02 / DECISIONS</div>
67
- <h3>Matching you can explain</h3>
68
- <p>Longest match wins. If matches have the same length, the rule defined first wins. The contract stays visible.</p>
69
- </article>
70
- <article class="site-card">
71
- <div class="card-index">03 / PARITY</div>
72
- <h3>Runtime and generated parity</h3>
73
- <p>Develop with the runtime interpreter, then compare its token stream with generated Ruby before deployment.</p>
74
- </article>
75
- <article class="site-card">
76
- <div class="card-index">04 / DIAGNOSTICS</div>
77
- <h3>Actionable checks</h3>
78
- <p>Find unsupported regexp constructs, unreachable rules, undeclared tokens, and other problems before they reach a parser.</p>
79
- </article>
80
- </div>
81
- </section>
82
-
83
- <section class="home-section" aria-labelledby="workflow-heading">
84
- <div class="section-heading">
85
- <div>
86
- <div class="eyebrow">A practical workflow</div>
87
- <h2>Write. Inspect. Generate. Integrate.</h2>
88
- </div>
89
- </div>
90
- <div class="workflow-grid">
91
- <article class="workflow-step">
92
- <div class="card-index">01</div>
93
- <h3>Write</h3>
94
- <p>Define rules and actions in a Ruby class that looks like the code around it.</p>
95
- </article>
96
- <article class="workflow-step">
97
- <div class="card-index">02</div>
98
- <h3>Inspect</h3>
99
- <p>Check the specification and make a matching decision visible when rules compete.</p>
100
- </article>
101
- <article class="workflow-step">
102
- <div class="card-index">03</div>
103
- <h3>Generate</h3>
104
- <p>Produce deterministic Ruby for environments where startup and deployment shape matter.</p>
105
- </article>
106
- <article class="workflow-step">
107
- <div class="card-index">04</div>
108
- <h3>Integrate</h3>
109
- <p>Return tokens to Racc, Lrama, or your own parser protocol with explicit locations.</p>
110
- </article>
111
- </div>
112
- </section>
113
-
114
- <section class="home-section" aria-labelledby="modes-heading">
115
- <div class="section-heading">
116
- <div>
117
- <div class="eyebrow">Choose your mode</div>
118
- <h2>Fast feedback first. Reproducible output when it matters.</h2>
119
- </div>
120
- <p>Both modes consume the same lexer design. The choice is about the deployment boundary, not a second language.</p>
121
- </div>
122
- <div class="compare-panel" id="modes-heading">
123
- <div>
124
- <h3>Runtime mode</h3>
125
- <p>Load the specification directly with the <code>flexr</code> runtime. It is a strong fit for iteration, tests, and applications that value a compact source of truth.</p>
126
- <div class="home-links"><a class="button button-secondary" href={`${base}learn/runtime-mode/`}>Runtime guide</a></div>
127
- </div>
128
- <div>
129
- <h3>Generated mode</h3>
130
- <p>Compile the specification to Ruby and commit or build the generated artifact. Use standalone output when the deployed process should not load the gem at runtime.</p>
131
- <div class="home-links"><a class="button button-secondary" href={`${base}learn/generation/`}>Generation guide</a></div>
132
- </div>
133
- </div>
134
- </section>
48
+ <section class="principles" aria-labelledby="principles-title">
49
+ <header>
50
+ <p>Why flexr</p>
51
+ <h2 id="principles-title">One specification, from first test to release.</h2>
52
+ </header>
53
+ <div class="principle-list">
54
+ <article>
55
+ <h3>Ruby-native</h3>
56
+ <p>Use familiar classes, constants, and actions. There is no separate lexer language to learn.</p>
57
+ </article>
58
+ <article>
59
+ <h3>Explainable</h3>
60
+ <p>Longest match wins. Source order resolves ties. Unsupported patterns surface early.</p>
61
+ </article>
62
+ <article>
63
+ <h3>Ready both ways</h3>
64
+ <p><a href={`${base}learn/runtime-mode/`}>Runtime mode</a> keeps iteration quick. <a href={`${base}learn/generation/`}>Generated mode</a> keeps deployment reproducible.</p>
65
+ </article>
66
+ </div>
67
+ </section>
135
68
 
136
- <section class="home-section" aria-labelledby="trust-heading">
137
- <div class="section-heading">
138
- <div>
139
- <div class="eyebrow">Make the boundary explicit</div>
140
- <h2>Useful power, clear constraints.</h2>
141
- </div>
142
- <p>flexr is designed to be inspectable. Know what runs at build time, what remains Ruby code, and what the regexp compiler accepts.</p>
143
- </div>
144
- <div class="trust-grid">
145
- <article class="trust-panel">
146
- <div class="card-index">SECURITY</div>
147
- <h3>Actions are Ruby code</h3>
148
- <p>Only run specifications and generated artifacts you trust. Static checks do not make arbitrary actions safe.</p>
149
- </article>
150
- <article class="trust-panel">
151
- <div class="card-index">COMPATIBILITY</div>
152
- <h3>Regexp support is documented</h3>
153
- <p>Check the compatibility matrix before porting lookarounds, backreferences, or open-ended repetition.</p>
154
- </article>
155
- <article class="trust-panel">
156
- <div class="card-index">EXPERIMENTAL</div>
157
- <h3>Experimental features say so</h3>
158
- <p><code>firstmatch</code> is experimental because it changes the usual longest-match contract and needs an explicit option.</p>
159
- </article>
160
- <article class="trust-panel">
161
- <div class="card-index">OPEN SOURCE</div>
162
- <h3>Read the implementation</h3>
163
- <p>Inspect examples, diagnostics, generated output, and the benchmark log in the repository.</p>
164
- <div class="home-links"><a class="button button-secondary" href={repo}>View on GitHub</a></div>
165
- </article>
166
- </div>
167
- </section>
168
- </main>
69
+ <section class="start" aria-labelledby="start-title">
70
+ <div>
71
+ <p>Ready when you are</p>
72
+ <h2 id="start-title">Start with one Ruby file.</h2>
73
+ </div>
74
+ <code>gem install flexr</code>
75
+ <a class="action action-primary" href={`${base}learn/getting-started/`}>Read the quick start</a>
76
+ </section>
169
77
 
170
- <footer class="site-footer">
171
- <span class="site-mark">flexr</span> · Ruby-native lexer tooling · <a href={`${base}examples/`}>Examples</a> · <a href={`${base}reference/cli/`}>CLI reference</a> · <a href={repo}>Source</a>
78
+ <footer class="landing-footer">
79
+ <a class="footer-brand" href={base}>flexr/</a>
80
+ <nav aria-label="Footer navigation">
81
+ <a href={`${base}reference/dsl/`}>Reference</a>
82
+ <a href={`${base}examples/`}>Examples</a>
83
+ <a href={repo}>GitHub</a>
84
+ </nav>
85
+ <p>MIT licensed.</p>
172
86
  </footer>
173
- </div>
87
+ </main>
174
88
  </SiteLayout>
@@ -26,8 +26,8 @@
26
26
  --flexr-blue: #28658a;
27
27
  --flexr-red: #b54848;
28
28
  --flexr-code: #192a24;
29
- --sl-font: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
30
- --sl-font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
29
+ --sl-font: "Public Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
30
+ --sl-font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
31
31
  }
32
32
 
33
33
  html {
@@ -106,7 +106,6 @@ textarea {
106
106
  font-family: var(--sl-font-mono);
107
107
  font-size: 1rem;
108
108
  font-weight: 700;
109
- letter-spacing: -0.08em;
110
109
  text-decoration: none;
111
110
  }
112
111
 
@@ -164,12 +163,6 @@ textarea {
164
163
  transform: translateY(-1px);
165
164
  }
166
165
 
167
- .site-mark {
168
- font-family: var(--sl-font-mono);
169
- font-weight: 700;
170
- letter-spacing: -0.07em;
171
- }
172
-
173
166
  .eyebrow {
174
167
  color: var(--flexr-green);
175
168
  font-family: var(--sl-font-mono);
@@ -179,57 +172,6 @@ textarea {
179
172
  text-transform: uppercase;
180
173
  }
181
174
 
182
- .home-shell {
183
- overflow: hidden;
184
- background:
185
- linear-gradient(rgba(23, 39, 31, 0.035) 1px, transparent 1px),
186
- linear-gradient(90deg, rgba(23, 39, 31, 0.035) 1px, transparent 1px),
187
- var(--flexr-canvas);
188
- background-size: 4rem 4rem;
189
- }
190
-
191
- .home-hero,
192
- .home-section,
193
- .site-footer {
194
- width: min(1160px, calc(100% - 2.5rem));
195
- margin-inline: auto;
196
- }
197
-
198
- .home-hero {
199
- display: grid;
200
- grid-template-columns: minmax(0, 1.03fr) minmax(360px, 0.97fr);
201
- align-items: center;
202
- gap: 5.5rem;
203
- padding: 7.25rem 0 6.5rem;
204
- }
205
-
206
- .home-hero h1 {
207
- max-width: 10ch;
208
- margin: 1.1rem 0 1.4rem;
209
- color: var(--flexr-ink);
210
- font-family: var(--sl-font);
211
- font-size: clamp(3.1rem, 6vw, 5.5rem);
212
- font-weight: 600;
213
- line-height: 0.98;
214
- letter-spacing: -0.075em;
215
- }
216
-
217
- .hero-copy {
218
- max-width: 36rem;
219
- color: var(--flexr-muted);
220
- font-size: clamp(1.05rem, 1.7vw, 1.2rem);
221
- line-height: 1.72;
222
- }
223
-
224
- .hero-actions,
225
- .home-links {
226
- display: flex;
227
- flex-wrap: wrap;
228
- gap: 0.7rem;
229
- align-items: center;
230
- margin-top: 2rem;
231
- }
232
-
233
175
  .button {
234
176
  display: inline-flex;
235
177
  min-height: 2.85rem;
@@ -271,36 +213,6 @@ textarea {
271
213
  background: var(--flexr-paper);
272
214
  }
273
215
 
274
- .demo-window {
275
- overflow: hidden;
276
- border: 1px solid #2b4037;
277
- border-radius: 0.55rem;
278
- background: var(--flexr-code);
279
- box-shadow: 0 1.5rem 3rem rgba(23, 39, 31, 0.13);
280
- }
281
-
282
- .window-bar {
283
- display: flex;
284
- gap: 0.45rem;
285
- align-items: center;
286
- padding: 0.85rem 1rem;
287
- border-bottom: 1px solid rgba(216, 235, 225, 0.14);
288
- color: #94aaa0;
289
- font-family: var(--sl-font-mono);
290
- font-size: 0.68rem;
291
- }
292
-
293
- .window-dot {
294
- width: 0.5rem;
295
- height: 0.5rem;
296
- border-radius: 999px;
297
- background: #61746b;
298
- }
299
-
300
- .window-dot:first-child { background: #d38d7c; }
301
- .window-dot:nth-child(2) { background: #c5ad6e; }
302
- .window-dot:nth-child(3) { background: #69ad8e; }
303
-
304
216
  .code-block {
305
217
  margin: 0;
306
218
  padding: 1.35rem;
@@ -317,191 +229,6 @@ textarea {
317
229
  .code-method { color: #90cbd0; }
318
230
  .code-number { color: #dbc786; }
319
231
 
320
- .decision-panel {
321
- padding: 1rem 1.35rem 1.25rem;
322
- border-top: 1px solid rgba(216, 235, 225, 0.14);
323
- }
324
-
325
- .decision-label {
326
- display: flex;
327
- justify-content: space-between;
328
- margin-bottom: 0.7rem;
329
- color: #8fa89b;
330
- font-family: var(--sl-font-mono);
331
- font-size: 0.66rem;
332
- }
333
-
334
- .decision-label strong { color: #d8e9df; font-weight: 500; }
335
-
336
- .decision-row {
337
- display: grid;
338
- grid-template-columns: 1fr auto;
339
- gap: 1rem;
340
- padding: 0.58rem 0;
341
- border-top: 1px solid rgba(216, 235, 225, 0.11);
342
- font-family: var(--sl-font-mono);
343
- font-size: 0.7rem;
344
- }
345
-
346
- .decision-row strong { color: #d8e9df; font-weight: 500; }
347
- .decision-row span { color: #8fa89b; }
348
- .decision-row.winner strong { color: #9ed3b0; }
349
- .decision-row.winner span { color: #9ed3b0; }
350
-
351
- .home-section {
352
- padding: 6.25rem 0;
353
- border-top: 1px solid var(--flexr-line);
354
- }
355
-
356
- .section-heading {
357
- display: flex;
358
- justify-content: space-between;
359
- align-items: end;
360
- gap: 3rem;
361
- margin-bottom: 2.7rem;
362
- }
363
-
364
- .section-heading h2 {
365
- max-width: 16ch;
366
- margin: 0.7rem 0 0;
367
- color: var(--flexr-ink);
368
- font-family: var(--sl-font);
369
- font-size: clamp(2rem, 4vw, 3.2rem);
370
- font-weight: 600;
371
- line-height: 1.05;
372
- letter-spacing: -0.065em;
373
- }
374
-
375
- .section-heading p {
376
- max-width: 31rem;
377
- margin: 0;
378
- color: var(--flexr-muted);
379
- font-size: 0.98rem;
380
- line-height: 1.75;
381
- }
382
-
383
- .card-grid {
384
- display: grid;
385
- grid-template-columns: repeat(2, minmax(0, 1fr));
386
- gap: 0;
387
- border-top: 1px solid var(--flexr-line-strong);
388
- border-left: 1px solid var(--flexr-line-strong);
389
- }
390
-
391
- .site-card {
392
- min-height: 10rem;
393
- padding: 1.5rem 1.6rem;
394
- border-right: 1px solid var(--flexr-line-strong);
395
- border-bottom: 1px solid var(--flexr-line-strong);
396
- background: rgba(255, 255, 255, 0.48);
397
- }
398
-
399
- .site-card:hover {
400
- background: rgba(255, 255, 255, 0.88);
401
- }
402
-
403
- .site-card h3,
404
- .workflow-step h3,
405
- .trust-panel h3 {
406
- margin: 0.8rem 0 0.55rem;
407
- color: var(--flexr-ink);
408
- font-size: 1rem;
409
- font-weight: 600;
410
- letter-spacing: -0.02em;
411
- }
412
-
413
- .site-card p,
414
- .workflow-step p,
415
- .trust-panel p {
416
- max-width: 31rem;
417
- margin: 0;
418
- color: var(--flexr-muted);
419
- font-size: 0.9rem;
420
- line-height: 1.7;
421
- }
422
-
423
- .card-index {
424
- color: var(--flexr-green);
425
- font-family: var(--sl-font-mono);
426
- font-size: 0.65rem;
427
- font-weight: 700;
428
- letter-spacing: 0.08em;
429
- }
430
-
431
- .workflow-grid {
432
- display: grid;
433
- grid-template-columns: repeat(4, minmax(0, 1fr));
434
- gap: 1.25rem;
435
- }
436
-
437
- .workflow-step {
438
- padding-top: 1.1rem;
439
- border-top: 2px solid var(--flexr-line-strong);
440
- }
441
-
442
- .workflow-step:first-child { border-color: var(--flexr-green); }
443
- .workflow-step h3 { font-family: var(--sl-font-mono); font-size: 0.82rem; }
444
-
445
- .compare-panel {
446
- display: grid;
447
- grid-template-columns: 1fr 1fr;
448
- gap: 1px;
449
- overflow: hidden;
450
- border: 1px solid var(--flexr-line-strong);
451
- background: var(--flexr-line-strong);
452
- }
453
-
454
- .compare-panel > div {
455
- min-height: 12rem;
456
- padding: 1.7rem;
457
- background: rgba(255, 255, 255, 0.72);
458
- }
459
-
460
- .compare-panel h3 {
461
- margin: 0 0 1rem;
462
- color: var(--flexr-green-dark);
463
- font-family: var(--sl-font-mono);
464
- font-size: 0.78rem;
465
- }
466
-
467
- .compare-panel p {
468
- max-width: 30rem;
469
- margin: 0;
470
- color: var(--flexr-muted);
471
- line-height: 1.75;
472
- }
473
-
474
- .compare-panel code {
475
- padding: 0.12rem 0.3rem;
476
- color: var(--flexr-green-dark);
477
- background: var(--flexr-green-soft);
478
- font-family: var(--sl-font-mono);
479
- font-size: 0.8em;
480
- }
481
-
482
- .trust-grid {
483
- display: grid;
484
- grid-template-columns: repeat(4, minmax(0, 1fr));
485
- gap: 2rem;
486
- }
487
-
488
- .trust-panel {
489
- padding-top: 1.15rem;
490
- border-top: 1px solid var(--flexr-line-strong);
491
- }
492
-
493
- .trust-panel h3 { font-size: 0.95rem; }
494
- .trust-panel .home-links { margin-top: 1.1rem; }
495
-
496
- .site-footer {
497
- padding: 2rem 0 4rem;
498
- border-top: 1px solid var(--flexr-line);
499
- color: var(--flexr-muted);
500
- font-size: 0.82rem;
501
- }
502
-
503
- .site-footer a { color: var(--flexr-green); }
504
-
505
232
  .playground-shell {
506
233
  min-height: calc(100vh - 4.25rem);
507
234
  padding: 4.5rem max(1.25rem, calc((100vw - 1160px) / 2)) 6rem;
@@ -680,21 +407,11 @@ textarea {
680
407
  background: var(--flexr-green-soft);
681
408
  }
682
409
 
683
- @media (max-width: 920px) {
684
- .home-hero { grid-template-columns: 1fr; gap: 3rem; padding-top: 5.5rem; }
685
- .home-hero h1 { max-width: 12ch; }
686
- .workflow-grid, .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
687
- }
688
-
689
410
  @media (max-width: 700px) {
690
411
  .site-nav-links { display: none; }
691
- .site-nav-inner, .home-hero, .home-section, .site-footer { width: min(100% - 1.5rem, 1160px); }
412
+ .site-nav-inner { width: min(100% - 1.5rem, 1160px); }
692
413
  .site-nav-inner { min-height: 3.9rem; }
693
- .home-hero { padding: 4rem 0 4.5rem; }
694
- .home-section { padding: 4.5rem 0; }
695
- .section-heading { display: block; }
696
- .section-heading p { margin-top: 1rem; }
697
- .card-grid, .workflow-grid, .trust-grid, .compare-panel, .workbench { grid-template-columns: 1fr; }
414
+ .workbench { grid-template-columns: 1fr; }
698
415
  .workbench-panel.full { grid-column: auto; }
699
416
  .playground-shell { padding: 3rem 0.75rem 4rem; }
700
417
  }