public snapshot · areas/examples/raft-nib/ · system@main · commit da2bf624f03d · shared 2026-11-23T17:23:12Z· frozen: this page does not change when the repository does
all files
  1/* raft-nib — one stylesheet, no scripts, no requests.
  2
  3   The page is drafting vellum and navy ink. Colour carries one meaning each:
  4
  5     --n1 --n2 --n3   which node. Teal, amber, violet, in the order of the
  6                      hosts. Used for a node's lane, its leader bars, its
  7                      applies, and nowhere else.
  8     --refuse         where the monitor refused a run. Nothing else is red.
  9     --ink, --ink-2   text; --rule the hairlines and the timeline grid.
 10
 11   The timelines are the one loud thing on the page; everything around them
 12   is a quiet column of serif text. Every token is redefined for dark mode, and
 13   the SVG carries classes, never colours, so the drawings follow. */
 14
 15:root {
 16  --ground: #eef2f3;
 17  --plot: #f8fafa;
 18  --panel: #e2e9ec;
 19  --rule: #c9d3d8;
 20  --ink: #0e1a24;
 21  --ink-2: #44525e;
 22  --ink-3: #5f6d78;
 23  --navy: #1d3557;
 24  --n1: #00797a;
 25  --n2: #b35c00;
 26  --n3: #5b3fb5;
 27  --refuse: #c2261b;
 28
 29  --c-keyword: #1d3557;
 30  --c-type: #5b3fb5;
 31  --c-function: #00696a;
 32  --c-string: #3c6a1c;
 33  --c-literal: #9a4f00;
 34
 35  --serif: Charter, "Bitstream Charter", "Iowan Old Style", "Sitka Text",
 36    Cambria, Georgia, serif;
 37  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
 38    "Liberation Mono", monospace;
 39  color-scheme: light dark;
 40}
 41
 42@media (prefers-color-scheme: dark) {
 43  :root {
 44    --ground: #0f1a22;
 45    --plot: #13212b;
 46    --panel: #172833;
 47    --rule: #2c3f4b;
 48    --ink: #dfe7eb;
 49    --ink-2: #a9b8c1;
 50    --ink-3: #8b9ba5;
 51    --navy: #9fb8dc;
 52    --n1: #42bdb5;
 53    --n2: #e89b50;
 54    --n3: #a990f2;
 55    --refuse: #ff6f61;
 56
 57    --c-keyword: #9fb8dc;
 58    --c-type: #b9a3f5;
 59    --c-function: #5cc7bf;
 60    --c-string: #9ccc78;
 61    --c-literal: #eaa865;
 62  }
 63}
 64
 65* { box-sizing: border-box; }
 66
 67html { -webkit-text-size-adjust: 100%; }
 68
 69body {
 70  margin: 0;
 71  background: var(--ground);
 72  color: var(--ink);
 73  font: 1.125rem/1.62 var(--serif);
 74  font-variant-numeric: lining-nums;
 75}
 76
 77a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 2px; }
 78a:hover { text-decoration-thickness: 2px; }
 79a:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: 2px; }
 80
 81::selection { background: color-mix(in srgb, var(--n1) 28%, transparent); }
 82
 83/* ---- the frame: a left-aligned column inside a wider page ---- */
 84
 85.top, main, footer, .run {
 86  max-width: 1100px;
 87  margin-left: auto;
 88  margin-right: auto;
 89  padding-left: 16px;
 90  padding-right: 16px;
 91}
 92
 93@media (min-width: 720px) {
 94  .top, main, footer, .run { padding-left: 48px; padding-right: 48px; }
 95}
 96
 97main > section > *, footer > p { max-width: 68ch; }
 98main > section > .run, main > section > .scroll { max-width: none; }
 99
100/* A run drawn inside a section is already inside main's padding. */
101main .run { padding-left: 0; padding-right: 0; margin-top: 28px; margin-bottom: 24px; }
102
103/* ---- header ---- */
104
105.top { padding-top: 40px; }
106
107.crumb {
108  margin: 0 0 28px;
109  color: var(--ink-3);
110  font-size: 0.95rem;
111}
112
113.crumb a { color: var(--ink-2); }
114
115h1 {
116  margin: 0;
117  max-width: 16ch;
118  font-size: clamp(2.3rem, 6.4vw, 4.1rem);
119  line-height: 1.02;
120  letter-spacing: -0.02em;
121  font-weight: 700;
122}
123
124.lede {
125  max-width: 62ch;
126  margin: 24px 0 0;
127  font-size: 1.22rem;
128  line-height: 1.55;
129  color: var(--ink-2);
130}
131
132/* ---- the run drawings ---- */
133
134.run { margin-top: 40px; margin-bottom: 8px; }
135.run.hero { margin-top: 44px; }
136
137.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
138
139.timeline {
140  display: block;
141  width: 100%;
142  min-width: 640px;
143  height: auto;
144  background: var(--plot);
145  border-top: 2px solid var(--ink);
146  border-bottom: 1px solid var(--rule);
147  font-family: var(--serif);
148}
149
150.timeline .grid { stroke: var(--rule); stroke-width: 1; }
151.timeline .tick { fill: var(--ink-3); font-size: 12px; }
152.timeline .host { fill: var(--ink); font-size: 13.5px; }
153.timeline .lane { stroke-width: 1.5; stroke-opacity: 0.55; }
154.timeline .lane.n1, .timeline .apply.n1 { stroke: var(--n1); }
155.timeline .lane.n2, .timeline .apply.n2 { stroke: var(--n2); }
156.timeline .lane.n3, .timeline .apply.n3 { stroke: var(--n3); }
157.timeline .apply { stroke-width: 1.5; }
158.timeline .leader.n1 { fill: var(--n1); }
159.timeline .leader.n2 { fill: var(--n2); }
160.timeline .leader.n3 { fill: var(--n3); }
161.timeline .candidate { fill: var(--plot); stroke-width: 1.5; }
162.timeline .candidate.n1 { stroke: var(--n1); }
163.timeline .candidate.n2 { stroke: var(--n2); }
164.timeline .candidate.n3 { stroke: var(--n3); }
165.timeline .role { fill: var(--plot); font-size: 13px; font-weight: 700; }
166.timeline .down { stroke: var(--rule); stroke-width: 1; }
167.timeline .hatch { stroke: var(--ink-3); stroke-width: 1.2; stroke-opacity: 0.6; }
168.timeline .downlabel { fill: var(--ink-3); font-size: 12px; font-style: italic; }
169.timeline .refuse { stroke: var(--refuse); stroke-width: 2; }
170.timeline .refuse-dot { fill: var(--plot); stroke: var(--refuse); stroke-width: 2.5; }
171.timeline .refuselabel { fill: var(--refuse); font-size: 13px; font-weight: 700; }
172.timeline .unread { fill: var(--plot); fill-opacity: 0.72; }
173.timeline .unreadlabel { fill: var(--ink-3); font-size: 12px; font-style: italic; }
174
175.run figcaption { max-width: 68ch; margin-top: 14px; font-size: 1rem; color: var(--ink-2); }
176.run figcaption p { margin: 0 0 8px; }
177.ok { color: var(--n1); }
178
179.key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
180.sw {
181  display: inline-block;
182  width: 22px;
183  height: 11px;
184  margin-right: 4px;
185  vertical-align: -1px;
186  border-radius: 2px;
187}
188.sw.leader { background: linear-gradient(90deg, var(--n1) 33%, var(--n2) 33% 66%, var(--n3) 66%); }
189.sw.candidate { border: 1.5px solid var(--ink-2); }
190.sw.down {
191  background: repeating-linear-gradient(45deg, var(--ink-3) 0 1.2px, transparent 1.2px 4.2px);
192  opacity: 0.7;
193}
194
195/* ---- sections ---- */
196
197main { padding-top: 24px; padding-bottom: 32px; }
198
199section { margin-top: 64px; }
200
201h2 {
202  display: flex;
203  align-items: baseline;
204  gap: 14px;
205  margin: 0 0 18px;
206  font-size: 1.75rem;
207  line-height: 1.2;
208  letter-spacing: -0.01em;
209}
210
211/* The numeral is a step of the pipeline, so it is drawn as one: the same
212   numbers as the list in "How a run becomes a verdict". */
213h2 .n {
214  flex: none;
215  display: inline-grid;
216  place-items: center;
217  width: 1.55em;
218  height: 1.55em;
219  border: 2px solid var(--ink);
220  border-radius: 50%;
221  font-size: 0.72em;
222  transform: translateY(-0.12em);
223}
224
225p { margin: 0 0 1em; }
226
227.small { font-size: 0.95rem; color: var(--ink-3); }
228
229/* ---- the pipeline: five steps, read left to right ---- */
230
231.pipeline {
232  list-style: none;
233  counter-reset: step;
234  margin: 24px 0 0;
235  padding: 0;
236  display: grid;
237  gap: 0;
238}
239
240.pipeline li {
241  counter-increment: step;
242  position: relative;
243  padding: 10px 0 14px 46px;
244  border-left: 2px solid var(--rule);
245  margin-left: 15px;
246  font-size: 1rem;
247  line-height: 1.45;
248  color: var(--ink-2);
249}
250
251.pipeline li::before {
252  content: counter(step);
253  position: absolute;
254  left: -16px;
255  top: 8px;
256  width: 30px;
257  height: 30px;
258  display: grid;
259  place-items: center;
260  background: var(--ground);
261  border: 2px solid var(--ink);
262  border-radius: 50%;
263  color: var(--ink);
264  font-weight: 700;
265  font-size: 0.9rem;
266}
267
268.pipeline li:last-child { border-left-color: transparent; }
269.pipeline b { color: var(--ink); }
270.pipeline a { text-decoration: none; }
271.pipeline a:hover b { text-decoration: underline; }
272
273/* ---- code ---- */
274
275figure { margin: 0; }
276
277figure.code { margin: 22px 0 26px; }
278
279pre {
280  margin: 0;
281  padding: 14px 16px;
282  overflow-x: auto;
283  background: var(--panel);
284  border-left: 3px solid var(--navy);
285  font: 0.84rem/1.55 var(--mono);
286  tab-size: 2;
287}
288
289pre.journal { font-size: 0.76rem; white-space: pre; }
290pre.shell { margin: 16px 0 22px; }
291
292figure.code figcaption {
293  margin-top: 8px;
294  font-size: 0.93rem;
295  color: var(--ink-3);
296}
297
298code { font-family: var(--mono); font-size: 0.88em; }
299pre code { font-size: inherit; }
300
301.keyword { color: var(--c-keyword); font-weight: 600; }
302.type { color: var(--c-type); font-weight: 600; }
303.type.builtin { font-style: italic; font-weight: 500; }
304.constructor { color: var(--c-literal); font-weight: 600; }
305.string, .string.special { color: var(--c-string); }
306.number, .constant, .constant.builtin { color: var(--c-literal); }
307.comment { color: var(--ink-3); font-style: italic; }
308.function, .function.builtin { color: var(--c-function); }
309.property, .property.builtin, .attribute, .operator { color: var(--ink-2); }
310.variable, .variable.builtin { color: var(--ink); }
311.variable.parameter { color: var(--ink-2); font-style: italic; }
312.punctuation, .punctuation.bracket, .punctuation.delimiter, .punctuation.special { color: var(--ink-3); }
313
314/* ---- definitions: the five properties, the four decisions ---- */
315
316.props { margin: 20px 0 24px; }
317.props dt { font-weight: 700; margin-top: 14px; }
318.props dd { margin: 2px 0 0; color: var(--ink-2); }
319
320/* ---- the sweep table ---- */
321
322table {
323  width: 100%;
324  min-width: 520px;
325  margin: 18px 0 10px;
326  border-collapse: collapse;
327  font-size: 0.98rem;
328}
329
330th, td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
331th { font-weight: 700; border-bottom: 2px solid var(--ink); }
332td.held { color: var(--ink); }
333td.broke { color: var(--refuse); font-weight: 700; }
334
335ul { padding-left: 1.2em; }
336li { margin-bottom: 0.5em; }
337
338footer {
339  margin-top: 40px;
340  padding-top: 20px;
341  padding-bottom: 48px;
342  border-top: 1px solid var(--rule);
343  font-size: 0.95rem;
344  color: var(--ink-3);
345}
346
347@media (max-width: 560px) {
348  body { font-size: 1.05rem; }
349  .lede { font-size: 1.1rem; }
350  section { margin-top: 48px; }
351  h2 { font-size: 1.5rem; }
352}