2 --bg: #fafaf7;
3 --fg: #1d1d1f;
4 --accent: #2f5d8a;
5 --force: #c0392b;
6 --momentum: #2e8b57;
7 --potential: #c98a1b;
8}
10@media (prefers-color-scheme: dark) {
11 :root {
12 --bg: #141416;
13 --fg: #e8e8ea;
14 --accent: #7fb0e0;
15 --force: #ec7063;
16 --momentum: #58d68d;
17 --potential: #f0b450;
18 }
19}
21* { box-sizing: border-box; }
23body {
24 margin: 0;
25 background: var(--bg);
26 color: var(--fg);
27 font-family: system-ui, -apple-system, sans-serif;
28}
30main {
31 min-height: 100vh;
32 display: flex;
33 align-items: flex-start;
34 justify-content: center;
35 padding: 64px 16px 16px;
36}
38/* Slide titles sit at the top; only the title slide is centered vertically. */
39#landing { align-self: center; }
41.page { display: none; text-align: center; width: 100%; max-width: 720px; }
42.page.active { display: block; }
44/* Slides: text and equations on the left, interactive content on the right.
45 On narrow screens they stack, with the interactive part first. */
46.page.split, .page.text-only { max-width: 1200px; }
48.page.split.active {
49 display: grid;
50 grid-template-columns: 1fr 1fr;
51 grid-template-areas: "title title" "text demo";
52 gap: 0 3rem;
53 align-items: start;
54}
56.page.split > h2 { grid-area: title; }
57.page.split > .text { grid-area: text; text-align: left; }
58.page.split > .demo { grid-area: demo; min-width: 0; }
60/* On desktop the slide fills the window below the nav bar, and the two
61 panels scroll independently. */
62@media (min-width: 861px) {
63 .page.split.active {
64 height: calc(100vh - 64px - 16px);
65 grid-template-rows: auto minmax(0, 1fr);
66 }
67 .page.split > .text,
68 .page.split > .demo {
69 height: 100%;
70 overflow-y: auto;
71 padding: 0 8px 16px;
72 }
73}
75@media (max-width: 860px) {
76 .page.split.active {
77 grid-template-columns: 1fr;
78 grid-template-areas: "title" "demo" "text";
79 }
80 .page.split > .text { margin-top: 1.5rem; }
81}
83.pager {
84 position: fixed;
85 top: 0;
86 left: 0;
87 right: 0;
88 z-index: 1;
89 display: flex;
90 align-items: center;
91 justify-content: space-between;
92 padding: 10px 16px;
93 background: var(--bg);
94 border-bottom: 1px solid color-mix(in srgb, var(--fg) 12%, transparent);
95}
97.pager button { padding: 0.35rem 0.8rem; font-size: 0.9rem; }
98.pager button:disabled { opacity: 0.3; cursor: default; background: none; color: var(--accent); }
99#nav-pos { font-size: 0.85rem; opacity: 0.6; }
101h2 {
102 font-weight: 500;
103 font-size: clamp(1.2rem, 4vw, 1.6rem);
104 margin: 0 0 1.5rem;
105}
107canvas {
108 display: block;
109 width: 100%;
110 height: 200px;
111 margin: 0 0 1.5rem;
112}
114canvas.bars { height: 100px; margin-top: -0.5rem; }
115canvas.phase { height: 260px; }
116canvas.pendulum { height: 260px; }
117canvas.pendulum-centered { height: 240px; }
119.preset { display: inline-flex; align-items: center; gap: 0.5rem; }
121select {
122 font: inherit;
123 color: var(--fg);
124 background: var(--bg);
125 border: 1px solid var(--accent);
126 border-radius: 6px;
127 padding: 0.35rem 0.5rem;
128}
130.q0-row { text-align: left; margin-top: -1.25rem; }
131.q0-row input { display: block; margin: 0; }
132.slider-caption { margin: 0.25rem 0 1rem; font-size: 0.9rem; opacity: 0.8; }
134.controls {
135 display: flex;
136 justify-content: center;
137 flex-wrap: wrap;
138 gap: 0.5rem 2rem;
139 margin: 0 0 1.25rem;
140}
142.controls label { display: flex; align-items: center; gap: 0.5rem; }
143.controls output { min-width: 2.5em; text-align: left; font-variant-numeric: tabular-nums; }
145input[type="range"] { accent-color: var(--accent); }
147h1 {
148 font-weight: 500;
149 font-size: clamp(1.6rem, 5vw, 2.6rem);
150 margin: 0 0 1.5rem;
151}
153button {
154 font: inherit;
155 color: var(--accent);
156 background: none;
157 border: 1px solid var(--accent);
158 border-radius: 6px;
159 padding: 0.6rem 1.2rem;
160 cursor: pointer;
161}
163button:hover { background: var(--accent); color: var(--bg); }
165/* The suggested next step: hidden until the user has tried the demo, then filled and pulsing gently. */
166button.next {
167 margin-top: 1.5rem;
168 background: var(--accent);
169 color: var(--bg);
170 visibility: hidden;
171 opacity: 0;
172 transition: opacity 0.6s;
173}
175button.next.ready {
176 visibility: visible;
177 opacity: 1;
178 animation: pulse 2s ease-in-out 0.6s 3;
179}
181button.next:hover { opacity: 0.85; }
183@keyframes pulse {
184 0%, 100% { box-shadow: 0 0 0 0 var(--accent); }
185 50% { box-shadow: 0 0 0 6px transparent; }
186}
188.equations {
189 text-align: left;
190 margin: 0;
191 line-height: 1.6;
192 display: grid;
193 grid-template-columns: 1fr 1fr;
194 gap: 0 2.5rem;
195}
197.equations[hidden] { display: none; }
199.equations > div > :first-child { margin-top: 0; }
201/* Two columns of equations only when the text panel is wide enough. */
202@media (max-width: 1100px) and (min-width: 861px), (max-width: 600px) {
203 .equations { grid-template-columns: 1fr; }
204 .equations > div + div { margin-top: 1.5rem; }
205}
207.equations h3 {
208 font-weight: 500;
209 font-size: 1.05rem;
210 margin: 1.5rem 0 0.25rem;
211}
213button.link {
214 border: none;
215 padding: 0.3rem 0;
216 text-decoration: underline;
217 text-underline-offset: 3px;
218}
220button.link:hover { background: none; color: var(--accent); opacity: 0.8; }
222.exercise {
223 text-align: left;
224 margin: 2rem 0 0;
225 padding: 1rem 1.25rem;
226 border-left: 3px solid var(--accent);
227 line-height: 1.6;
228}
230.exercise h3 {
231 font-weight: 500;
232 font-size: 1.05rem;
233 margin: 0 0 0.25rem;
234}
236.defs {
237 list-style: none;
238 padding: 0;
239 margin: 0;
240}
242.defs li { margin: 0.35rem 0; }