Repository navigation
Expand file tree
/
Copy pathstyle.css
More file actions
1108 lines (1031 loc) · 52.5 KB
/
Copy pathstyle.css
File metadata and controls
1108 lines (1031 loc) · 52.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright (c) 2026, MariaDB plc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2.0,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License, version 2.0, for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/* ==========================================================================
MariaDB AI Plugins — DevHub
Design tokens and components. Light + dark, no build step, no framework.
========================================================================== */
/* --- Tokens: light --------------------------------------------------------
The palette is mariadb.org's (its twentytwentyfive-child theme): background
#F7F8F0, primary #355872 (text, links, the header), secondary #7AAACE,
tertiary #9CD5FF, accent #964A2C (hovers, the outline button), its
--mariadb-card-bg (8% tertiary over the background) for surfaces, its
--mariadb-note-bg (40% tertiary) for callouts and its hero's #F08A5D
button. The rest are ours, mixed from those and marked where they are not
obvious; every text colour keeps 4.5:1 on the background and the cards.
The spacing, radius, transition and code scales are unchanged.
-------------------------------------------------------------------------- */
:root {
--ch-primary: #355872;
--ch-primary-hover: #964A2C;
--ch-primary-light: #7AAACE;
--ch-bg: #F7F8F0;
--ch-bg-surface: #f0f5f1;
--ch-bg-elevated: #f0f5f1;
--ch-callout-bg: #d3eaf6;
--ch-callout-bar: #4A718E;
--ch-feedback-bg: #f0f5f1;
/* Ours: mariadb.org's footer rule, 40% secondary over the background. */
--ch-border: #c5d9e2;
--ch-highlight-bg: #e5f1f3;
--ch-highlight-border: #b9d1df;
--ch-highlight-link: #355872;
--ch-on-primary: #F7F8F0;
/* The "action" colour: the prompt block's label and the outline button —
mariadb.org's accent, and its 18%-black hover. */
--ch-brand-action: #964A2C;
--ch-brand-action-hover: #7b3d24;
--ch-on-action: #F7F8F0;
--ch-accent-btn: var(--ch-brand-action);
--ch-accent-btn-hover: var(--ch-brand-action-hover);
--ch-action-outline: var(--ch-brand-action);
--ch-action-outline-text: var(--ch-brand-action);
/* mariadb.org's hero "Download" button: #F08A5D under a #1B3C53 label and
border. Its #E8794A hover leaves the label at 4.0:1, so ours lightens
instead (5.6:1). */
--ch-btn-fill: #F08A5D;
--ch-btn-fill-hover: #F5A07B;
--ch-btn-text: #1B3C53;
--ch-btn-focus-rgb: 240, 138, 93;
--ch-text: #355872;
--ch-text-heading: #1B3C53;
--ch-text-muted: #527085;
--ch-text-faint: #547286;
--ch-amber: #c9a227;
--ch-amber-ink: #8c6c08;
--ch-red: #c0392b;
--ch-orange: #964A2C;
--ch-yellow: #916b0c;
--ch-green: #4f6b12;
--ch-aqua: #287f5e;
--ch-blue: #355872;
--ch-purple: #6b4f96;
--ch-footer-link: var(--ch-primary);
--ch-footer-link-hover: var(--ch-primary-hover);
--ch-footer-text: var(--ch-text);
--ch-spacing-xs: clamp(.5rem, .4rem + .3vw, 1rem);
--ch-spacing-sm: clamp(1rem, .8rem + .5vw, 1.5rem);
--ch-spacing-md: clamp(1.5rem, 1.2rem + .8vw, 2rem);
--ch-spacing-lg: clamp(2rem, 1.5rem + 1.5vw, 3rem);
--ch-spacing-xl: clamp(3rem, 2.5rem + 1.5vw, 4rem);
--ch-spacing-2xl: clamp(4rem, 3rem + 2vw, 5rem);
--ch-section-sm: clamp(3rem, 2.5rem + 2vw, 5rem);
/* Tightened from the reference's clamp(5rem, 4rem + 3vw, 7rem): the sections
here carry less per-section content, so that much air read as drift. Kept
above --ch-section-sm at every width so the scale stays in order. */
--ch-section-md: clamp(3.5rem, 2.8rem + 2.2vw, 5rem);
--ch-section-lg: clamp(7rem, 6rem + 4vw, 10rem);
--ch-radius-sm: .5rem;
--ch-radius-md: .75rem;
--ch-radius-lg: 1rem;
--ch-radius-xl: 1.5rem;
--ch-radius-full: 9999px;
/* mariadb.org's --mariadb-card-shadow-color, rgba(27, 60, 83, .18), at three depths. */
--ch-shadow-sm: 0 1px 3px rgba(27, 60, 83, .08);
--ch-shadow-md: 0 4px 12px rgba(27, 60, 83, .12);
--ch-shadow-lg: 0 4px 14px rgba(27, 60, 83, .18);
--ch-transition-fast: .15s ease;
--ch-transition-normal: .25s ease;
/* The hero is mariadb.org's: a 135deg gradient from primary to secondary.
Its own hero centres a headline; ours sets a paragraph on the left, where
the light end would drop the text to 2.3:1, so a scrim darkens the left
and keeps it above 4.5:1. The CTA band is mariadb.org's "Get involved"
band, a flat primary. */
--ch-hero-base: #355872;
--ch-hero-gradient: linear-gradient(135deg, #355872 0%, #7AAACE 100%);
--ch-hero-scrim: linear-gradient(90deg, rgba(27, 60, 83, .6) 0%, rgba(27, 60, 83, .35) 55%, rgba(27, 60, 83, 0) 100%);
--ch-hero-text: #F7F8F0;
--ch-hero-muted: #eef2ea;
--ch-hero-accent: #F7F8F0;
--ch-hero-badge-bg: rgba(27, 60, 83, .35);
--ch-hero-badge-border: rgba(247, 248, 240, .45);
/* Ours: the headline's accent line, tertiary into the dark theme's cream. */
--ch-hero-text-gradient: linear-gradient(90deg, #9CD5FF 0%, #F3E9DD 100%);
--ch-cta-bg: #355872;
--ch-cta-text: #F7F8F0;
--ch-cta-muted: #eef2ea;
--ch-bg-dim: #eceee3;
/* Ours: code. The reference renders code BLOCKS with the One Dark prism
theme in both site themes, so --ch-code-* is identical in the dark block.
Inline code is a separate, light treatment there (--ifm-code-background). */
--ch-code-bg: hsl(220, 13%, 18%);
--ch-code-text: hsl(220, 14%, 71%);
--ch-code-border: hsl(220, 13%, 26%);
--ch-inline-code-bg: #f0f5f1;
--ch-inline-code-border: rgba(53, 88, 114, .15);
/* Ours: layout constants the reference has no token for. */
--ch-wave-h: clamp(48px, 5vw, 80px);
/* The sticky header's height: 108px while the menu sits under the logo. */
--ch-navbar-h: 88px;
--ch-header-bg: var(--ch-bg);
--ch-header-link: var(--ch-primary);
--ch-header-link-hover: var(--ch-primary-hover);
/* mariadb.org's theme switch: the track is its secondary, the thumb its background. */
--ch-toggle-track: #7AAACE;
--ch-maxw: 1200px;
}
/* --- Tokens: dark ---------------------------------------------------------
mariadb.org's own dark theme (its dark-mode.css): background #1B3C53,
primary #F3E9DD, secondary #D2C1B6, tertiary #456882, accent #D08C72, the
card background (40% tertiary) and its #2B5470 band, and its hero's radial
glow. The accent is a hover colour only here: as a fill it would leave a
#1B3C53 label at 4.2:1, so filled accent buttons take a deeper navy.
-------------------------------------------------------------------------- */
html[data-theme="dark"] {
--ch-primary: #F3E9DD;
--ch-primary-hover: #D08C72;
--ch-primary-light: #D2C1B6;
--ch-on-primary: #1B3C53;
--ch-brand-action: #D08C72;
--ch-brand-action-hover: #dca38c;
--ch-on-action: #102331;
--ch-accent-btn: var(--ch-brand-action);
--ch-accent-btn-hover: var(--ch-brand-action-hover);
--ch-action-outline: #D2C1B6;
--ch-action-outline-text: #F3E9DD;
--ch-bg: #1B3C53;
--ch-bg-dim: #163246;
--ch-bg-surface: #2c4e66;
--ch-bg-elevated: #2c4e66;
--ch-callout-bg: #2B5470;
--ch-callout-bar: #9CD5FF;
--ch-feedback-bg: #2c4e66;
--ch-border: #456882;
--ch-highlight-bg: #2B5470;
--ch-highlight-border: #456882;
--ch-highlight-link: #F3E9DD;
--ch-text: #F3E9DD;
--ch-text-heading: #F3E9DD;
--ch-text-muted: #d3cfc8;
--ch-text-faint: #bfbfbc;
--ch-red: #e98e90;
--ch-orange: #D08C72;
--ch-yellow: #dbbc7f;
--ch-amber-ink: #d9b860;
--ch-green: #a7c080;
--ch-aqua: #83c092;
--ch-blue: #9CD5FF;
--ch-purple: #c0a8d6;
--ch-hero-base: #1B3C53;
--ch-hero-gradient: radial-gradient(ellipse 70% 90% at 50% 45%, #3D6684 0%, #2B5470 45%, #1B3C53 100%);
--ch-hero-scrim: linear-gradient(transparent, transparent);
--ch-hero-text: #F3E9DD;
--ch-hero-muted: #e6ddd2;
--ch-hero-accent: #F3E9DD;
--ch-hero-badge-bg: rgba(27, 60, 83, .55);
--ch-hero-badge-border: rgba(210, 193, 182, .45);
--ch-cta-bg: #456882;
--ch-cta-text: #F3E9DD;
--ch-cta-muted: #F3E9DD;
--ch-toggle-track: #D2C1B6;
--ch-shadow-sm: 0 1px 3px rgba(0, 0, 0, .25);
--ch-shadow-md: 0 4px 12px rgba(0, 0, 0, .3);
/* mariadb.org's dark card shadow: an accent glow. */
--ch-shadow-lg: 0 4px 14px rgba(208, 140, 114, .35);
/* Ours: inline code only — the code blocks stay One Dark in both themes. */
--ch-inline-code-bg: rgba(243, 233, 221, .08);
--ch-inline-code-border: rgba(243, 233, 221, .14);
}
/* --- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
margin: 0;
background: var(--ch-bg);
color: var(--ch-text);
font-family: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu,
Cantarell, "Noto Sans", Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 1.7;
/* mariadb.org's body tracking, inherited by everything set in Manrope. */
letter-spacing: -0.1px;
}
/* Monospace keeps its own grid: aligned output must not drift. */
code, pre, kbd, samp { letter-spacing: normal; }
h1, h2, h3, h4 { color: var(--ch-text-heading); line-height: 1.25; font-weight: 700; }
a { color: var(--ch-primary); text-decoration: none; }
a:hover { color: var(--ch-primary-hover); text-decoration: underline; }
img, svg { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--ch-border); margin: 2rem 0; }
/* The `hidden` attribute has to win. Its `display: none` comes from the UA
stylesheet, which ANY author rule outranks — so `.card { display: flex }`
quietly beat `card.hidden = true` and the tutorial filters did nothing. */
[hidden] { display: none !important; }
.container { max-width: var(--ch-maxw); margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: 860px; }
/* A reading column that stays flush with the wide sections above and below it. */
.prose--narrow { max-width: 860px; }
.section { padding: var(--ch-section-md) 0; }
.section--sm { padding: var(--ch-section-sm) 0; }
/* The home page's first section sits right under the hero wave, whose light
lower half already reads as top padding — so take half the wave back. */
.section--after-wave { padding-top: max(1rem, calc(var(--ch-section-md) - var(--ch-wave-h) / 2)); }
.section--surface { background: var(--ch-bg-surface); }
.skip-link {
position: absolute; left: -9999px; top: 0; z-index: 100;
background: var(--ch-primary); color: var(--ch-on-primary); padding: .6rem 1rem;
}
.skip-link:focus { left: 0; }
/* --- Header --------------------------------------------------------------
mariadb.org's header (twentytwentyfive-child): the page background, primary
links that turn accent on hover, its light and dark logos, GitHub icon and
theme switch, and its menu drawer. Kept to the height of the header it
replaced, so our menu sits beside the logo where mariadb.org has its search
field, in one 88px row. Where the menu no longer fits beside the logo, the
logo shrinks to mariadb.org's narrow 150px and the whole menu moves under
it, still one line and left-aligned, in a 108px header; at 599px and below,
where that line does not fit either, mariadb.org's menu button takes its
place beside the logo.
-------------------------------------------------------------------------- */
.masthead {
position: sticky; top: 0; z-index: 50;
background: var(--ch-header-bg);
/* A hairline under it that adds no height: the header stays 88px. */
box-shadow: 0 1px 0 var(--ch-border);
}
.masthead__bar {
display: flex; align-items: center; gap: 2rem;
height: 88px; max-width: 1400px; margin: 0 auto; padding: 0 1.5rem;
}
.masthead__logo { display: block; flex: none; line-height: 0; }
.masthead__logo img { width: 200px; height: auto; }
.masthead__logo-dark { display: none; }
html[data-theme="dark"] .masthead__logo-light { display: none; }
html[data-theme="dark"] .masthead__logo-dark { display: block; }
.masthead__nav { flex: 1 1 auto; min-width: 0; }
/* One line, never wrapped; mariadb.org's 19.2px between its menu links. */
.masthead__nav ul {
display: flex; flex-wrap: nowrap; gap: 1.2rem; margin: 0; padding: 0; list-style: none;
}
.masthead__nav li { line-height: 1.4; }
.masthead__nav a {
color: var(--ch-header-link); font-size: 18px; font-weight: 400; white-space: nowrap;
}
.masthead__nav a:hover { color: var(--ch-header-link-hover); text-decoration: none; }
.masthead__nav a[aria-current="page"] {
text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.masthead__actions { display: flex; align-items: center; gap: 1.25rem; flex: none; margin-left: auto; }
.masthead__icon { display: inline-flex; color: var(--ch-header-link); }
.masthead__icon:hover { color: var(--ch-header-link-hover); }
.masthead__icon svg { width: 22px; height: 22px; }
/* mariadb.org's switch: a 40x22 track, an 18px thumb that carries the sun, and
moves right and shows the moon in dark mode. */
.theme-toggle { display: inline-flex; padding: 0; border: 0; background: none; cursor: pointer; color: var(--ch-primary); }
.theme-toggle__track {
position: relative; display: inline-block; width: 40px; height: 22px;
border-radius: 999px; background: var(--ch-toggle-track); transition: background .2s ease;
}
.theme-toggle__thumb {
position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
display: flex; align-items: center; justify-content: center;
background: var(--ch-bg); color: var(--ch-primary); transition: transform .2s ease;
}
.theme-toggle__thumb svg { width: 12px; height: 12px; }
.theme-toggle__moon { display: none; }
html[data-theme="dark"] .theme-toggle__thumb { transform: translateX(18px); }
html[data-theme="dark"] .theme-toggle__sun { display: none; }
html[data-theme="dark"] .theme-toggle__moon { display: block; }
.theme-toggle:focus-visible { outline: 2px solid var(--ch-primary-hover); outline-offset: 3px; border-radius: 999px; }
/* mariadb.org's menu button, beside the logo, at 599px and below only. */
.masthead__menu-button {
display: none; align-items: center; flex: none; padding: .25rem; margin-left: -.75rem;
border: 0; background: transparent; color: var(--ch-primary); cursor: pointer;
}
.masthead__menu-button:hover { color: var(--ch-primary-hover); }
.masthead__menu-button svg { width: 24px; height: 24px; }
/* mariadb.org's drawer: the page dimmed behind a panel that slides in from the left. */
.menu-drawer { position: fixed; inset: 0; z-index: 800; display: flex; background: rgba(0, 0, 0, .5); }
.menu-drawer__panel {
position: relative; box-sizing: border-box; min-width: 16rem; max-width: 85vw; height: 100%;
overflow-y: auto; overscroll-behavior: contain; padding: 3.5rem 1.5rem 2rem;
background: var(--ch-bg); border-right: 1px solid var(--ch-primary-light);
box-shadow: 4px 0 24px rgba(0, 0, 0, .35); animation: menu-drawer-in .2s ease-out;
}
@keyframes menu-drawer-in { from { transform: translateX(-100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .menu-drawer__panel { animation: none; } }
.menu-drawer__close {
position: absolute; top: 1rem; right: 1rem; display: inline-flex; padding: .25rem;
border: 0; background: transparent; color: var(--ch-primary); cursor: pointer;
}
.menu-drawer__close:hover { color: var(--ch-primary-hover); }
.menu-drawer__close svg { width: 24px; height: 24px; }
.menu-drawer__list { margin: 0; padding: 0; list-style: none; }
.menu-drawer__list li { margin: 0 0 .9rem; }
.menu-drawer__list a { color: var(--ch-primary); font-size: 20px; font-weight: 500; }
.menu-drawer__list a:hover { color: var(--ch-primary-hover); text-decoration: none; }
.menu-drawer__list a[aria-current="page"] {
text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
}
/* The drawer is the narrow layout's alone; a wide window never shows it. */
@media (min-width: 600px) { .menu-drawer { display: none !important; } }
body.menu-open { overflow: hidden; }
/* The menu under the logo: a two-row grid, 108px tall. */
@media only screen and (min-width: 600px) and (max-width: 939px) {
:root { --ch-navbar-h: 108px; }
.masthead__bar {
display: grid; grid-template-columns: auto 1fr auto;
grid-template-areas: "logo . actions" "nav nav nav";
align-content: center; row-gap: 6px; height: 108px;
}
.masthead__logo { grid-area: logo; }
.masthead__logo img { width: 150px; }
.masthead__actions { grid-area: actions; }
.masthead__nav { grid-area: nav; }
}
@media only screen and (max-width: 599px) {
.masthead__nav { display: none; }
.masthead__menu-button { display: inline-flex; }
}
@media only screen and (max-width: 520px) {
.masthead__bar { gap: 1rem; padding: 0 1rem; }
.masthead__logo img { width: 150px; }
.masthead__menu-button { margin-left: -.5rem; }
.masthead__actions { gap: 1rem; }
}
/* --- Hero ---------------------------------------------------------------- */
.hero { position: relative; padding: var(--ch-section-sm) 0 0; }
/* mariadb.org's hero gradient, pinned to all four edges. It runs on under the
wave, which is why the bottom inset is negative — but stops 2px short of the
wave's bottom edge: --ch-wave-h is a fractional pixel height (5vw), and when
both edges land on the same fractional pixel its anti-aliasing lets the
gradient bleed through as a hairline below the wave on the light page. The
scrim is a second layer on top of it, so the two can never drift apart. */
.hero__bg {
position: absolute; inset: 0 0 calc(2px - var(--ch-wave-h)); z-index: 0;
background-color: var(--ch-hero-base);
background-image: var(--ch-hero-scrim), var(--ch-hero-gradient);
background-size: cover, cover;
background-repeat: no-repeat;
}
.hero__inner {
position: relative; z-index: 2; max-width: var(--ch-maxw); margin: 0 auto;
padding: 0 1.5rem var(--ch-spacing-lg);
}
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero__grid > * { min-width: 0; }
.hero__title {
color: var(--ch-hero-text); margin: 0 0 1.25rem;
font-size: clamp(1.65rem, 1.2rem + 1.8vw, 2.4rem); line-height: 1.2;
}
/* Paints the headline's last line in the hero's lightest hues. Guarded: without background-clip support the transparent fill leaves the text
invisible rather than merely flat, which is a much worse failure. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
.text-hero-gradient {
display: inline-block;
background-image: var(--ch-hero-text-gradient);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
}
}
.hero__sub { color: var(--ch-hero-muted); font-size: .98rem; line-height: 1.75;
max-width: 660px; margin: 0 0 1.75rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; }
.hero__badges { display: flex; flex-wrap: wrap; gap: .5rem; }
.hero__version {
margin-top: .9rem; font-size: .8rem; color: var(--ch-hero-muted);
display: flex; flex-wrap: wrap; gap: .4rem;
}
.hero__version a {
color: var(--ch-hero-accent); font-weight: 600;
text-decoration: underline; text-underline-offset: 3px;
text-decoration-color: var(--ch-hero-badge-border);
}
.hero__version a:hover { text-decoration-color: currentColor; }
.hero__badge {
display: inline-flex; align-items: center; gap: .35rem;
border-radius: var(--ch-radius-full); padding: .2rem .7rem;
font-size: .75rem; font-weight: 600;
color: var(--ch-hero-accent);
border: 1px solid var(--ch-hero-badge-border);
background: var(--ch-hero-badge-bg);
backdrop-filter: blur(4px);
}
/* The hero card: a dark panel with a lit gradient edge, dark in both themes
because it always sits on the dark hero. Every colour is a local custom
property so the whole treatment retunes from this one block. */
.hero__card {
/* mariadb.org's tertiary and secondary into its cream and its hero button's orange. */
--card-edge: linear-gradient(125deg, #9CD5FF 0%, #7AAACE 38%, #F3E9DD 68%, #F08A5D 100%);
--card-bg: #1B3C53;
--card-line: rgba(255, 255, 255, .09);
/* The panels sit darker than the card, not lighter, so they read as insets. */
--card-fill: rgba(12, 30, 43, .58);
--card-inset: rgba(12, 30, 43, .46);
position: relative;
padding: 1.15rem 1.1rem 1.35rem;
border: 3px solid transparent;
border-radius: 1.7rem;
/* Two backgrounds: the fill clipped to the padding box, the gradient to the
border box. That paints a gradient border with no extra element — and the
fill must stay opaque or the bloom below shows through the middle. */
background:
linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
var(--card-edge) border-box;
box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}
/* The outer bloom. Same gradient, blurred, behind the card — so only the part
that spills past the edge is visible. */
.hero__card::before {
content: ""; position: absolute; inset: -3px; z-index: -1;
border-radius: inherit;
background: var(--card-edge);
filter: blur(22px);
opacity: .75;
}
/* The inner bloom: the same gradient bleeding in from the edges, so the card is
lit blue on the left and orange on the right with a dark middle.
The mask does two jobs — it fades the glow out towards the centre, and
(being no-repeat and exactly box-sized) it clips the blur that would
otherwise spill back outside the card. Gated on mask support, because an
unmasked blurred gradient would wash the whole card out. */
@supports (mask: radial-gradient(#000, #000)) or (-webkit-mask: radial-gradient(#000, #000)) {
.hero__card::after {
content: ""; position: absolute; inset: 0; z-index: 0;
border-radius: inherit;
background: var(--card-edge);
filter: blur(36px);
opacity: .55;
pointer-events: none;
-webkit-mask: radial-gradient(100% 100% at 50% 50%, transparent 45%, #000 95%) no-repeat center / 100% 100%;
mask: radial-gradient(100% 100% at 50% 50%, transparent 45%, #000 95%) no-repeat center / 100% 100%;
}
}
/* The panels are unpositioned, so they would paint under ::after without this.
The panel is also the query container for the inset below. Containing it here
is safe — it already establishes a stacking context and holds nothing
absolutely positioned. The CARD must not be the container: layout containment
would make it a stacking context and its ::before bloom, which sits at
z-index -1 deliberately BEHIND the card, would start painting over it. */
.hero-panel { position: relative; z-index: 1; container-type: inline-size; }
.hero-panel + .hero-panel { margin-top: 1.35rem; }
.hero-panel__label {
display: flex; align-items: center; justify-content: space-between; gap: .75rem;
background: var(--card-fill);
border: 1px solid var(--card-line);
border-radius: .7rem;
padding: .78rem 1.05rem;
color: #fff; font-size: .78rem; font-weight: 700;
letter-spacing: .08em; text-transform: uppercase;
}
.hero-panel__check { width: 18px; height: 18px; color: rgba(255, 255, 255, 0.9); flex-shrink: 0; }
/* Inset from the label bar, as in the reference. The horizontal scroll lives on
the <pre> rather than here, so that this box stays still and can carry the
cut-off marker below; an overlay inside a scroll container scrolls away with
the content. */
.hero-panel__body {
position: relative;
margin: .9rem 1.5rem 0;
background: var(--card-inset);
border: 1px solid var(--card-line);
border-radius: .7rem;
padding: .95rem 1.1rem;
}
.hero-code {
margin: 0; padding: 0; border: 0; background: none;
font-size: .78rem; line-height: 1.9;
color: rgba(255, 255, 255, .84);
overflow-x: auto;
}
/* The samples are wider than the panel on a phone, and again in the two-column
hero — they scroll, but nothing says so. While there is more to the right the
code fades out at the edge and a … sits in the margin beside it; both go once
the reader reaches the end. site.js adds .is-clipped and keeps it current. It
is an enhancement only: with JS off the code still scrolls, unmarked.
The fade is a mask rather than a gradient in the panel's background colour,
which would have to re-state that colour and would drift from it. */
.hero-panel__body.is-clipped .hero-code {
-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent);
mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent);
}
.hero-panel__body.is-clipped::after {
content: "…";
position: absolute;
top: 0; bottom: 0; right: .3rem;
display: flex; align-items: center;
color: rgba(255, 255, 255, .62);
font-size: 1rem; line-height: 1;
pointer-events: none;
}
/* The One Dark hues the rest of the site's code blocks use, under names local
to the card so this markup needs no Rouge classes. */
.hero-code .t-fn { color: hsl(207, 82%, 66%); }
.hero-code .t-num { color: hsl(29, 54%, 61%); }
.hero-code .t-str { color: hsl(95, 38%, 62%); }
.hero-code .t-dim { color: rgba(255, 255, 255, .42); }
@media (max-width: 560px) {
.hero__card { padding: .9rem .85rem 1.05rem; border-radius: 1.2rem; }
.hero-panel__body { margin: .8rem .6rem 0; padding: .8rem .9rem; }
}
/* The inset is decorative, and the panel runs out of width in TWO places: on a
phone, and again from 901px up, where the hero splits into two columns and
the card drops to roughly 400px — narrower than it is on a 768px tablet. In
both the code sample is wider than the panel, so the inset is spending width
the code needs; below 480px of panel it gives that width back.
This has to be a container query: panel width is not monotonic in viewport
width (679px at a 768px viewport, then 361px at 901px), so no media query can
name the cases. Browsers without container query support simply keep the
inset and the horizontal scroll, which is today's behaviour. */
@container (max-width: 480px) {
.hero-panel__body { margin-inline: 0; }
}
.hero__caption { color: var(--ch-hero-muted); font-size: .8rem; margin: .85rem 0 0; line-height: 1.6; }
.hero--page { padding-bottom: 0; }
.hero--page .hero__title { margin-bottom: .75rem; }
@media (max-width: 900px) {
.hero__grid { grid-template-columns: 1fr; gap: 2rem; }
}
/* The wave that carries the hero into the page body. */
.divider { display: block; width: 100%; line-height: 0; position: relative; z-index: 2; }
.divider svg { display: block; width: 100%; height: var(--ch-wave-h); }
/* --- Buttons ------------------------------------------------------------- */
.btn {
display: inline-flex; align-items: center; gap: .4rem;
border-radius: var(--ch-radius-sm); padding: .55rem 1.25rem;
font-size: .88rem; font-weight: 600; font-family: inherit;
border: none; cursor: pointer; text-decoration: none;
transition: background var(--ch-transition-fast), color var(--ch-transition-fast), transform .1s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; }
/* mariadb.org's hero "Download" button: an orange fill, a navy label and
border, and its card shadow. */
.btn--primary {
color: var(--ch-btn-text);
background: var(--ch-btn-fill);
border: 1px solid var(--ch-btn-text);
box-shadow: var(--ch-shadow-lg);
}
.btn--primary:hover,
.btn--primary:focus-visible,
.btn--primary:active { color: var(--ch-btn-text); background: var(--ch-btn-fill-hover); }
.btn--primary:focus-visible {
outline: 0;
box-shadow: 0 0 0 .25rem rgba(var(--ch-btn-focus-rgb), .5);
}
.btn--primary:active { box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); }
.btn--outline {
background: transparent; color: var(--ch-action-outline-text);
border: 1.5px solid var(--ch-action-outline);
}
.btn--outline:hover { background: var(--ch-accent-btn); border-color: var(--ch-accent-btn); color: var(--ch-on-action); }
.btn--ghost {
background: transparent; color: var(--ch-hero-accent);
border: 1.5px solid var(--ch-hero-badge-border);
}
.btn--ghost:hover { background: rgba(247, 248, 240, .12); color: var(--ch-hero-text); }
.btn--secondary {
background: transparent; color: var(--ch-primary); border: 2px solid var(--ch-primary);
}
.btn--secondary:hover { background: var(--ch-primary); color: var(--ch-on-primary); }
/* --- Section headings ---------------------------------------------------- */
.section-head { margin-bottom: var(--ch-spacing-md); }
.section-icon {
display: inline-flex; align-items: center; justify-content: center;
width: 2.5rem; height: 2.5rem; margin-bottom: .9rem;
border-radius: var(--ch-radius-md);
background: color-mix(in srgb, var(--ch-primary) 12%, transparent);
color: var(--ch-primary);
}
.section-icon svg { width: 1.4rem; height: 1.4rem; }
.section-title { font-size: 1.55rem; margin: 0 0 .75rem; }
.section-sub { color: var(--ch-text-muted); font-size: .95rem; max-width: 760px; margin: 0; }
/* --- Step progress + step cards (Getting Started) ------------------------ */
.step-progress { display: flex; align-items: center; margin: var(--ch-spacing-md) 0 var(--ch-spacing-lg); }
.step-dot {
width: 2.5rem; height: 2.5rem; border-radius: 50%; flex-shrink: 0;
display: flex; align-items: center; justify-content: center;
background: var(--ch-primary); color: var(--ch-on-primary);
font-size: .9rem; font-weight: 700;
}
.step-connector { flex: 1; height: 2px; background: var(--ch-primary-light); }
.step-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.step-grid > *, .step-wide > * { min-width: 0; }
.step-card {
background: var(--ch-bg-surface); border: 1px solid var(--ch-border);
border-left: 3px solid var(--ch-primary); border-radius: var(--ch-radius-md);
padding: 1.5rem; transition: box-shadow var(--ch-transition-normal);
}
.step-card:hover { box-shadow: var(--ch-shadow-md); }
.step-card__title {
display: flex; align-items: center; gap: .5rem;
font-size: 1.05rem; margin: 0 0 .5rem;
}
.step-num {
display: inline-flex; align-items: center; justify-content: center;
width: 1.5rem; height: 1.5rem; border-radius: 50%; flex-shrink: 0;
background: var(--ch-primary); color: var(--ch-on-primary);
font-size: .72rem; font-weight: 700;
}
.step-card p { color: var(--ch-text-muted); font-size: .89rem; line-height: 1.65; margin: 0 0 .75rem; }
.step-card__link { font-size: .85rem; font-weight: 600; }
.step-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 900px) {
.step-grid, .step-wide { grid-template-columns: 1fr; }
}
/* --- Cards --------------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1.25rem; }
.card-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.card-grid > * { min-width: 0; }
.card {
display: flex; flex-direction: column; position: relative; min-width: 0;
background: var(--ch-bg-elevated); color: inherit;
border: 1px solid var(--ch-border); border-top: 3px solid var(--ch-green);
border-radius: var(--ch-radius-md); box-shadow: var(--ch-shadow-sm);
padding: 1.25rem; text-decoration: none;
transition: box-shadow var(--ch-transition-normal), transform var(--ch-transition-normal);
}
.card:hover { box-shadow: var(--ch-shadow-md); transform: translateY(-2px); text-decoration: none; color: inherit; }
.card--guide { border-top-color: var(--ch-primary); }
.card__kicker {
text-transform: uppercase; letter-spacing: .06em;
font-size: .68rem; font-weight: 700; color: var(--ch-text-faint); margin-bottom: .4rem;
}
.card__title { font-size: 1.02rem; margin: 0 0 .45rem; }
.card__desc { color: var(--ch-text-muted); font-size: .86rem; line-height: 1.6; margin: 0 0 .9rem; flex: 1; }
.card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.chip {
display: inline-block; border-radius: var(--ch-radius-full);
padding: .2rem .6rem; font-size: .73rem; font-weight: 600;
max-width: 100%; overflow-wrap: anywhere;
}
.chip--beginner { background: color-mix(in srgb, var(--ch-green) 15%, var(--ch-bg)); color: var(--ch-green); }
.chip--intermediate { background: color-mix(in srgb, var(--ch-yellow) 15%, var(--ch-bg)); color: var(--ch-yellow); }
.chip--advanced { background: color-mix(in srgb, var(--ch-orange) 15%, var(--ch-bg)); color: var(--ch-orange); }
.chip--time { color: var(--ch-text-faint); font-size: .74rem; padding-left: 0; }
.tag {
display: inline-block; border-radius: .25rem; padding: .15rem .5rem;
font-size: .7rem; font-weight: 600; max-width: 100%; overflow-wrap: anywhere;
background: color-mix(in srgb, var(--ch-primary) 12%, var(--ch-bg));
color: var(--ch-primary);
}
.tag--tool { background: var(--ch-amber); color: #1a1a1a; }
.card__footer {
margin-top: .75rem; padding-top: .65rem; border-top: 1px solid var(--ch-border);
font-size: .73rem; color: var(--ch-text-faint);
}
/* --- Icon cards (feature / choose-your-path) ----------------------------- */
.icon-card {
min-width: 0;
background: var(--ch-bg-surface); border: 1px solid var(--ch-border);
border-radius: var(--ch-radius-md); padding: 1.5rem; box-shadow: var(--ch-shadow-sm);
display: flex; flex-direction: column;
}
.card-icon {
display: flex; align-items: center; justify-content: center;
width: 3rem; height: 3rem; margin-bottom: 1rem; flex-shrink: 0;
border-radius: var(--ch-radius-md);
}
.card-icon svg { width: 1.5rem; height: 1.5rem; }
.card-icon--amber { background: color-mix(in srgb, var(--ch-amber) 12%, transparent); color: var(--ch-amber-ink); }
.card-icon--green { background: color-mix(in srgb, var(--ch-green) 12%, transparent); color: var(--ch-green); }
.card-icon--blue { background: color-mix(in srgb, var(--ch-blue) 12%, transparent); color: var(--ch-blue); }
.card-icon--brown { background: color-mix(in srgb, var(--ch-orange) 12%, transparent); color: var(--ch-orange); }
.icon-card h3 { font-size: 1.05rem; margin: 0 0 .5rem; }
.icon-card p { color: var(--ch-text-muted); font-size: .88rem; line-height: 1.65; margin: 0 0 1rem; }
.icon-card ul { margin: 0 0 1rem; padding-left: 1.15rem; color: var(--ch-text-muted); font-size: .86rem; }
.icon-card li { margin-bottom: .3rem; }
.icon-card .btn { margin-top: auto; align-self: flex-start; }
/* --- Learning path cards ------------------------------------------------- */
.path-card {
background: var(--ch-bg-surface); border: 1px solid var(--ch-border);
border-left: 4px solid var(--ch-green); border-radius: var(--ch-radius-md);
box-shadow: var(--ch-shadow-sm); padding: 1.75rem; margin-bottom: 1.5rem;
scroll-margin-top: 90px; transition: box-shadow var(--ch-transition-normal);
}
.path-card:last-child { margin-bottom: 0; }
.path-card:hover { box-shadow: var(--ch-shadow-md); }
.path-card--beginner { border-left-color: var(--ch-green); }
.path-card--intermediate { border-left-color: var(--ch-yellow); }
.path-card--advanced { border-left-color: var(--ch-orange); }
.path-card__title { font-size: 1.15rem; margin: 0 0 .35rem; }
.path-card__desc { color: var(--ch-text-muted); font-size: .89rem; line-height: 1.65; margin: 0 0 1rem; }
.path-card__meta { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .78rem;
color: var(--ch-text-faint); margin-bottom: 1rem; }
.path-steps { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.path-step { display: flex; align-items: flex-start; gap: .75rem;
padding: .65rem 0; border-bottom: 1px solid var(--ch-border); }
.path-step:last-child { border-bottom: none; }
.path-step__num {
display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
width: 1.6rem; height: 1.6rem; border-radius: 50%; margin-top: .1rem;
font-size: .7rem; font-weight: 700; color: #fff; background: var(--ch-green);
}
.path-card--intermediate .path-step__num { background: var(--ch-yellow); }
.path-card--advanced .path-step__num { background: var(--ch-orange); }
.path-step__info { flex: 1; min-width: 0; }
.path-step__title { font-size: .88rem; font-weight: 600; color: var(--ch-text-heading); line-height: 1.35; }
.path-step__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .2rem; }
.path-step__time { color: var(--ch-text-faint); font-size: .73rem; }
/* --- Filters (tutorial catalog) ------------------------------------------ */
.filters { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: var(--ch-spacing-md); }
.filter-group { min-width: 0; }
.filter-group__label {
text-transform: uppercase; letter-spacing: .06em; font-size: .7rem;
font-weight: 700; color: var(--ch-text-faint); margin-bottom: .4rem;
}
.filter-group__buttons { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter-btn {
border: 1px solid var(--ch-border); background: var(--ch-bg-surface);
color: var(--ch-text-muted); border-radius: var(--ch-radius-full);
padding: .25rem .8rem; font-size: .78rem; font-weight: 600;
font-family: inherit; cursor: pointer; transition: all var(--ch-transition-fast);
}
.filter-btn:hover { border-color: var(--ch-primary); color: var(--ch-primary); }
.filter-btn[aria-pressed="true"] {
background: var(--ch-primary); border-color: var(--ch-primary); color: var(--ch-on-primary);
}
.filter-empty { color: var(--ch-text-faint); font-size: .9rem; padding: 2rem 0; }
/* --- Callouts ------------------------------------------------------------ */
/* mariadb.org's note: --mariadb-note-bg under a --mariadb-note-bar edge. */
.callout {
border-left: 3px solid var(--ch-callout-bar);
background: var(--ch-callout-bg);
border-radius: 0 var(--ch-radius-sm) var(--ch-radius-sm) 0;
padding: .9rem 1.1rem; margin: 1.5rem 0; font-size: .9rem;
}
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }
.callout__title { font-weight: 700; color: var(--ch-text-heading); display: block; margin-bottom: .25rem; }
.callout--warn { border-left-color: var(--ch-orange);
background: color-mix(in srgb, var(--ch-orange) 8%, var(--ch-bg-surface)); }
.callout--tip { border-left-color: var(--ch-green);
background: color-mix(in srgb, var(--ch-green) 8%, var(--ch-bg-surface)); }
/* An "ask your agent this" prompt block — the site's signature element. */
.prompt {
position: relative; margin: 1.5rem 0; padding: 1.68rem 1.15rem 1rem 3rem;
background: var(--ch-highlight-bg); border: 1px solid var(--ch-highlight-border);
border-radius: var(--ch-radius-sm);
font-size: .95rem; line-height: 1.65; color: var(--ch-text-heading);
}
/* The gutter mark is TWO pseudo-elements, because a single `content` string
cannot be styled in parts — one font-size would have to serve both the tiny
label and the chevron, and sizing one right makes the other wrong. The label
is tucked into the top-left corner ABOVE the chevron, which keeps the
chevron's original 3rem gutter and its offset from the first line of text. */
.prompt::before, .prompt::after {
position: absolute; left: 1.15rem; line-height: 1;
font-weight: 700; color: var(--ch-brand-action);
}
.prompt::after { content: "PROMPT"; top: .7rem; font-size: .7rem; letter-spacing: .08em; }
.prompt::before { content: "›"; top: 1.7rem; font-size: 1.3rem; }
.prompt p { margin: 0 0 .6rem; }
.prompt p:last-child { margin-bottom: 0; }
.prompt em { font-style: italic; }
/* --- Code ---------------------------------------------------------------- */
code {
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
font-size: .86em;
background: var(--ch-inline-code-bg); border: 1px solid var(--ch-inline-code-border);
border-radius: .3rem; padding: .1rem .34rem; color: var(--ch-text);
}
pre {
background: var(--ch-code-bg); border: 1px solid var(--ch-code-border);
color: var(--ch-code-text);
border-radius: var(--ch-radius-sm); padding: 1rem 1.1rem;
overflow-x: auto; font-size: .82rem; line-height: 1.6; margin: 1.25rem 0;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
/* A titled code panel. The panel owns the border and the background, and the
code is inset on top of it, so the surface carrying the title continues down
both sides and along the bottom — the title reads as the panel's header
rather than as a tab with an open bottom edge.
The wrapper is addressed by class, not with `__title + pre`: Liquid's
highlight tag wraps the <pre> in <figure class="highlight"> and a kramdown
fence in <div class="highlight">, so the <pre> is a descendant and not a
sibling. The figure also carries the UA's `margin: 1em 40px`, which is what
the inset margin below replaces. */
.code-block {
margin: 1.25rem 0; padding-bottom: .5rem;
background: var(--ch-code-bg);
border: 1px solid var(--ch-code-border); border-radius: var(--ch-radius-sm);
}
.code-block__title {
font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
color: var(--ch-code-text); padding: .5rem .9rem .45rem;
border-bottom: 1px solid var(--ch-code-border);
}
.code-block .highlight { margin: .5rem; }
.code-block pre {
margin: .5rem; box-shadow: var(--ch-shadow-sm);
background: color-mix(in srgb, var(--ch-code-text) 6%, var(--ch-code-bg));
border-radius: calc(var(--ch-radius-sm) - .15rem);
}
.code-block .highlight pre { margin: 0; }
/* Rouge syntax highlighting — the One Dark prism palette the reference uses.
It applies that theme in BOTH site themes, so there is no per-theme override
here: code blocks are dark on a light page too. Rouge's token classes are
mapped onto prism's token groups, which is the closest a different tokenizer
can get. */
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cp,
.highlight .cs, .highlight .cd { color: hsl(220, 10%, 40%); font-style: italic; }
.highlight .p, .highlight .pi { color: hsl(220, 14%, 71%); }
.highlight .m, .highlight .mi, .highlight .mf, .highlight .mh, .highlight .mo,
.highlight .kc, .highlight .no, .highlight .nc,
.highlight .na { color: hsl(29, 54%, 61%); }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kp,
.highlight .kr, .highlight .kt { color: hsl(286, 60%, 67%); }
.highlight .nt, .highlight .nb, .highlight .gd { color: hsl(355, 65%, 65%); }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb, .highlight .sc,
.highlight .sd, .highlight .se, .highlight .sh, .highlight .si, .highlight .sx,
.highlight .sr, .highlight .ss, .highlight .gi { color: hsl(95, 38%, 62%); }
.highlight .nv, .highlight .vg, .highlight .vi,
.highlight .o, .highlight .ow, .highlight .nf { color: hsl(207, 82%, 66%); }
.highlight .nl, .highlight .n, .highlight .nn { color: var(--ch-code-text); }
.highlight .err { color: hsl(355, 65%, 65%); background: none; }
.highlight .gs { font-weight: 700; }
.highlight .ge { font-style: italic; }
/* --- Tables -------------------------------------------------------------- */
.prose table {
display: block; width: max-content; max-width: 100%; overflow-x: auto;
border-collapse: collapse; margin: 1.5rem 0; font-size: .88rem;
}
.prose th, .prose td { border: 1px solid var(--ch-border); padding: .5rem .75rem; text-align: left; vertical-align: top; }
.prose th { background: var(--ch-inline-code-bg); font-weight: 700; color: var(--ch-text-heading); }
.table-wrap { overflow-x: auto; max-width: 100%; }
/* --- Prose / article ----------------------------------------------------- */
.prose { font-size: .96rem; }
.path-step__title, .card__title { overflow-wrap: anywhere; }
/* Long identifiers may break mid-token in running text so they never widen the
page, but never inside a table cell — the table scrolls instead. */
.prose code { overflow-wrap: anywhere; }
.prose td code, .prose th code { overflow-wrap: normal; white-space: nowrap; }
.prose h2 { font-size: 1.4rem; margin: 2.5rem 0 .85rem; }
.prose h3 { font-size: 1.1rem; margin: 2rem 0 .6rem; }
.prose h4 { font-size: .98rem; margin: 1.5rem 0 .5rem; }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.prose li { margin-bottom: .35rem; }
.prose li > ul, .prose li > ol { margin-top: .35rem; }
.prose blockquote {
margin: 1.5rem 0; padding: .25rem 0 .25rem 1.1rem;
border-left: 3px solid var(--ch-border); color: var(--ch-text-muted);
}
.prose img { border-radius: var(--ch-radius-sm); }
/* Text and links share mariadb.org's primary, so a link in running text is
underlined, as on mariadb.org, and turns accent on hover. */
.prose a:not(.btn), .callout a {
text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em;
}
/* Numbered steps inside a tutorial: h2 gets a counter bubble and a rail. */
.step-content { counter-reset: step-counter; }
.step-content > h2 {
counter-increment: step-counter;
display: flex; align-items: center; gap: .85rem;
margin-top: 2.75rem; margin-bottom: .25rem;
}
.step-content > h2::before {
content: counter(step-counter);
display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
width: 1.75rem; height: 1.75rem; border-radius: var(--ch-radius-full);
background: var(--ch-primary); color: var(--ch-on-primary);
font-size: .8rem; font-weight: 700;
}
/* A closing section that is a summary, not a step: keep the heading, drop the bubble. */
.step-content > h2.no-step::before { display: none; }
.step-content > h2.no-step { gap: 0; margin-top: 3rem; }
/* --- Article layout (sidebar TOC) ---------------------------------------- */
.article-layout > * { min-width: 0; }
.article-layout {
display: grid; grid-template-columns: minmax(0, 1fr) 240px;
gap: 3rem; align-items: start;
max-width: var(--ch-maxw); margin: 0 auto; padding: var(--ch-spacing-lg) 1.5rem var(--ch-section-sm);
}
.toc { position: sticky; top: calc(var(--ch-navbar-h) + 1.5rem); font-size: .83rem; }
.toc__title {
text-transform: uppercase; letter-spacing: .06em; font-size: .7rem;
font-weight: 700; color: var(--ch-text-faint); margin-bottom: .6rem;
}
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--ch-border); }
.toc li { margin: 0; }
.toc a { display: block; padding: .3rem 0 .3rem .85rem; margin-left: -1px;
color: var(--ch-text-muted); border-left: 2px solid transparent; }
.toc a:hover { color: var(--ch-primary); text-decoration: none; }
.toc a.is-active { color: var(--ch-primary); border-left-color: var(--ch-primary); font-weight: 600; }
.toc ul ul a { padding-left: 1.6rem; font-size: .95em; }
@media (max-width: 1000px) {
.article-layout { grid-template-columns: 1fr; gap: 0; }
.toc { display: none; }
}
/* --- Article header ------------------------------------------------------ */
.article-head { background: var(--ch-bg-surface); border-bottom: 1px solid var(--ch-border); }
.article-head__inner { max-width: var(--ch-maxw); margin: 0 auto; padding: var(--ch-spacing-lg) 1.5rem var(--ch-spacing-md); }
.breadcrumb { font-size: .8rem; color: var(--ch-text-faint); margin-bottom: .75rem; }
.breadcrumb a { color: var(--ch-text-muted); }
.article-head h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.05rem); margin: 0 0 .75rem; }