:root {
--bg: #07090f;
--bg-alt: #0e121b;
--text: #e8ebf2;
--muted: #8a93a6;
--line: #1c2331;

--accent: #7cc4ff;
--accent-2: #b794f6;

--mono: "JetBrains Mono", ui-monospace, monospace;
--sans: "Inter", system-ui, sans-serif;
}

/* ---------- Reset ---------- */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  }

html {
color-scheme: dark;
}

body {
min-height: 100vh;

background: var(--bg);
color: var(--text);

font-family: var(--sans);

-webkit-font-smoothing: antialiased;
}

button,
input,
select {
font: inherit;
}

/* ---------- Layout ---------- */

.page {
width: min(900px, calc(100% - 40px));

margin: 0 auto;

padding: 50px 0 70px;
}

.back {
display: inline-block;

margin-bottom: 70px;

color: var(--muted);

font-family: var(--mono);
font-size: .8rem;

transition: color .2s;
}

.back:hover {
color: var(--accent);
}

/* ---------- Header ---------- */

.eyebrow {
color: var(--accent);

font-family: var(--mono);
font-size: .8rem;

margin-bottom: 16px;
}

h1 {
font-size: clamp(2rem, 7vw, 3.5rem);

line-height: 1.1;

letter-spacing: -.04em;

margin-bottom: 16px;
}

.intro {
max-width: 650px;

color: var(--muted);

line-height: 1.7;

margin-bottom: 40px;
}

/* ---------- Simulation ---------- */

.simulation {
background: var(--bg-alt);

border: 1px solid var(--line);

border-radius: 16px;

padding: 20px;
}

.canvas-wrap {
position: relative;

width: 100%;

aspect-ratio: 16 / 10;

min-height: 380px;

overflow: hidden;

border: 1px solid var(--line);

background:
radial-gradient(
circle at center,
rgba(124, 196, 255, .035),
transparent 60%
),
#05070c;
}

canvas {
display: block;

width: 100%;
height: 100%;

cursor: crosshair;
}

.overlay {
position: absolute;

top: 12px;
left: 14px;

display: flex;
gap: 16px;

color: var(--muted);

font-family: var(--mono);
font-size: .68rem;

pointer-events: none;
}

.overlay strong {
color: var(--accent);

font-weight: 500;
}

/* ---------- Controls ---------- */

.controls {
display: grid;

grid-template-columns:
minmax(150px, 1.1fr)
minmax(180px, 1fr)
minmax(180px, 1fr)
minmax(180px, 1fr);

gap: 18px;

margin-top: 20px;
}

.control-group {
min-width: 0;
}

.control-group label {
display: block;

margin-bottom: 9px;

color: var(--muted);

font-family: var(--mono);
font-size: .7rem;
}

select {
width: 100%;

appearance: none;

border: 1px solid var(--line);

border-radius: 7px;

padding: 9px 11px;

background: #090c13;

color: var(--text);

outline: none;

cursor: pointer;
}

select:focus {
border-color: var(--accent);
}

.range-row {
display: flex;

align-items: center;

gap: 10px;
}

input[type="range"] {
width: 100%;

accent-color: var(--accent);

cursor: pointer;
}

output {
min-width: 42px;

color: var(--accent);

font-family: var(--mono);
font-size: .7rem;

text-align: right;
}

/* ---------- Buttons ---------- */

.buttons {
display: flex;

gap: 8px;

flex-wrap: wrap;

margin-top: 20px;
}

button.control {
appearance: none;

border: 1px solid var(--line);

background: transparent;

color: var(--text);

border-radius: 8px;

padding: 10px 16px;

font-family: var(--mono);
font-size: .76rem;

cursor: pointer;

transition:
border-color .2s,
background .2s,
transform .15s;
}

button.control:hover {
border-color: var(--accent);

background:
rgba(124, 196, 255, .08);
}

button.control:active {
transform: scale(.96);
}

button.control.primary {
background: var(--accent);

border-color: var(--accent);

color: #06121e;
}

/* ---------- Stats ---------- */

.stats {
display: grid;

grid-template-columns: repeat(3, 1fr);

gap: 10px;

margin-top: 18px;

padding-top: 15px;

border-top: 1px solid var(--line);

color: var(--muted);

font-family: var(--mono);

font-size: .7rem;
}

.stats span {
display: flex;

justify-content: space-between;

gap: 12px;
}

.stats strong {
color: var(--accent);

font-weight: 500;
}

/* ---------- Instructions ---------- */

.instructions {
display: flex;

gap: 22px;

margin-top: 14px;

color: var(--muted);

font-family: var(--mono);

font-size: .68rem;
}

.instructions p {
display: flex;

align-items: center;

gap: 7px;
}

.key {
padding: 3px 6px;

border: 1px solid var(--line);

border-radius: 4px;

color: var(--text);

background: var(--bg-alt);
}

/* ---------- Physics ---------- */

.physics {
margin-top: 55px;

padding-top: 30px;

border-top: 1px solid var(--line);
}

.physics h2 {
margin-bottom: 14px;

font-size: 1rem;
}

.physics p {
max-width: 700px;

color: var(--muted);

font-size: .9rem;

line-height: 1.75;

margin-bottom: 18px;
}

.physics em {
color: var(--text);
}

.equation {
width: fit-content;
max-width: 100%;

margin: 25px auto;

padding: 18px 25px;

border: 1px solid var(--line);

border-radius: 8px;

background: var(--bg-alt);

color: var(--text);

font-family: var(--mono);
font-size: clamp(.75rem, 2vw, 1rem);

overflow-x: auto;
}

/* ---------- Footer ---------- */

.footer {
display: flex;

justify-content: center;

gap: 10px;

margin-top: 55px;

color: var(--muted);

font-family: var(--mono);

font-size: .65rem;

opacity: .7;
}

/* ---------- Mobile ---------- */

@media (max-width: 760px) {

.page {
width: min(100% - 24px, 900px);

```
padding-top: 28px;
```

}

.back {
margin-bottom: 45px;
}

.simulation {
padding: 10px;
}

.canvas-wrap {
min-height: 300px;

```
aspect-ratio: 1 / 1;
```

}

.controls {
grid-template-columns: 1fr 1fr;
}

.stats {
grid-template-columns: 1fr;
}

.stats span {
justify-content: flex-start;

```
gap: 12px;
```

}

.instructions {
flex-wrap: wrap;

```
gap: 10px 18px;
```

}

}

@media (max-width: 480px) {

.controls {
grid-template-columns: 1fr;
}

.buttons {
display: grid;

```
grid-template-columns: 1fr 1fr;
```

}

button.control {
width: 100%;
}

.footer {
flex-wrap: wrap;
}

}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {

*,
*::before,
*::after {
transition: none !important;
}

}
.zoom-controls {
position: absolute;
right: 14px;
bottom: 14px;
display: flex;
gap: 5px;
}

.zoom-controls button {
width: 34px;
height: 34px;
padding: 0;
border: 1px solid var(--border);
border-radius: 0;
background: rgba(11, 15, 23, 0.92);
color: var(--text);
cursor: pointer;
font-family: "JetBrains Mono", monospace;
font-size: 0.8rem;
}

.zoom-controls button:hover {
border-color: var(--accent-border);
color: var(--accent);
}

.toggle {
min-height: 38px;
padding: 7px 14px;
border: 1px solid var(--accent-border);
border-radius: 0;
background: var(--accent-soft);
color: var(--accent);
cursor: pointer;
}

.toggle:hover {
background: rgba(124, 196, 255, 0.18);
}

.input-row {
display: flex;
align-items: center;
gap: 8px;
}

.input-row input {
width: 100%;
min-height: 38px;
padding: 7px 9px;
border: 1px solid var(--border);
border-radius: 0;
outline: none;
background: var(--panel-2);
color: var(--text);
font-family: "JetBrains Mono", monospace;
font-size: 0.78rem;
}

.input-row input:focus {
border-color: var(--accent-border);
}

.unit {
flex: 0 0 auto;
color: var(--muted);
font-family: "JetBrains Mono", monospace;
font-size: 0.7rem;
}

