-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathframework.css
More file actions
332 lines (309 loc) · 11.1 KB
/
framework.css
File metadata and controls
332 lines (309 loc) · 11.1 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
/* ============================================================
framework.css — shared styles for all framework deep-dive pages.
Per-page color identity is set via --page-accent / --page-accent-soft,
declared once at the top of each page's inline <style> block:
<style>:root{--page-accent:var(--purple);--page-accent-soft:var(--purple-soft)}</style>
<link rel="stylesheet" href="framework.css">
If a page forgets to declare --page-accent, it falls back to coral.
============================================================ */
:root {
--ink: #1c2230;
--ink-soft: #465065;
--line: #e3ddd0;
--paper: #faf7f0;
--card: #ffffff;
--accent: #b5482e;
--accent-soft: #fbeae4;
--gold: #9a7b2e;
--gold-soft: #f6efdc;
--teal: #1f6f6b;
--teal-soft: #e2f0ee;
--blue: #2d4a7c;
--blue-soft: #e6ecf6;
--purple: #5b3b78;
--purple-soft: #efe6f6;
--shadow: 0 1px 2px rgba(28,34,48,.06), 0 8px 24px rgba(28,34,48,.06);
/* Fallback page accent — overridden by each page's inline <style> */
--page-accent: var(--accent);
--page-accent-soft: var(--accent-soft);
}
* { box-sizing: border-box }
body {
margin: 0;
background: var(--paper);
color: var(--ink);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
line-height: 1.62;
font-size: 16px;
-webkit-font-smoothing: antialiased;
}
.wrap { max-width: 920px; margin: 0 auto; padding: 0 24px 96px }
/* ===== Masthead ===== */
header.masthead { border-bottom: 3px solid var(--ink); margin-bottom: 8px; padding: 48px 0 22px }
.kicker { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--page-accent); font-weight: 700; margin: 0 0 10px }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: 40px; line-height: 1.08; margin: 0 0 12px; letter-spacing: -.01em }
h1 .srcyr {
display: inline-block;
background: var(--gold-soft);
color: #7a5a08;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
font-size: 14px;
font-weight: 700;
padding: 3px 10px;
border-radius: 6px;
vertical-align: middle;
margin-left: 10px;
letter-spacing: .04em;
border: 1px solid #d8c98f;
text-transform: uppercase;
}
h1 .srcyr::before { content: "Source · " }
.sub { color: var(--ink-soft); margin: 0; max-width: 64ch }
/* ===== Goal callout ===== */
.goal {
margin-top: 18px;
background: var(--page-accent-soft);
border: 1px solid var(--line);
border-left: 5px solid var(--page-accent);
border-radius: 10px;
padding: 13px 18px;
font-size: 15px;
}
.goal span { color: var(--page-accent); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 800 }
/* ===== Sticky in-page TOC ===== */
nav.toc {
position: sticky;
top: 0;
background: rgba(250,247,240,.92);
backdrop-filter: blur(6px);
border-bottom: 1px solid var(--line);
padding: 12px 0;
margin-bottom: 34px;
z-index: 5;
font-size: 14px;
}
nav.toc a { color: var(--ink-soft); text-decoration: none; margin-right: 16px; white-space: nowrap }
nav.toc a:hover { color: var(--page-accent) }
/* ===== Finding / honest headline dark box ===== */
.finding {
background: var(--ink);
color: #f3efe6;
border-radius: 14px;
padding: 24px 28px;
margin: 0 0 36px;
box-shadow: var(--shadow);
}
.finding h2 { color: #fff; margin: 0 0 8px; font-family: Georgia, serif; font-size: 21px }
.finding p { margin: 0 0 10px; color: #cfc9bb }
.finding p:last-child { margin: 0 }
.finding b { color: #f3d9a0 }
.finding code {
background: #2a3247;
color: #f3d9a0;
padding: 2px 7px;
border-radius: 5px;
font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
font-size: 14px;
}
/* ===== Section headers ===== */
h2.sec {
font-family: Georgia, serif;
font-size: 26px;
margin: 40px 0 6px;
padding-top: 18px;
border-top: 2px solid var(--line);
}
/* ===== Anchor-target offset =====
The sticky nav.toc covers an element when you anchor-jump to it.
scroll-padding-top on the scroll container (html) is the most robust fix:
it applies to EVERY anchor jump regardless of the target selector, so it
handles same-page #links AND cross-page jargon.html#term jumps uniformly.
80px = nav.toc (~46px) + breathing room. Belt-and-suspenders: also set
scroll-margin-top on common targets in case scroll-padding-top is ignored. */
html { scroll-padding-top: 56px; }
.wrap [id], h2.sec, .term, .finding { scroll-margin-top: 56px; }
.secsub { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 18px; max-width: 68ch }
p { margin: 0 0 14px }
/* ===== 8th-grade version block ===== */
.eli {
background: #fff8e1;
border: 1px solid #f3d9a0;
border-left: 5px solid var(--gold);
border-radius: 12px;
padding: 18px 22px;
margin: 18px 0 28px;
font-size: 15.5px;
line-height: 1.6;
box-shadow: var(--shadow);
}
.eli .lbl {
display: inline-block;
background: var(--gold);
color: #fff;
font-size: 10.5px;
font-weight: 800;
letter-spacing: .08em;
text-transform: uppercase;
padding: 3px 10px;
border-radius: 5px;
margin-bottom: 10px;
}
.eli p { margin: 0; color: var(--ink) }
.eli p + p { margin-top: 8px }
.eli b { color: var(--page-accent) }
/* ===== Generic callouts ===== */
.note { background: var(--blue-soft); border-left: 4px solid var(--blue); border-radius: 8px; padding: 14px 18px; margin: 18px 0; font-size: 14.5px }
.note b { color: var(--blue) }
.warn { background: #f7e9d6; border-left: 4px solid #c97f1a; border-radius: 8px; padding: 14px 18px; margin: 18px 0; font-size: 14.5px; color: #5b3b08 }
.warn b { color: #9a4e08 }
/* ===== "Our pick" callout — used by ~18 pages, always teal regardless of page-accent ===== */
.ours { background: var(--teal-soft); border-left: 5px solid var(--teal); border-radius: 10px; padding: 18px 22px; margin: 18px 0 }
.ours h3 { margin: 0 0 8px; color: var(--teal); font-size: 18px; font-family: Georgia, serif }
.ours .draft {
font-size: 11px;
background: var(--teal);
color: #fff;
padding: 3px 9px;
border-radius: 5px;
text-transform: uppercase;
letter-spacing: .06em;
font-weight: 700;
}
.ours code {
font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
font-size: 13px;
background: #fff;
border: 1px solid #bcdcd8;
border-radius: 5px;
padding: 2px 7px;
}
/* ===== Numbered step boxes — used by 17 pages; border + number color match page-accent ===== */
.step {
display: flex;
gap: 16px;
background: #fff;
border: 1px solid var(--line);
border-radius: 12px;
padding: 18px 20px;
margin: 12px 0;
box-shadow: var(--shadow);
border-left: 5px solid var(--page-accent);
}
.step .num {
font-family: Georgia, serif;
font-size: 28px;
font-weight: 700;
color: var(--page-accent);
line-height: 1;
min-width: 30px;
}
.step h3 { margin: 0 0 5px; font-size: 17px }
.step p { margin: 0; font-size: 14.5px; color: var(--ink-soft) }
.step p b { color: var(--ink) }
/* ===== Source citation links (always teal → coral, page-accent-agnostic) ===== */
a.cite { color: var(--teal); text-decoration: none; border-bottom: 1px solid var(--teal) }
a.cite:hover { color: var(--accent); border-color: var(--accent) }
.src { font-size: 13px; color: var(--ink-soft); margin-top: 10px }
/* ===== Jargon link-outs (body-text glossary cross-references) =====
Subtle: reads as annotated body text, not a competing call-to-action. The
dotted underline signals "click for a definition." Hover reveals the page
accent so it matches the rest of the page's color identity. */
a.j { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--ink-soft); }
a.j:hover { color: var(--page-accent); border-bottom: 1px solid var(--page-accent); }
/* ===== Blockquote (used in AI lab pages) ===== */
blockquote {
margin: 14px 0;
padding: 12px 18px;
border-left: 3px solid var(--page-accent);
background: var(--page-accent-soft);
font-style: italic;
color: var(--ink);
font-size: 15px;
border-radius: 0 8px 8px 0;
}
blockquote .cred {
display: block;
margin-top: 6px;
font-style: normal;
font-size: 12.5px;
color: var(--ink-soft);
letter-spacing: .02em;
}
/* ===== Worked-example tables ===== */
.extable { overflow-x: auto; margin: 14px 0 }
table.ex {
border-collapse: collapse;
width: 100%;
font-size: 13.5px;
background: #fff;
border: 1px solid var(--line);
border-radius: 10px;
overflow: hidden;
}
table.ex th, table.ex td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top }
table.ex thead th { background: var(--ink); color: #f3efe6; font-size: 12px; letter-spacing: .05em; text-transform: uppercase }
table.ex tbody tr:last-child td { border-bottom: none }
table.ex tbody tr:hover { background: #f6f4ee }
table.ex td:first-child { font-weight: 600 }
table.ex td.score { font-family: Georgia, serif; font-size: 15px; color: var(--page-accent); font-weight: 700; text-align: center }
table.ex tbody tr.top { background: var(--page-accent-soft) }
table.ex tbody tr.top td.score { color: var(--page-accent) }
/* ===== Footer ===== */
footer { border-top: 1px solid var(--line); padding-top: 20px; color: var(--ink-soft); font-size: 13px; margin-top: 44px }
footer a { color: var(--teal) }
/* ============================================================
Site nav (fixed dropdown — appears identically on every page).
Originally duplicated inline in every page; now lives here once.
============================================================ */
nav.sitenav {
position: fixed;
top: 12px;
right: 16px;
z-index: 100;
font-size: 13px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
nav.sitenav details { background: #1c2230; color: #f3efe6; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.22) }
nav.sitenav summary { list-style: none; cursor: pointer; padding: 8px 14px; font-weight: 700; letter-spacing: .04em; user-select: none }
nav.sitenav summary::-webkit-details-marker { display: none }
nav.sitenav summary::after { content: " \25BE"; color: #cfc9bb; font-size: 10px; margin-left: 2px }
nav.sitenav details[open] summary::after { content: " \25B4" }
nav.sitenav .navmenu {
position: absolute;
top: calc(100% + 6px);
right: 0;
background: #fff;
color: #1c2230;
border: 1px solid #e3ddd0;
border-radius: 10px;
padding: 16px 18px;
box-shadow: 0 8px 28px rgba(28,34,48,.22);
display: grid;
grid-template-columns: repeat(2, minmax(180px, 1fr));
gap: 14px 26px;
min-width: 400px;
max-width: 92vw;
max-height: 80vh;
overflow-y: auto;
}
nav.sitenav .navgrp h4 {
margin: 0 0 5px;
font-size: 10.5px;
letter-spacing: .09em;
text-transform: uppercase;
color: #465065;
font-weight: 700;
border-bottom: 1px solid #e3ddd0;
padding-bottom: 4px;
}
nav.sitenav .navgrp a { display: block; color: #1c2230; text-decoration: none; font-size: 13px; padding: 2px 0; line-height: 1.5 }
nav.sitenav .navgrp a:hover { color: #b5482e }
nav.sitenav .navgrp a.cur { font-weight: 700; color: #b5482e }
/* ===== Mobile ===== */
@media (max-width: 680px) {
h1 { font-size: 30px }
}
@media (max-width: 600px) {
nav.sitenav .navmenu { grid-template-columns: 1fr; min-width: 240px; max-width: 88vw }
nav.sitenav { top: 8px; right: 8px }
}