-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
2530 lines (2238 loc) · 130 KB
/
Copy pathindex.html
File metadata and controls
2530 lines (2238 loc) · 130 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SLO Mastery — Interactive Tutorial & Game</title>
<script>
(function() {
var saved;
try { saved = localStorage.getItem('slo_theme'); } catch(e) {}
var theme = (saved === 'light' || saved === 'dark') ? saved
: (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
document.documentElement.setAttribute('data-theme', theme);
})();
</script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;500;600;700;800&family=Lora:ital,wght@0,400;0,600;1,400&family=JetBrains+Mono:wght@400;600&display=swap" rel="stylesheet">
<style>
/* ─── Light mode (default) ─── */
:root {
--bg: #F8F5F0;
--surface: #FFFFFF;
--surface2: #F1EDE6;
--border: #DDD6CC;
--text: #1C1916;
--text-dim: #7A6F65;
--accent: #C94A1E;
--accent-light: rgba(201,74,30,0.1);
--green: #2A7A4E;
--green-light: rgba(42,122,78,0.12);
--red: #B83232;
--red-light: rgba(184,50,50,0.12);
--yellow: #B07810;
--yellow-light: rgba(176,120,16,0.14);
--blue: #1A5C8E;
--blue-light: rgba(26,92,142,0.12);
--orange: #C94A1E;
--radius: 3px;
--radius-sm: 2px;
--top-bar-bg: rgba(248,245,240,0.94);
--sidebar-bg: #FFFFFF;
--formula-bg: #F1EDE6;
--shadow: 0 2px 8px rgba(28,25,22,0.08);
--shadow-md: 0 4px 16px rgba(28,25,22,0.12);
}
/* ─── Dark mode ─── */
[data-theme="dark"] {
--bg: #141210;
--surface: #1E1B17;
--surface2: #28241E;
--border: #3A332A;
--text: #EDE7DF;
--text-dim: #8A7E72;
--accent: #E8602A;
--accent-light: rgba(232,96,42,0.12);
--green: #44A86A;
--green-light: rgba(68,168,106,0.12);
--red: #D95252;
--red-light: rgba(217,82,82,0.12);
--yellow: #D49838;
--yellow-light: rgba(212,152,56,0.14);
--blue: #4F96CE;
--blue-light: rgba(79,150,206,0.12);
--orange: #E8602A;
--top-bar-bg: rgba(20,18,16,0.95);
--sidebar-bg: #1A1714;
--formula-bg: #0F0D0B;
--shadow: 0 2px 8px rgba(0,0,0,0.3);
--shadow-md: 0 4px 16px rgba(0,0,0,0.4);
}
* { margin:0; padding:0; box-sizing:border-box; }
body {
font-family: 'Lora', Georgia, serif;
background: var(--bg);
color: var(--text);
line-height: 1.75;
overflow-x: hidden;
transition: background 0.2s, color 0.2s;
}
/* ─── Navigation ─── */
.top-bar {
position: fixed; top:0; left:0; right:0; z-index:100;
background: var(--top-bar-bg);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border-bottom: 1px solid var(--border);
display: flex; align-items: center; justify-content: space-between;
padding: 0 28px; height: 52px;
}
.top-bar .logo {
font-family: 'Work Sans', sans-serif;
font-weight: 800; font-size: 15px;
color: var(--text); letter-spacing: 0.02em;
text-transform: uppercase;
}
.top-bar .logo span { color: var(--text-dim); font-weight: 400; text-transform: none; letter-spacing: 0; }
.progress-bar-container { flex:1; max-width: 360px; margin: 0 28px; }
.progress-bar-bg { height: 3px; background: var(--border); overflow: hidden; }
.progress-bar-fill {
height: 100%; width: 0%;
background: var(--accent);
transition: width 0.5s ease;
}
.score-display {
font-family: 'Work Sans', sans-serif;
font-size: 12px; font-weight: 600;
color: var(--text-dim); letter-spacing: 0.08em; text-transform: uppercase;
display: flex; align-items: center; gap: 16px;
}
.score-display b { color: var(--accent); font-size: 15px; font-weight: 700; }
/* ─── Theme Toggle ─── */
.theme-toggle {
background: none; border: 1px solid var(--border);
color: var(--text-dim); cursor: pointer;
width: 32px; height: 32px;
display: flex; align-items: center; justify-content: center;
font-size: 15px; transition: border-color 0.2s, color 0.2s;
border-radius: 2px; flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
/* ─── Sidebar ─── */
.layout { display: flex; margin-top: 52px; min-height: calc(100vh - 52px); }
.sidebar {
width: 264px; min-width: 264px;
background: var(--sidebar-bg);
border-right: 1px solid var(--border);
padding: 28px 0;
position: sticky; top: 52px; height: calc(100vh - 52px); overflow-y: auto;
}
.sidebar h3 {
padding: 0 22px;
font-family: 'Work Sans', sans-serif;
font-size: 10px; font-weight: 700;
text-transform: uppercase; letter-spacing: 0.14em;
color: var(--text-dim); margin-bottom: 6px;
}
.nav-group { margin-bottom: 28px; }
.nav-item {
display: flex; align-items: center; gap: 10px;
padding: 7px 22px; cursor: pointer; transition: background 0.15s, color 0.15s;
font-family: 'Work Sans', sans-serif;
font-size: 13px; font-weight: 400;
color: var(--text-dim); border-left: 3px solid transparent;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active {
color: var(--accent); border-left-color: var(--accent);
background: var(--accent-light); font-weight: 600;
}
.nav-item.completed .check { color: var(--green); }
.nav-item .check { width: 16px; font-size: 13px; }
.nav-item .num {
font-family: 'JetBrains Mono', monospace;
font-size: 10px; opacity: 0.45; margin-left: auto;
}
/* ─── Main Content ─── */
.main { flex:1; padding: 48px 64px; max-width: 860px; }
.section { display: none; }
.section.active { display: block; animation: fadeIn 0.35s ease; }
@keyframes fadeIn { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: translateY(0); } }
h1 {
font-family: 'Work Sans', sans-serif;
font-size: 34px; font-weight: 800;
margin-bottom: 10px; letter-spacing: -0.02em;
line-height: 1.15;
}
h1 .chapter-num {
font-family: 'Work Sans', sans-serif;
font-weight: 600; font-size: 11px;
text-transform: uppercase; letter-spacing: 0.14em;
color: var(--accent); display: block;
margin-bottom: 8px;
}
h2 {
font-family: 'Work Sans', sans-serif;
font-size: 20px; font-weight: 700;
margin: 36px 0 14px; color: var(--text);
letter-spacing: -0.01em;
}
h3 {
font-family: 'Work Sans', sans-serif;
font-size: 16px; font-weight: 700;
margin: 28px 0 10px; letter-spacing: -0.01em;
}
p { margin-bottom: 18px; color: var(--text); font-size: 16px; }
.subtitle { font-style: italic; color: var(--text-dim); font-size: 17px; margin-bottom: 36px; }
/* ─── Cards ─── */
.concept-card {
background: var(--surface);
border: 1px solid var(--border);
border-left: 3px solid var(--border);
padding: 22px 24px; margin: 20px 0;
box-shadow: var(--shadow);
}
.concept-card.highlight { border-left-color: var(--accent); background: var(--accent-light); }
.concept-card.warning { border-left-color: var(--yellow); background: var(--yellow-light); }
.concept-card.success { border-left-color: var(--green); background: var(--green-light); }
.concept-card h4 {
font-family: 'Work Sans', sans-serif;
font-size: 14px; font-weight: 700;
margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.concept-card h4 .icon { font-size: 17px; }
.formula-box {
background: var(--formula-bg);
border: 1px solid var(--border);
border-top: 3px solid var(--accent);
padding: 18px 24px;
font-family: 'JetBrains Mono', monospace; font-size: 15px;
margin: 20px 0; text-align: center; color: var(--accent);
letter-spacing: 0.03em;
}
.key-insight {
background: var(--accent-light);
border-left: 4px solid var(--accent);
padding: 16px 20px; margin: 24px 0;
font-size: 15.5px; font-style: italic;
}
/* ─── Availability Table ─── */
.nines-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.nines-table th, .nines-table td {
padding: 10px 16px; text-align: left;
border-bottom: 1px solid var(--border); font-size: 14px;
}
.nines-table th {
font-family: 'Work Sans', sans-serif;
color: var(--text-dim); font-weight: 700;
font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
border-bottom: 2px solid var(--border);
}
.nines-table tr:hover td { background: var(--accent-light); }
.nines-table .nines {
color: var(--accent); font-weight: 600;
font-family: 'JetBrains Mono', monospace;
}
.nines-table .downtime {
color: var(--yellow);
font-family: 'JetBrains Mono', monospace;
}
/* ─── Calculator ─── */
.calculator {
background: var(--surface); border: 1px solid var(--border);
border-top: 3px solid var(--border);
padding: 28px; margin: 24px 0;
box-shadow: var(--shadow);
}
.calculator h4 {
font-family: 'Work Sans', sans-serif;
font-size: 14px; font-weight: 700;
margin-bottom: 18px; text-transform: uppercase; letter-spacing: 0.08em;
}
.calc-row { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.calc-label {
font-family: 'Work Sans', sans-serif;
font-size: 12px; font-weight: 600;
color: var(--text-dim); min-width: 160px;
text-transform: uppercase; letter-spacing: 0.06em;
}
.calc-input {
background: var(--bg); border: 1px solid var(--border);
padding: 8px 14px; color: var(--text);
font-size: 15px; font-family: 'JetBrains Mono', monospace;
width: 180px; outline: none; transition: border-color 0.2s;
border-radius: 2px;
}
.calc-input:focus { border-color: var(--accent); }
.calc-result {
background: var(--green-light);
border: 1px solid var(--green);
border-left: 4px solid var(--green);
padding: 16px 20px; margin-top: 16px; font-size: 15px;
}
.calc-result .big {
font-family: 'Work Sans', sans-serif;
font-size: 32px; font-weight: 800; color: var(--green);
}
/* ─── Slider ─── */
input[type="range"] {
-webkit-appearance: none; width: 100%; height: 4px;
background: var(--border); outline: none;
}
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none; width: 18px; height: 18px;
background: var(--accent); border-radius: 50%; cursor: pointer;
border: 3px solid var(--bg);
box-shadow: 0 0 0 1px var(--accent);
}
/* ─── Quiz ─── */
.quiz {
background: var(--surface);
border: 1px solid var(--border);
border-top: 3px solid var(--accent);
padding: 28px; margin: 32px 0;
box-shadow: var(--shadow);
}
.quiz-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.quiz-header .badge {
font-family: 'JetBrains Mono', monospace;
background: var(--accent); color: #fff;
font-size: 10px; font-weight: 600;
padding: 3px 10px; letter-spacing: 0.08em;
text-transform: uppercase;
}
.quiz h4 {
font-family: 'Work Sans', sans-serif;
font-size: 16px; font-weight: 700;
margin-bottom: 18px; line-height: 1.4;
}
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-option {
display: flex; align-items: center; gap: 14px;
background: var(--surface2); border: 1px solid var(--border);
padding: 12px 16px; cursor: pointer; transition: all 0.15s;
font-size: 15px;
}
.quiz-option:hover { border-color: var(--accent); background: var(--accent-light); }
.quiz-option.correct { border-color: var(--green); border-left: 4px solid var(--green); background: var(--green-light); }
.quiz-option.incorrect { border-color: var(--red); border-left: 4px solid var(--red); background: var(--red-light); }
.quiz-option .letter {
font-family: 'JetBrains Mono', monospace;
width: 24px; height: 24px;
border: 1px solid var(--border);
display: flex; align-items: center; justify-content: center;
font-size: 11px; font-weight: 600; flex-shrink: 0;
color: var(--text-dim);
}
.quiz-feedback {
margin-top: 16px; padding: 14px 18px;
font-size: 14.5px; display: none; line-height: 1.65;
font-style: italic;
}
.quiz-feedback.show { display: block; animation: fadeIn 0.3s ease; }
.quiz-feedback.correct-fb { background: var(--green-light); border-left: 4px solid var(--green); }
.quiz-feedback.incorrect-fb { background: var(--red-light); border-left: 4px solid var(--red); }
/* ─── Game Viewport ─── */
#game-viewport {
border: 1px solid var(--border);
border-top: 3px solid var(--accent);
margin: 28px 0;
overflow: hidden;
background: var(--surface);
}
#game-hud {
background: var(--surface);
border-bottom: 1px solid var(--border);
padding: 14px 24px 12px;
}
.game-stats {
display: grid; grid-template-columns: repeat(5, 1fr);
gap: 8px; margin: 0 0 10px 0;
}
.game-stat {
background: var(--surface2); border: 1px solid var(--border);
padding: 8px 10px; text-align: center;
}
.game-stat .label {
font-family: 'Work Sans', sans-serif;
font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim);
}
.game-stat .value {
font-family: 'Work Sans', sans-serif;
font-size: 20px; font-weight: 800; margin-top: 2px;
}
.game-stat .value.good { color: var(--green); }
.game-stat .value.warn { color: var(--yellow); }
.game-stat .value.bad { color: var(--red); }
.budget-bar {
height: 14px; background: var(--surface2);
border: 1px solid var(--border);
margin: 0; overflow: hidden; position: relative;
}
.budget-bar-fill { height: 100%; transition: width 0.5s ease, background 0.5s ease; }
.budget-bar-label {
position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600;
color: var(--text); mix-blend-mode: difference;
}
/* Intro screen */
#game-intro {
min-height: 420px; display: flex;
align-items: center; justify-content: center;
padding: 48px 40px;
}
.game-intro-inner { max-width: 500px; text-align: center; }
.game-intro-badge {
font-family: 'JetBrains Mono', monospace;
font-size: 10px; letter-spacing: 0.15em; color: var(--accent);
border: 1px solid var(--accent); display: inline-block;
padding: 3px 12px; margin-bottom: 20px;
}
.game-intro-inner h2 {
font-family: 'Work Sans', sans-serif;
font-size: 26px; font-weight: 800; margin-bottom: 14px;
}
.game-intro-inner > p {
color: var(--text-dim); font-size: 14.5px; line-height: 1.6; margin-bottom: 22px;
}
.game-rules {
display: flex; flex-direction: column; gap: 10px; text-align: left;
background: var(--surface2); border: 1px solid var(--border);
padding: 16px 20px; margin-bottom: 28px;
}
.game-rule { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: var(--text-dim); }
.rule-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
/* Game stage — one event at a time */
#game-stage {
min-height: 420px; display: flex;
align-items: center; justify-content: center;
padding: 32px 40px;
}
#game-event-area { width: 100%; max-width: 580px; }
@keyframes eventFlyIn {
from { opacity: 0; transform: translateY(28px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes eventFlyOut {
from { opacity: 1; transform: translateY(0); }
to { opacity: 0; transform: translateY(-20px); }
}
.event-card {
background: var(--surface2); border: 1px solid var(--border);
padding: 24px; animation: eventFlyIn 0.35s ease;
}
.event-card.flying-out { animation: eventFlyOut 0.25s ease forwards; }
.event-card h4 {
font-family: 'Work Sans', sans-serif; font-weight: 700;
font-size: 17px; margin-bottom: 8px;
}
.event-card > p { font-size: 14.5px; color: var(--text-dim); margin-bottom: 16px; }
.incident-warning {
background: rgba(225,112,85,0.08); border-left: 3px solid var(--red);
padding: 7px 12px; font-size: 12.5px; color: var(--red);
font-family: 'JetBrains Mono', monospace; margin-bottom: 14px;
}
.event-choices { display: flex; flex-direction: column; gap: 8px; }
.event-choice {
background: var(--surface); border: 1px solid var(--border);
padding: 12px 16px; cursor: pointer; transition: all 0.15s; font-size: 14px;
}
.event-choice:hover { border-color: var(--accent); background: var(--accent-light); }
.event-choice.selected { border-left: 4px solid var(--green); background: var(--green-light); pointer-events: none; }
.event-choice.skip-choice { border-style: dashed; }
.event-choice.skip-choice:hover { border-color: var(--yellow); background: rgba(253,203,110,0.08); border-style: dashed; }
.event-outcome {
margin-top: 14px; padding: 12px 16px;
font-size: 14px; display: none; line-height: 1.65;
border-left: 3px solid var(--border); font-style: italic;
}
.event-outcome.show { display: block; animation: fadeIn 0.3s ease; }
#gameResult { padding: 32px 40px; border-top: 1px solid var(--border); }
/* ─── Buttons ─── */
.btn {
display: inline-flex; align-items: center; gap: 8px;
padding: 10px 24px;
font-family: 'Work Sans', sans-serif;
font-size: 13px; font-weight: 700;
text-transform: uppercase; letter-spacing: 0.08em;
cursor: pointer; border: none; transition: all 0.15s;
border-radius: 2px;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { opacity: 0.88; }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { opacity: 0.88; }
.section-nav {
display: flex; justify-content: space-between;
margin-top: 48px; padding-top: 24px;
border-top: 1px solid var(--border);
}
/* ─── Task Checklist ─── */
.task-list { margin: 20px 0; }
.task-item {
display: flex; align-items: center; gap: 12px;
padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 15px;
}
.task-check {
width: 20px; height: 20px;
border: 2px solid var(--border); cursor: pointer;
display: flex; align-items: center; justify-content: center;
transition: all 0.2s; flex-shrink: 0; font-size: 12px;
}
.task-check.done { background: var(--green); border-color: var(--green); color: #fff; }
/* ─── SVG Diagrams ─── */
.diagram-container { margin: 28px 0; text-align: center; }
.diagram-container svg { max-width: 100%; }
/* ─── Tabs ─── */
.tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 2px solid var(--border); }
.tab {
padding: 8px 20px;
background: transparent; color: var(--text-dim); cursor: pointer;
font-family: 'Work Sans', sans-serif;
font-size: 12px; font-weight: 700;
text-transform: uppercase; letter-spacing: 0.08em;
transition: all 0.15s; border: none;
border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-content { display: none; padding-top: 4px; }
.tab-content.active { display: block; }
/* ─── Nines Visualization ─── */
.nines-viz { display: flex; gap: 3px; margin: 20px 0; flex-wrap: wrap; }
.nines-block { width: 8px; height: 8px; transition: background 0.25s ease; }
.nines-block.up { background: var(--green); }
.nines-block.down { background: var(--red); }
/* ─── Welcome Hero ─── */
.hero { padding: 56px 0 40px; }
.hero h1 {
font-size: 48px; margin-bottom: 20px;
line-height: 1.08;
}
.hero h1 .accent { color: var(--accent); }
.hero .tagline {
font-size: 18px; color: var(--text-dim);
max-width: 520px; margin: 0 0 36px; line-height: 1.6;
}
/* ─── Tooltip ─── */
.tooltip { position: relative; display: inline; border-bottom: 1px dashed var(--accent); cursor: help; }
.tooltip .tip-text {
display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
background: var(--surface); border: 1px solid var(--border);
padding: 8px 12px; font-size: 13px; white-space: nowrap; z-index: 10;
box-shadow: var(--shadow-md);
font-family: 'Work Sans', sans-serif; font-style: normal;
}
.tooltip:hover .tip-text { display: block; }
/* ─── Comparison visual ─── */
.comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.comparison .col {
background: var(--surface); border: 1px solid var(--border);
border-top: 3px solid var(--border); padding: 20px;
}
.comparison .col h4 {
font-family: 'Work Sans', sans-serif;
font-size: 13px; font-weight: 700;
margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.06em;
}
.comparison .col.good { border-top-color: var(--green); }
.comparison .col.bad { border-top-color: var(--red); }
.comparison .col ul { list-style: none; padding: 0; }
.comparison .col li { font-size: 14.5px; padding: 4px 0; color: var(--text-dim); }
.comparison .col li::before { margin-right: 8px; }
.comparison .col.good li::before { content: "✓"; color: var(--green); font-weight: 700; }
.comparison .col.bad li::before { content: "✗"; color: var(--red); font-weight: 700; }
/* ─── SLI Builder ─── */
.sli-builder {
background: var(--surface); border: 1px solid var(--border);
padding: 24px; margin: 20px 0;
box-shadow: var(--shadow);
}
.sli-builder select, .sli-builder input[type="text"] {
background: var(--bg); border: 1px solid var(--border);
border-radius: 2px; padding: 8px 14px; color: var(--text);
font-size: 14px; font-family: 'Lora', serif;
outline: none; width: 100%;
}
.sli-builder select:focus, .sli-builder input[type="text"]:focus { border-color: var(--accent); }
.sli-output {
background: var(--formula-bg); border: 1px solid var(--border);
border-left: 3px solid var(--accent);
padding: 16px; margin-top: 16px;
font-family: 'JetBrains Mono', monospace; font-size: 13.5px; color: var(--accent);
line-height: 1.8;
}
/* ─── Responsive ─── */
@media (max-width: 900px) {
.sidebar { display: none; }
.main { padding: 24px 20px; }
.comparison { grid-template-columns: 1fr; }
.hero h1 { font-size: 36px; }
}
/* ─── Completion screen ─── */
.completion-screen { text-align: center; padding: 56px 20px; }
.completion-screen .trophy { font-size: 72px; margin-bottom: 20px; }
.completion-screen h1 { font-size: 38px; margin-bottom: 12px; }
.final-stats { display: flex; justify-content: center; gap: 48px; margin: 36px 0; }
.final-stat { text-align: center; }
.final-stat .num {
font-family: 'Work Sans', sans-serif;
font-size: 40px; font-weight: 800; color: var(--accent);
}
.final-stat .label {
font-family: 'Work Sans', sans-serif;
font-size: 11px; font-weight: 600;
text-transform: uppercase; letter-spacing: 0.1em;
color: var(--text-dim); margin-top: 6px;
}
</style>
</head>
<body>
<!-- ═══ TOP BAR ═══ -->
<div class="top-bar">
<div class="logo">SLO Mastery <span>— Interactive Tutorial</span></div>
<div class="progress-bar-container">
<div class="progress-bar-bg"><div class="progress-bar-fill" id="progressFill"></div></div>
</div>
<div class="score-display">
Score: <b id="scoreDisplay">0</b>
<button class="theme-toggle" id="themeToggle" title="Toggle light/dark mode" aria-label="Switch to dark mode" aria-pressed="false">☀</button>
</div>
</div>
<div class="layout">
<!-- ═══ SIDEBAR ═══ -->
<div class="sidebar">
<div class="nav-group">
<h3>Getting Started</h3>
<div class="nav-item active" data-section="welcome"><span class="check">○</span> Welcome <span class="num">0</span></div>
</div>
<div class="nav-group">
<h3>Ch 1 — Embracing Risk</h3>
<div class="nav-item" data-section="s1-1"><span class="check">○</span> The 100% Trap <span class="num">1.1</span></div>
<div class="nav-item" data-section="s1-2"><span class="check">○</span> Measuring Risk <span class="num">1.2</span></div>
<div class="nav-item" data-section="s1-3"><span class="check">○</span> Cost of Reliability <span class="num">1.3</span></div>
<div class="nav-item" data-section="s1-4"><span class="check">○</span> Error Budgets <span class="num">1.4</span></div>
<div class="nav-item" data-section="s1-quiz"><span class="check">○</span> Quiz: Risk <span class="num">★</span></div>
</div>
<div class="nav-group">
<h3>Ch 2 — SLIs, SLOs & SLAs</h3>
<div class="nav-item" data-section="s2-1"><span class="check">○</span> SLI: The Signal <span class="num">2.1</span></div>
<div class="nav-item" data-section="s2-2"><span class="check">○</span> SLO: The Target <span class="num">2.2</span></div>
<div class="nav-item" data-section="s2-3"><span class="check">○</span> SLA: The Promise <span class="num">2.3</span></div>
<div class="nav-item" data-section="s2-4"><span class="check">○</span> Choosing SLIs <span class="num">2.4</span></div>
<div class="nav-item" data-section="s2-quiz"><span class="check">○</span> Quiz: SLOs <span class="num">★</span></div>
</div>
<div class="nav-group">
<h3>Ch 3 — Implementing SLOs</h3>
<div class="nav-item" data-section="s3-1"><span class="check">○</span> The SLO Process <span class="num">3.1</span></div>
<div class="nav-item" data-section="s3-2"><span class="check">○</span> SLI Specification <span class="num">3.2</span></div>
<div class="nav-item" data-section="s3-3"><span class="check">○</span> SLI → Implementation <span class="num">3.3</span></div>
<div class="nav-item" data-section="s3-4"><span class="check">○</span> Setting SLOs <span class="num">3.4</span></div>
<div class="nav-item" data-section="s3-quiz"><span class="check">○</span> Quiz: Impl. <span class="num">★</span></div>
</div>
<div class="nav-group">
<h3>Final Challenge</h3>
<div class="nav-item" data-section="game"><span class="check">○</span> Error Budget Game <span class="num">🎮</span></div>
<div class="nav-item" data-section="sli-lab"><span class="check">○</span> SLI Builder Lab <span class="num">🔬</span></div>
<div class="nav-item" data-section="completion"><span class="check">○</span> Graduation <span class="num">🎓</span></div>
</div>
<div style="padding: 16px 20px; border-top: 1px solid var(--border); margin-top: 8px;">
<button onclick="clearProgress()" style="background:none; border:none; color:var(--text-dim); font-size:12px; cursor:pointer; padding:0; text-decoration:underline; text-underline-offset:3px;">Reset progress</button>
</div>
</div>
<!-- ═══ MAIN CONTENT ═══ -->
<div class="main">
<!-- ═══════════════════════════════════════════ -->
<!-- WELCOME -->
<!-- ═══════════════════════════════════════════ -->
<div class="section active" id="welcome">
<div class="hero">
<h1>Master <span class="accent">SLOs</span></h1>
<p class="tagline">An interactive deep-dive into Google's SRE approach to risk, reliability, and Service Level Objectives. Based on the SRE Book and SRE Workbook.</p>
</div>
<div class="concept-card highlight">
<h4><span class="icon">📘</span> What you'll learn</h4>
<p style="margin-bottom:8px;">This tutorial covers three core chapters from Google's SRE canon:</p>
<p><strong>Chapter 1: Embracing Risk</strong> — Why 100% reliability is the wrong goal, how to think about risk as a continuum, and the revolutionary concept of error budgets.</p>
<p><strong>Chapter 2: Service Level Objectives</strong> — The SLI → SLO → SLA hierarchy, how to pick the right indicators, and how to set targets that actually work.</p>
<p style="margin-bottom:0;"><strong>Chapter 3: Implementing SLOs</strong> — The practical playbook: from specification to measurement, dashboards, alerts, and decision-making.</p>
</div>
<div class="concept-card">
<h4><span class="icon">🎮</span> How it works</h4>
<p style="margin-bottom:8px;">This isn't a passive read. You'll encounter:</p>
<p>
<strong>Interactive calculators</strong> to build intuition with real numbers.
<strong>Quizzes</strong> after each chapter to test understanding.
<strong>A simulation game</strong> where you manage a real error budget under pressure.
<strong>An SLI Builder Lab</strong> where you design SLIs for different service types.
</p>
<p style="margin-bottom:0;">Points are tracked throughout. Aim for 100%.</p>
</div>
<div class="section-nav" style="justify-content:flex-end;">
<button class="btn btn-primary" onclick="goTo('s1-1')">Start Chapter 1 →</button>
</div>
</div>
<!-- ═══════════════════════════════════════════ -->
<!-- CHAPTER 1.1: THE 100% TRAP -->
<!-- ═══════════════════════════════════════════ -->
<div class="section" id="s1-1">
<h1><span class="chapter-num">Chapter 1</span>The 100% Reliability Trap</h1>
<p class="subtitle">Why pursuing perfection will destroy your product</p>
<p>Here's the core insight that drives everything in SRE: <strong>you should never aim for 100% reliability</strong>. Not because you can't get close — but because the cost of the last fraction of reliability grows exponentially, while the user can't even tell the difference.</p>
<div class="key-insight">
<strong>Key Insight:</strong> Users don't experience your service in isolation. Their experience is bounded by the reliability of everything between them and you — their ISP, their WiFi, their device. If a user's laptop crashes 1% of the time, they can't tell the difference between 99.99% and 99.999% availability from your service.
</div>
<h2>The reliability stack</h2>
<p>Think of it this way: a user's end-to-end experience passes through many layers, each with its own failure rate. Your service is just one layer.</p>
<div class="diagram-container">
<svg viewBox="0 0 700 260" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="g1" x1="0" y1="0" x2="1" y2="0">
<stop offset="0%" stop-color="#6c5ce7"/>
<stop offset="100%" stop-color="#74b9ff"/>
</linearGradient>
</defs>
<!-- Layers -->
<rect x="50" y="20" width="600" height="40" rx="8" fill="#2d3436" stroke="#636e72" stroke-width="1"/>
<text x="350" y="45" text-anchor="middle" fill="#dfe6e9" font-size="14" font-weight="600">User's Device & OS (~99%)</text>
<rect x="90" y="70" width="520" height="40" rx="8" fill="#2d3436" stroke="#636e72" stroke-width="1"/>
<text x="350" y="95" text-anchor="middle" fill="#dfe6e9" font-size="14" font-weight="600">Local Network / WiFi (~99.9%)</text>
<rect x="130" y="120" width="440" height="40" rx="8" fill="#2d3436" stroke="#636e72" stroke-width="1"/>
<text x="350" y="145" text-anchor="middle" fill="#dfe6e9" font-size="14" font-weight="600">ISP / Internet (~99.9%)</text>
<rect x="170" y="170" width="360" height="40" rx="8" fill="url(#g1)" fill-opacity="0.3" stroke="#6c5ce7" stroke-width="2"/>
<text x="350" y="195" text-anchor="middle" fill="#a29bfe" font-size="14" font-weight="700">⭐ Your Service (99.99%?)</text>
<text x="350" y="240" text-anchor="middle" fill="#636e72" font-size="13">Effective availability ≈ product of all layers ≈ 98.8%</text>
</svg>
</div>
<p>Even if your service achieves five 9s (99.999%), the user's effective availability is still capped by the weakest link — often their own network. So over-investing in that last 0.009% of reliability is money spent where users can't feel it.</p>
<h2>What happens when you chase 100%</h2>
<div class="comparison">
<div class="col bad">
<h4>❌ The 100% mindset</h4>
<ul>
<li>Every release is terrifying</li>
<li>Feature velocity grinds to zero</li>
<li>Engineers are afraid to deploy</li>
<li>Change is the enemy</li>
<li>Product stagnates</li>
</ul>
</div>
<div class="col good">
<h4>✓ The SRE mindset</h4>
<ul>
<li>Target = "reliable enough"</li>
<li>Planned risk budget for innovation</li>
<li>Deploy frequently with confidence</li>
<li>Change is managed, not avoided</li>
<li>Product evolves rapidly</li>
</ul>
</div>
</div>
<div class="section-nav">
<button class="btn btn-secondary" onclick="goTo('welcome')">← Back</button>
<button class="btn btn-primary" onclick="goTo('s1-2')">Next: Measuring Risk →</button>
</div>
</div>
<!-- ═══════════════════════════════════════════ -->
<!-- CHAPTER 1.2: MEASURING RISK -->
<!-- ═══════════════════════════════════════════ -->
<div class="section" id="s1-2">
<h1><span class="chapter-num">Chapter 1</span>Measuring Service Risk</h1>
<p class="subtitle">Putting numbers on reliability</p>
<p>Google primarily measures service risk as <strong>unplanned downtime</strong>. There are two ways to express this: time-based and aggregate availability.</p>
<h2>Time-based availability</h2>
<div class="formula-box">
availability = uptime / (uptime + downtime)
</div>
<p>This works for simple systems, but breaks down for globally distributed services that are never fully "up" or "down." A service might be degraded for some users while fine for others.</p>
<h2>Aggregate availability (request success rate)</h2>
<p>For request-serving systems, Google uses a more practical formula:</p>
<div class="formula-box">
availability = successful requests / total requests
</div>
<p>This captures partial failures naturally. If your service handles 2.5 million requests/day and you want 99.99% availability, you can afford <strong>250 failed requests per day</strong>. Not zero. Two hundred and fifty.</p>
<h2>The table of nines</h2>
<p>Hover over any row to see what that level of availability means in practice:</p>
<table class="nines-table">
<thead><tr><th>Availability</th><th>Nines</th><th>Downtime / Year</th><th>Downtime / Quarter</th><th>Failed Req / Million</th></tr></thead>
<tbody>
<tr data-meaning="Your service is down over a month a year. Only acceptable for batch jobs or non-critical internal tools — never for anything a user depends on."><td class="nines">90%</td><td>One 9</td><td class="downtime">36.5 days</td><td class="downtime">9.1 days</td><td>100,000</td></tr>
<tr data-meaning="Down 3–4 days a year. You'll have noticeable outages every quarter. Fine for internal dashboards or dev tooling, but users will notice and complain."><td class="nines">99%</td><td>Two 9s</td><td class="downtime">3.65 days</td><td class="downtime">21.9 hours</td><td>10,000</td></tr>
<tr data-meaning="Down ~9 hours a year — roughly one bad incident per quarter. The baseline for most customer-facing web services. Users tolerate this, but barely."><td class="nines">99.9%</td><td>Three 9s</td><td class="downtime">8.76 hours</td><td class="downtime">2.19 hours</td><td>1,000</td></tr>
<tr data-meaning="Down ~4 hours a year. A common target for SaaS products that take reliability seriously. Requires good on-call practices and fast incident response."><td class="nines">99.95%</td><td>Three and a half 9s</td><td class="downtime">4.38 hours</td><td class="downtime">1.09 hours</td><td>500</td></tr>
<tr data-meaning="Down ~52 minutes a year. Requires redundancy, automated failover, and a mature engineering culture. Appropriate for payment systems or anything with an SLA."><td class="nines">99.99%</td><td>Four 9s</td><td class="downtime">52.6 minutes</td><td class="downtime">13.1 minutes</td><td>100</td></tr>
<tr data-meaning="Down ~5 minutes a year. Extremely expensive to maintain. Reserved for critical infrastructure — telecom, emergency services, financial settlement systems."><td class="nines">99.999%</td><td>Five 9s</td><td class="downtime">5.26 minutes</td><td class="downtime">1.31 minutes</td><td>10</td></tr>
</tbody>
</table>
<div id="nines-context" style="display:none; margin-top:10px; padding:12px 16px; background:rgba(108,92,231,0.08); border-left:3px solid var(--accent); border-radius:4px; font-size:14px; color:var(--text-dim); min-height:44px;"></div>
<script>
(function() {
var rows = document.querySelectorAll('.nines-table tbody tr[data-meaning]');
var ctx = document.getElementById('nines-context');
rows.forEach(function(row) {
row.addEventListener('mouseenter', function() {
ctx.textContent = row.getAttribute('data-meaning');
ctx.style.display = 'block';
});
row.addEventListener('mouseleave', function() {
ctx.style.display = 'none';
});
});
})();
</script>
<h2>Visualize it</h2>
<p>Each block below represents one request out of 1,000. Use the slider to change the availability target and see how many failures (red blocks) are allowed:</p>
<div class="calculator">
<div class="calc-row">
<span class="calc-label">Availability target:</span>
<input type="range" id="ninesSlider" min="900" max="999" value="990" style="flex:1;">
<span id="ninesValue" style="font-family:monospace;font-weight:700;color:var(--accent);min-width:60px;text-align:right;">99.0%</span>
</div>
<div class="nines-viz" id="ninesViz"></div>
<div class="calc-result">
<span id="ninesExplain">With 99.0% availability, <strong>10 out of every 1,000 requests</strong> can fail.</span>
</div>
</div>
<div class="section-nav">
<button class="btn btn-secondary" onclick="goTo('s1-1')">← Back</button>
<button class="btn btn-primary" onclick="goTo('s1-3')">Next: Cost of Reliability →</button>
</div>
</div>
<!-- ═══════════════════════════════════════════ -->
<!-- CHAPTER 1.3: COST OF RELIABILITY -->
<!-- ═══════════════════════════════════════════ -->
<div class="section" id="s1-3">
<h1><span class="chapter-num">Chapter 1</span>The Cost of Reliability</h1>
<p class="subtitle">More nines costs exponentially more — and eventually isn't worth it</p>
<p>Increasing reliability has two major cost dimensions:</p>
<div class="concept-card">
<h4><span class="icon">💰</span> Cost of redundant infrastructure</h4>
<p style="margin:0;">More servers, more replicas, multi-region deployment, automatic failover, better hardware. Each additional nine roughly <strong>multiplies</strong> infrastructure cost.</p>
</div>
<div class="concept-card">
<h4><span class="icon">🐌</span> Cost of reduced velocity</h4>
<p style="margin:0;">To hit very high reliability targets, you need more testing, slower rollouts, fewer changes, longer review cycles. Your ability to ship features drops. This is the <strong>opportunity cost</strong> and it's often the bigger cost.</p>
</div>
<h2>The exponential curve</h2>
<p>The relationship between reliability and cost is not linear — it's exponential. Going from 99.9% to 99.99% might cost 10× what it cost to go from 99% to 99.9%.</p>
<div class="diagram-container">
<svg viewBox="0 0 600 300" xmlns="http://www.w3.org/2000/svg">
<!-- Axes -->
<line x1="80" y1="250" x2="560" y2="250" stroke="#636e72" stroke-width="1"/>
<line x1="80" y1="250" x2="80" y2="30" stroke="#636e72" stroke-width="1"/>
<!-- Labels -->
<text x="320" y="290" text-anchor="middle" fill="#636e72" font-size="13">Reliability Target →</text>
<text x="25" y="140" text-anchor="middle" fill="#636e72" font-size="13" transform="rotate(-90,25,140)">Cost →</text>
<!-- X-axis labels -->
<text x="120" y="270" text-anchor="middle" fill="#b2bec3" font-size="11">99%</text>
<text x="220" y="270" text-anchor="middle" fill="#b2bec3" font-size="11">99.9%</text>
<text x="340" y="270" text-anchor="middle" fill="#b2bec3" font-size="11">99.99%</text>
<text x="470" y="270" text-anchor="middle" fill="#b2bec3" font-size="11">99.999%</text>
<!-- Exponential curve -->
<path d="M 100 240 Q 200 235 250 220 Q 320 190 380 140 Q 430 90 470 50 Q 510 20 540 10" fill="none" stroke="#6c5ce7" stroke-width="3"/>
<!-- Revenue/value line (flattening) -->
<path d="M 100 220 Q 200 160 280 130 Q 360 110 420 105 Q 480 102 540 100" fill="none" stroke="#00b894" stroke-width="2" stroke-dasharray="6,4"/>
<!-- Legend -->
<rect x="380" y="140" width="12" height="3" fill="#6c5ce7"/>
<text x="398" y="144" fill="#b2bec3" font-size="11">Cost</text>
<rect x="380" y="158" width="12" height="3" fill="#00b894"/>
<text x="398" y="162" fill="#b2bec3" font-size="11">Revenue benefit</text>
<!-- Sweet spot marker -->
<circle cx="310" cy="165" r="16" fill="none" stroke="#fdcb6e" stroke-width="2" stroke-dasharray="4,3"/>
<text x="310" y="170" text-anchor="middle" fill="#fdcb6e" font-size="10" font-weight="700">$</text>
<text x="310" y="198" text-anchor="middle" fill="#fdcb6e" font-size="10">sweet spot</text>
</svg>
</div>
<div class="key-insight">
<strong>The sweet spot:</strong> The optimal reliability target is where the cost curve crosses the revenue-benefit curve. Beyond that point, you're spending more on reliability than you're gaining from it. This is where the error budget concept comes from — it quantifies exactly how much unreliability you can tolerate.
</div>
<h2>Try it: Cost calculator</h2>
<div class="calculator">
<h4>How much does one more nine cost you?</h4>
<div class="calc-row">
<span class="calc-label">Monthly revenue:</span>
<input class="calc-input" type="number" id="costRevenue" value="1000000" placeholder="e.g. 1000000">
</div>
<div class="calc-row">
<span class="calc-label">Current availability:</span>
<input class="calc-input" type="number" id="costCurrent" value="99.9" step="0.01" placeholder="e.g. 99.9">
<span style="color:var(--text-dim)">%</span>
</div>
<div class="calc-row">
<span class="calc-label">Target availability:</span>
<input class="calc-input" type="number" id="costTarget" value="99.99" step="0.01" placeholder="e.g. 99.99">
<span style="color:var(--text-dim)">%</span>
</div>
<button class="btn btn-primary" onclick="calculateCost()" style="margin-top:8px;">Calculate</button>
<div class="calc-result" id="costResult" style="display:none;"></div>
</div>
<div class="section-nav">
<button class="btn btn-secondary" onclick="goTo('s1-2')">← Back</button>
<button class="btn btn-primary" onclick="goTo('s1-4')">Next: Error Budgets →</button>
</div>
</div>
<!-- ═══════════════════════════════════════════ -->
<!-- CHAPTER 1.4: ERROR BUDGETS -->
<!-- ═══════════════════════════════════════════ -->
<div class="section" id="s1-4">
<h1><span class="chapter-num">Chapter 1</span>Error Budgets</h1>
<p class="subtitle">The concept that aligns product and SRE teams</p>
<p>If a service's SLO is 99.9% availability, then the <strong>error budget</strong> is the remaining 0.1%. That's the amount of unreliability you're explicitly allowed. It reframes "downtime" from a failure into a <strong>budget to be spent</strong>.</p>
<div class="formula-box">
error budget = 1 - SLO = 1 - 0.999 = 0.1%
</div>
<h2>What can you spend the error budget on?</h2>
<div class="concept-card">
<h4><span class="icon">🎯</span> Planned spending</h4>
<p style="margin-bottom:8px">The error budget can be "spent" on things that cause small amounts of unreliability but deliver other value:</p>
<p>
<strong>Launching new features</strong> — new code has bugs, that's normal.<br>
<strong>Risky experiments</strong> — A/B tests, canary deployments.<br>
<strong>Planned maintenance</strong> — database migrations, infrastructure changes.<br>
<strong>Faster release cycles</strong> — more deploys = more risk, but also more innovation.
</p>
</div>
<h2>The alignment mechanism</h2>
<p>This is the real genius. Without error budgets, product teams and SRE teams are in constant tension:</p>
<div class="diagram-container">
<svg viewBox="0 0 700 200" xmlns="http://www.w3.org/2000/svg">
<!-- Product side -->
<rect x="30" y="40" width="200" height="120" rx="12" fill="#2d3436" stroke="#e17055" stroke-width="2"/>
<text x="130" y="72" text-anchor="middle" fill="#e17055" font-size="14" font-weight="700">Product Team</text>
<text x="130" y="96" text-anchor="middle" fill="#b2bec3" font-size="12">"Ship faster!"</text>
<text x="130" y="116" text-anchor="middle" fill="#b2bec3" font-size="12">"More features!"</text>
<text x="130" y="136" text-anchor="middle" fill="#b2bec3" font-size="12">"Move fast!"</text>
<!-- Arrow -->
<text x="290" y="100" text-anchor="middle" fill="#636e72" font-size="24">⚡</text>
<text x="290" y="125" text-anchor="middle" fill="#636e72" font-size="11">TENSION</text>
<!-- SRE side -->
<rect x="340" y="40" width="200" height="120" rx="12" fill="#2d3436" stroke="#00b894" stroke-width="2"/>
<text x="440" y="72" text-anchor="middle" fill="#00b894" font-size="14" font-weight="700">SRE Team</text>
<text x="440" y="96" text-anchor="middle" fill="#b2bec3" font-size="12">"Don't break things!"</text>
<text x="440" y="116" text-anchor="middle" fill="#b2bec3" font-size="12">"More testing!"</text>
<text x="440" y="136" text-anchor="middle" fill="#b2bec3" font-size="12">"Slow down!"</text>
<!-- Error Budget resolution -->
<rect x="560" y="55" width="130" height="90" rx="10" fill="#6c5ce7" fill-opacity="0.2" stroke="#6c5ce7" stroke-width="2"/>
<text x="625" y="85" text-anchor="middle" fill="#a29bfe" font-size="12" font-weight="700">Error Budget</text>
<text x="625" y="107" text-anchor="middle" fill="#b2bec3" font-size="11">Objective</text>
<text x="625" y="125" text-anchor="middle" fill="#b2bec3" font-size="11">arbiter</text>
</svg>
</div>