:root { --bg: #fafaf7; --fg: #1d1d1f; --accent: #2f5d8a; --force: #c0392b; --momentum: #2e8b57; --potential: #c98a1b; } @media (prefers-color-scheme: dark) { :root { --bg: #141416; --fg: #e8e8ea; --accent: #7fb0e0; --force: #ec7063; --momentum: #58d68d; --potential: #f0b450; } } * { box-sizing: border-box; } body { margin: 0; background: var(--bg); color: var(--fg); font-family: system-ui, -apple-system, sans-serif; } main { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 64px 16px 16px; } /* Slide titles sit at the top; only the title slide is centered vertically. */ #landing { align-self: center; } .page { display: none; text-align: center; width: 100%; max-width: 720px; } .page.active { display: block; } /* Slides: text and equations on the left, interactive content on the right. On narrow screens they stack, with the interactive part first. */ .page.split, .page.text-only { max-width: 1200px; } .page.split.active { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "title title" "text demo"; gap: 0 3rem; align-items: start; } .page.split > h2 { grid-area: title; } .page.split > .text { grid-area: text; text-align: left; } .page.split > .demo { grid-area: demo; min-width: 0; } /* On desktop the slide fills the window below the nav bar, and the two panels scroll independently. */ @media (min-width: 861px) { .page.split.active { height: calc(100vh - 64px - 16px); grid-template-rows: auto minmax(0, 1fr); } .page.split > .text, .page.split > .demo { height: 100%; overflow-y: auto; padding: 0 8px 16px; } } @media (max-width: 860px) { .page.split.active { grid-template-columns: 1fr; grid-template-areas: "title" "demo" "text"; } .page.split > .text { margin-top: 1.5rem; } } .pager { position: fixed; top: 0; left: 0; right: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid color-mix(in srgb, var(--fg) 12%, transparent); } .pager button { padding: 0.35rem 0.8rem; font-size: 0.9rem; } .pager button:disabled { opacity: 0.3; cursor: default; background: none; color: var(--accent); } #nav-pos { font-size: 0.85rem; opacity: 0.6; } h2 { font-weight: 500; font-size: clamp(1.2rem, 4vw, 1.6rem); margin: 0 0 1.5rem; } canvas { display: block; width: 100%; height: 200px; margin: 0 0 1.5rem; } canvas.bars { height: 100px; margin-top: -0.5rem; } canvas.phase { height: 260px; } canvas.pendulum { height: 260px; } canvas.pendulum-centered { height: 240px; } .preset { display: inline-flex; align-items: center; gap: 0.5rem; } select { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--accent); border-radius: 6px; padding: 0.35rem 0.5rem; } .q0-row { text-align: left; margin-top: -1.25rem; } .q0-row input { display: block; margin: 0; } .slider-caption { margin: 0.25rem 0 1rem; font-size: 0.9rem; opacity: 0.8; } .controls { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem 2rem; margin: 0 0 1.25rem; } .controls label { display: flex; align-items: center; gap: 0.5rem; } .controls output { min-width: 2.5em; text-align: left; font-variant-numeric: tabular-nums; } input[type="range"] { accent-color: var(--accent); } h1 { font-weight: 500; font-size: clamp(1.6rem, 5vw, 2.6rem); margin: 0 0 1.5rem; } button { font: inherit; color: var(--accent); background: none; border: 1px solid var(--accent); border-radius: 6px; padding: 0.6rem 1.2rem; cursor: pointer; } button:hover { background: var(--accent); color: var(--bg); } /* The suggested next step: hidden until the user has tried the demo, then filled and pulsing gently. */ button.next { margin-top: 1.5rem; background: var(--accent); color: var(--bg); visibility: hidden; opacity: 0; transition: opacity 0.6s; } button.next.ready { visibility: visible; opacity: 1; animation: pulse 2s ease-in-out 0.6s 3; } button.next:hover { opacity: 0.85; } @keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--accent); } 50% { box-shadow: 0 0 0 6px transparent; } } .equations { text-align: left; margin: 0; line-height: 1.6; display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.5rem; } .equations[hidden] { display: none; } .equations > div > :first-child { margin-top: 0; } /* Two columns of equations only when the text panel is wide enough. */ @media (max-width: 1100px) and (min-width: 861px), (max-width: 600px) { .equations { grid-template-columns: 1fr; } .equations > div + div { margin-top: 1.5rem; } } .equations h3 { font-weight: 500; font-size: 1.05rem; margin: 1.5rem 0 0.25rem; } button.link { border: none; padding: 0.3rem 0; text-decoration: underline; text-underline-offset: 3px; } button.link:hover { background: none; color: var(--accent); opacity: 0.8; } .exercise { text-align: left; margin: 2rem 0 0; padding: 1rem 1.25rem; border-left: 3px solid var(--accent); line-height: 1.6; } .exercise h3 { font-weight: 500; font-size: 1.05rem; margin: 0 0 0.25rem; } .defs { list-style: none; padding: 0; margin: 0; } .defs li { margin: 0.35rem 0; }