Simulation · project 01 of 19
Reverse osmosis lab.
Run a reverse-osmosis membrane yourself, in 3D.
How to use it
- Open the lab and pick a starting water: brackish groundwater, seawater or water reuse.
- Move feed pressure, salinity and recovery one at a time and watch the flux, salt rejection and energy numbers change.
- Drop the pressure below the osmotic pressure to see the membrane stop producing water.
- Switch the energy recovery device on and off to see what it does to the energy bill.
Where it helps most
- Explaining reverse osmosis to a board, a class or a new operator in five minutes.
- Building a feel for the trade-off between recovery, pressure and energy before opening a design tool.
- A starting point for any "set the inputs, watch the physics" teaching simulation.
The idea
Reverse osmosis is my field, and it is hard to explain with words. I wanted a 3D membrane anyone can operate: set the pressure, the salinity and the recovery, and see what happens to the water, the salt and the energy bill.
The build
Claude wrote a solution-diffusion model with concentration polarization, checked it against typical brackish, seawater and reuse operating points, drew the membrane channel in three.js with water molecules crossing and salt ions held back, and deployed it on sghadimi.com.
Free to take
Build your own.
Copy the skill, paste it into your own AI, and say what you want different. How to use a skill, step by step ›
Get the skillThe instructions your AI follows. Works in Claude, ChatGPT, Gemini or any other
You are a membrane process engineer and a three.js developer. Build an interactive 3D reverse-osmosis lab as a small web page.
Model (put it in its own module so it can be tested):
- Inputs: feed pressure (bar), feed salinity (mg/L as NaCl), recovery (%), membrane type (brackish: A = 3.5 LMH/bar, B = 0.25 LMH; seawater: A = 1.0, B = 0.08), energy recovery on/off.
- Osmotic pressure: 0.789 bar per g/L NaCl at 25 °C.
- Bulk salinity along the channel: feed × ln(1/(1−R))/R. Concentration polarization by film theory: wall = bulk × exp(Jw/k), k = 100 LMH.
- Water flux Jw = A × (P − 0.5 − (π_wall − π_permeate)); permeate salinity = B × wall / (Jw + B). Solve by iteration.
- Outputs: flux, permeate salinity, rejection, concentrate salinity, net driving pressure, specific energy = P/(36 × 0.8 × R) kWh/m³, or P/(36 × 0.8) × (1 + 0.05 × (1−R)/R) with energy recovery.
- If pressure does not beat osmotic pressure, flux is zero: say so in plain words. Warn on high flux and high recovery.
3D view (three.js from local files, no CDN):
- A cut-away channel with a membrane sheet in the middle. Feed side above, permeate side below.
- Instanced spheres: small blue water molecules and larger orange salt ions flow along the feed side. Water crosses the membrane with a probability proportional to flux; salt bounces off, crossing only rarely in proportion to salt passage. More salt spheres at higher salinity.
- Drag to rotate. Keep it smooth on a phone.
Page: sliders for pressure, salinity and recovery, a membrane selector, three presets (brackish groundwater, seawater, water reuse), a bar comparing applied pressure with osmotic pressure, six readout tiles and a one-line status. State clearly that it is a simplified teaching model, not a design tool. The calculator must still work if WebGL is unavailable.
Get the code4 files, exactly as they run on this site
model.js (the engineering)55 lines
// Reverse-osmosis model: solution-diffusion transport with film-theory
// concentration polarization. Simplified for illustration, not for design.
// Units: pressure bar, salinity mg/L as NaCl, flux L/m²/h (LMH), energy kWh/m³.
export const MEMBRANES = {
brackish: { name: 'Brackish-water membrane', A: 3.5, B: 0.25, fluxLimit: 30 },
seawater: { name: 'Seawater membrane', A: 1.0, B: 0.08, fluxLimit: 20 }
};
export const PRESETS = {
brackish: { label: 'Brackish groundwater', salinity: 3000, pressure: 12, recovery: 80, membrane: 'brackish', erd: false },
seawater: { label: 'Seawater', salinity: 35000, pressure: 60, recovery: 45, membrane: 'seawater', erd: true },
reuse: { label: 'Water reuse', salinity: 1000, pressure: 9, recovery: 85, membrane: 'brackish', erd: false }
};
// Osmotic pressure of NaCl at 25 °C: van 't Hoff with an osmotic coefficient of 0.93.
export const osmotic = mgL => 0.789 * mgL / 1000;
const K_MASS_TRANSFER = 100; // LMH, feed-channel mass-transfer coefficient
const CHANNEL_LOSS = 1; // bar, feed-to-concentrate pressure drop
const PUMP_EFF = 0.8, ERD_EFF = 0.95;
export function roModel({ pressure, salinity, recovery, membrane = 'brackish', erd = false }) {
const m = MEMBRANES[membrane], R = Math.min(0.95, Math.max(0.01, recovery / 100));
// Average salinity along the feed channel as water is removed (log-mean).
const bulk = salinity * Math.log(1 / (1 - R)) / R;
let flux = 10, permeate = 0, beta = 1, wall = bulk;
for (let i = 0; i < 40; i++) {
beta = Math.exp(flux / K_MASS_TRANSFER); // salt builds up at the membrane wall
wall = bulk * beta;
permeate = m.B * wall / (flux + m.B); // salt flux / water flux
const ndp = pressure - CHANNEL_LOSS / 2 - (osmotic(wall) - osmotic(permeate));
const next = Math.max(0, m.A * ndp);
flux += (next - flux) * 0.5;
if (flux < 1e-4) { flux = 0; break; }
}
const osmoticWall = osmotic(bulk * Math.exp(flux / K_MASS_TRANSFER));
const ndp = pressure - CHANNEL_LOSS / 2 - (osmoticWall - osmotic(flux > 0 ? permeate : 0));
const running = flux > 0.5; // below this only a salty trickle diffuses through
if (!running) { flux = 0; permeate = 0; }
const rejection = running ? 1 - permeate / salinity : 0;
const concentrate = running ? (salinity - R * permeate) / (1 - R) : salinity;
const base = pressure / (36 * PUMP_EFF); // 1 bar·m³ = 1/36 kWh
const energy = running ? (erd ? base * (1 + (1 - ERD_EFF) * (1 - R) / R) : base / R) : 0;
const notes = [];
if (!running) notes.push('No clean water: the pressure is below the osmotic pressure at the membrane. Raise the pressure or lower the recovery.');
else {
if (flux > m.fluxLimit) notes.push('Flux is high for this membrane. A real plant would foul quickly here.');
if (R >= 0.8) notes.push('High recovery concentrates scale-forming salts. Real plants dose antiscalant.');
if (permeate > 500) notes.push('Permeate is above 500 mg/L, a common drinking-water guideline for dissolved solids.');
if (!notes.length) notes.push('Running well: pressure beats osmotic pressure, salt stays on the feed side.');
}
return { running, flux, permeate, rejection, concentrate, energy, ndp, osmoticWall, osmoticFeed: osmotic(salinity), beta, notes, membrane: m };
}
ro.js (3D + controls)154 lines
// Reverse osmosis lab: UI + a 3D cut-away of a membrane channel driven by model.js.
import * as THREE from '../../vendor/three/three.module.min.js';
import { roModel, PRESETS } from './model.js';
const $ = id => document.getElementById(id);
const inputs = { pressure: $('pressure'), salinity: $('salinity'), recovery: $('recovery'), membrane: $('membrane'), erd: $('erd') };
const fmt = (n, d = 0) => n.toLocaleString('en-US', { minimumFractionDigits: d, maximumFractionDigits: d });
let result = null;
function read() {
return { pressure: +inputs.pressure.value, salinity: +inputs.salinity.value, recovery: +inputs.recovery.value, membrane: inputs.membrane.value, erd: inputs.erd.checked };
}
function update() {
const s = read();
result = roModel(s);
$('pressure-out').textContent = fmt(s.pressure, 1) + ' bar';
$('salinity-out').textContent = fmt(s.salinity) + ' mg/L';
$('recovery-out').textContent = fmt(s.recovery) + ' %';
$('r-flux').textContent = fmt(result.flux, 1);
$('r-perm').textContent = result.running ? fmt(result.permeate) : '–';
$('r-rej').textContent = result.running ? fmt(result.rejection * 100, 1) : '–';
$('r-energy').textContent = result.running ? fmt(result.energy, 2) : '–';
$('r-ndp').textContent = fmt(result.ndp, 1);
$('r-conc').textContent = fmt(result.concentrate);
$('meter-p').style.width = Math.min(100, s.pressure / 80 * 100) + '%';
$('meter-osm').style.width = Math.min(100, result.osmoticWall / 80 * 100) + '%';
const status = $('status');
status.textContent = result.notes.join(' ');
status.classList.toggle('is-stop', !result.running);
}
function applyPreset(key) {
const p = PRESETS[key];
inputs.pressure.value = p.pressure; inputs.salinity.value = p.salinity; inputs.recovery.value = p.recovery;
inputs.membrane.value = p.membrane; inputs.erd.checked = p.erd;
document.querySelectorAll('[data-preset]').forEach(b => b.setAttribute('aria-pressed', String(b.dataset.preset === key)));
update();
}
document.querySelectorAll('[data-preset]').forEach(b => b.addEventListener('click', () => applyPreset(b.dataset.preset)));
Object.values(inputs).forEach(el => el.addEventListener('input', () => {
document.querySelectorAll('[data-preset]').forEach(b => b.setAttribute('aria-pressed', 'false'));
update();
}));
applyPreset('brackish');
// ---------- 3D channel ----------
function scene3d() {
const host = $('stage');
const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
renderer.setPixelRatio(Math.min(window.devicePixelRatio || 1, 1.75));
host.appendChild(renderer.domElement);
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(40, 1, 0.1, 100);
const rig = new THREE.Group(); scene.add(rig);
scene.add(new THREE.HemisphereLight(0xcfe6ff, 0x0a1430, 1.5));
const sun = new THREE.DirectionalLight(0xffffff, 1.6); sun.position.set(3, 6, 5); scene.add(sun);
const LX = 4, LZ = 1.2, TOP = 1.7, BOT = -1.5;
// Membrane sheet with a pore-like grid
const c = document.createElement('canvas'); c.width = 256; c.height = 128;
const g = c.getContext('2d'); g.fillStyle = '#b98a2c'; g.fillRect(0, 0, 256, 128);
g.fillStyle = 'rgba(40,24,0,.55)';
for (let x = 4; x < 256; x += 8) for (let y = 4; y < 128; y += 8) { g.beginPath(); g.arc(x, y, 1.6, 0, 7); g.fill(); }
const tex = new THREE.CanvasTexture(c); tex.colorSpace = THREE.SRGBColorSpace; tex.wrapS = tex.wrapT = THREE.RepeatWrapping; tex.repeat.set(3, 2);
const membrane = new THREE.Mesh(new THREE.BoxGeometry(LX * 2, 0.12, LZ * 2),
new THREE.MeshStandardMaterial({ map: tex, transparent: true, opacity: 0.86, roughness: 0.6, emissive: 0x3a2600, emissiveIntensity: 0.6 }));
rig.add(membrane);
// Channel outline
const outline = new THREE.LineSegments(new THREE.EdgesGeometry(new THREE.BoxGeometry(LX * 2, TOP - BOT, LZ * 2)), new THREE.LineBasicMaterial({ color: 0x38d6ff, transparent: true, opacity: 0.35 }));
outline.position.y = (TOP + BOT) / 2; rig.add(outline);
const feedTint = new THREE.Mesh(new THREE.BoxGeometry(LX * 2, TOP, LZ * 2), new THREE.MeshBasicMaterial({ color: 0xff9d5c, transparent: true, opacity: 0.045, depthWrite: false }));
feedTint.position.y = TOP / 2; rig.add(feedTint);
const permTint = new THREE.Mesh(new THREE.BoxGeometry(LX * 2, -BOT, LZ * 2), new THREE.MeshBasicMaterial({ color: 0x38d6ff, transparent: true, opacity: 0.06, depthWrite: false }));
permTint.position.y = BOT / 2; rig.add(permTint);
const NW = 340, NS = 150;
const water = new THREE.InstancedMesh(new THREE.SphereGeometry(0.055, 10, 8), new THREE.MeshStandardMaterial({ color: 0x58c8ff, emissive: 0x0b3a66, roughness: 0.35 }), NW);
const salt = new THREE.InstancedMesh(new THREE.SphereGeometry(0.1, 12, 10), new THREE.MeshStandardMaterial({ color: 0xff9d5c, emissive: 0x5a2400, roughness: 0.5 }), NS);
rig.add(water, salt);
const rnd = (a, b) => a + Math.random() * (b - a);
const mk = n => Array.from({ length: n }, () => ({ x: rnd(-LX, LX), y: rnd(0.15, TOP - 0.1), z: rnd(-LZ + 0.1, LZ - 0.1), vy: 0, side: 0, sp: rnd(0.7, 1.3) }));
const W = mk(NW), S = mk(NS);
const mat = new THREE.Matrix4();
const hide = new THREE.Matrix4().makeScale(0, 0, 0);
let yaw = -0.5, pitch = 0.32, dragging = null, idle = 0;
host.addEventListener('pointerdown', e => { dragging = { x: e.clientX, y: e.clientY, yaw, pitch }; host.setPointerCapture(e.pointerId); });
host.addEventListener('pointermove', e => { if (!dragging) return; yaw = dragging.yaw + (e.clientX - dragging.x) * 0.008; pitch = Math.max(-0.1, Math.min(0.9, dragging.pitch + (e.clientY - dragging.y) * 0.005)); idle = 0; });
const end = () => { dragging = null; };
host.addEventListener('pointerup', end); host.addEventListener('pointercancel', end);
function resize() {
const w = host.clientWidth || 300, h = host.clientHeight || 300;
renderer.setSize(w, h, false);
camera.aspect = w / h;
const dist = 11.5 * Math.max(1, 1.25 / camera.aspect);
camera.position.set(0, 0.6, dist); camera.lookAt(0, 0.1, 0);
camera.updateProjectionMatrix();
}
new ResizeObserver(resize).observe(host); resize();
const still = matchMedia('(prefers-reduced-motion: reduce)').matches;
let last = performance.now();
function frame(now) {
requestAnimationFrame(frame);
const dt = Math.min(0.05, (now - last) / 1000) * (still ? 0.35 : 1); last = now; idle += dt;
const r = result, s = read();
const cross = r.running ? Math.min(0.95, r.flux / 32) : 0; // chance a water molecule crosses per wall hit
const push = 0.25 + Math.min(1.6, s.pressure / 30); // pressure drives molecules to the wall
const pass = r.running ? Math.min(0.2, (1 - r.rejection) * 1.5) : 0;
const flow = 1.15;
for (let i = 0; i < NW; i++) {
const p = W[i];
if (p.side === 0) {
p.x += flow * p.sp * dt; p.vy += (-push * 0.9 + rnd(-2.2, 2.2)) * dt; p.vy *= 0.96; p.y += p.vy * dt;
if (p.y > TOP - 0.08) { p.y = TOP - 0.08; p.vy = -Math.abs(p.vy); }
if (p.y < 0.13) { if (Math.random() < cross) { p.side = 1; p.y = -0.13; p.vy = -0.5; } else { p.y = 0.13; p.vy = Math.abs(p.vy) * 0.6 + 0.25; } }
if (p.x > LX) { p.x = -LX; p.y = rnd(0.2, TOP - 0.1); p.vy = 0; }
} else {
p.x += flow * 0.55 * dt; p.vy += (-0.25 + rnd(-1, 1)) * dt; p.vy *= 0.95; p.y += p.vy * dt;
if (p.y < BOT + 0.08) { p.y = BOT + 0.08; p.vy = Math.abs(p.vy) * 0.3; }
if (p.y > -0.13) { p.y = -0.13; p.vy = -0.2; }
if (p.x > LX) { p.side = 0; p.x = -LX; p.y = rnd(0.2, TOP - 0.1); p.vy = 0; }
}
mat.makeTranslation(p.x, p.y, p.z); water.setMatrixAt(i, mat);
}
const shown = Math.round(10 + Math.sqrt(s.salinity / 45000) * (NS - 10));
for (let i = 0; i < NS; i++) {
const p = S[i];
if (i >= shown) { salt.setMatrixAt(i, hide); continue; }
if (p.side === 0) {
p.x += flow * p.sp * 0.9 * dt; p.vy += (-push * 0.8 + rnd(-1.8, 1.8)) * dt; p.vy *= 0.96; p.y += p.vy * dt;
if (p.y > TOP - 0.12) { p.y = TOP - 0.12; p.vy = -Math.abs(p.vy); }
if (p.y < 0.17) { if (Math.random() < pass * dt * 6) { p.side = 1; p.y = -0.17; p.vy = -0.4; } else { p.y = 0.17; p.vy = Math.abs(p.vy) * 0.25 + 0.05; } }
if (p.x > LX) { p.x = -LX; p.y = rnd(0.25, TOP - 0.15); p.vy = 0; }
} else {
p.x += flow * 0.55 * dt; p.vy += (-0.2 + rnd(-0.8, 0.8)) * dt; p.vy *= 0.95; p.y += p.vy * dt;
if (p.y < BOT + 0.12) { p.y = BOT + 0.12; p.vy = 0.1; }
if (p.y > -0.17) { p.y = -0.17; p.vy = -0.2; }
if (p.x > LX) { p.side = 0; p.x = -LX; p.y = rnd(0.25, TOP - 0.15); p.vy = 0; }
}
mat.makeTranslation(p.x, p.y, p.z); salt.setMatrixAt(i, mat);
}
water.instanceMatrix.needsUpdate = true; salt.instanceMatrix.needsUpdate = true;
membrane.material.emissiveIntensity = r.running ? 0.6 + Math.min(0.8, r.flux / 40) : 0.25;
rig.rotation.set(pitch, yaw + (dragging || still ? 0 : Math.sin(idle * 0.25) * 0.12), 0);
renderer.render(scene, camera);
}
requestAnimationFrame(frame);
}
try { scene3d(); } catch (err) {
console.error('3D view unavailable; the calculator still works.', err);
$('stage').classList.add('is-off');
}
index.html66 lines
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="color-scheme" content="dark">
<title>Reverse osmosis lab | Shahrouz Ghadimi</title>
<meta name="description" content="Operate a 3D reverse-osmosis membrane: set pressure, salinity and recovery and watch flux, permeate quality and energy respond.">
<link rel="icon" href="../../favicon.svg" type="image/svg+xml">
<link rel="stylesheet" href="./ro.css">
</head>
<body>
<main class="lab">
<section class="view" aria-label="Membrane view">
<div id="stage" class="stage" role="img" aria-label="3D cut-away of a membrane channel. Water molecules cross the membrane; salt ions stay on the feed side."></div>
<span class="tag feed">Feed side · salty, under pressure</span>
<span class="tag perm">Permeate side · clean water</span>
<p class="legend" aria-hidden="true"><span><i class="dot w"></i>Water</span><span><i class="dot s"></i>Salt</span><span><i class="dot m"></i>Membrane</span><span class="drag">Drag to turn</span></p>
</section>
<section class="side">
<header>
<p class="overline">Reverse osmosis lab</p>
<h1>Push water through a membrane<span class="gold">.</span></h1>
<p class="sub">Beat the osmotic pressure and clean water crosses while the salt stays behind. You run it.</p>
</header>
<div class="presets" role="group" aria-label="Source water">
<button type="button" data-preset="brackish" aria-pressed="true">Brackish groundwater</button>
<button type="button" data-preset="seawater" aria-pressed="false">Seawater</button>
<button type="button" data-preset="reuse" aria-pressed="false">Water reuse</button>
</div>
<div class="ctl">
<label for="pressure">Feed pressure <output id="pressure-out" for="pressure"></output></label>
<input id="pressure" type="range" min="2" max="80" step="0.5" value="12">
<div class="meter" aria-hidden="true"><span class="meter-osm" id="meter-osm"></span><span class="meter-p" id="meter-p"></span></div>
<p class="meter-key" aria-hidden="true"><span><i class="key osm"></i>Osmotic pressure to beat</span><span><i class="key app"></i>Your pressure</span></p>
</div>
<div class="ctl">
<label for="salinity">Feed salinity <output id="salinity-out" for="salinity"></output></label>
<input id="salinity" type="range" min="500" max="45000" step="100" value="3000">
</div>
<div class="ctl">
<label for="recovery">Recovery <output id="recovery-out" for="recovery"></output></label>
<input id="recovery" type="range" min="10" max="90" step="1" value="80">
</div>
<div class="row">
<label class="pick" for="membrane">Membrane
<select id="membrane"><option value="brackish">Brackish-water (loose, low pressure)</option><option value="seawater">Seawater (tight, high rejection)</option></select>
</label>
<label class="check"><input id="erd" type="checkbox"> Energy recovery device</label>
</div>
<dl class="readouts">
<div><dt>Water flux</dt><dd><b id="r-flux">–</b> L/m²/h</dd></div>
<div><dt>Permeate salinity</dt><dd><b id="r-perm">–</b> mg/L</dd></div>
<div><dt>Salt rejection</dt><dd><b id="r-rej">–</b> %</dd></div>
<div><dt>Energy</dt><dd><b id="r-energy">–</b> kWh/m³</dd></div>
<div><dt>Net driving pressure</dt><dd><b id="r-ndp">–</b> bar</dd></div>
<div><dt>Concentrate salinity</dt><dd><b id="r-conc">–</b> mg/L</dd></div>
</dl>
<p class="status" id="status" aria-live="polite"></p>
<p class="fine">Solution-diffusion model with film-theory concentration polarization, NaCl at 25 °C, 80% pump efficiency. Simplified to teach the tradeoffs. Not a design tool.</p>
</section>
</main>
<script type="module" src="./ro.js"></script>
</body>
</html>
ro.css56 lines
:root{--navy:#030a1a;--ink:#e8f1ff;--dim:#9db0cc;--mute:#6f83a3;--cyan:#38d6ff;--gold:#ffc65c;--line:rgba(140,190,255,.18);--salt:#ff9d5c;
--sans:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;--mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--navy);color:var(--ink);font:15px/1.5 var(--sans);-webkit-text-size-adjust:100%}
.gold{color:var(--gold)}
.lab{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,1fr);min-height:100vh}
.view{position:sticky;top:0;height:100vh;min-height:320px;background:radial-gradient(90% 70% at 50% 40%,#0c2147 0%,var(--navy) 75%)}
.stage{position:absolute;inset:0;touch-action:pan-y;cursor:grab}
.stage:active{cursor:grabbing}
.stage canvas{display:block;width:100%;height:100%}
.tag{position:absolute;left:16px;padding:5px 11px;border-radius:999px;font-size:.76rem;font-weight:600;background:rgba(3,10,26,.7);border:1px solid var(--line);pointer-events:none}
.tag.feed{top:16px;color:var(--salt)}
.tag.perm{bottom:44px;color:var(--cyan)}
.legend{position:absolute;left:16px;right:16px;bottom:10px;margin:0;display:flex;gap:14px;flex-wrap:wrap;font-size:.74rem;color:var(--mute);pointer-events:none}
.legend span{display:inline-flex;align-items:center;gap:6px}
.legend .drag{margin-left:auto}
.dot{display:inline-block;width:9px;height:9px;border-radius:50%}
.dot.w{background:#58c8ff}.dot.s{background:var(--salt)}.dot.m{background:var(--gold);border-radius:2px}
.side{padding:22px 22px 28px;border-left:1px solid var(--line);display:flex;flex-direction:column;gap:14px}
.overline{margin:0;font-size:.7rem;letter-spacing:.16em;text-transform:uppercase;color:var(--cyan);font-weight:600}
h1{margin:.15rem 0 .3rem;font-size:clamp(1.35rem,2.4vw,1.9rem);line-height:1.1;letter-spacing:-.02em}
.sub{margin:0;color:var(--dim)}
.presets{display:flex;gap:6px;flex-wrap:wrap}
.presets button{min-height:38px;padding:0 13px;border-radius:999px;border:1px solid var(--line);background:transparent;color:var(--dim);font:600 .82rem var(--sans);cursor:pointer}
.presets button[aria-pressed=true]{border-color:var(--gold);color:#1d1404;background:var(--gold)}
.ctl label{display:flex;justify-content:space-between;align-items:baseline;font-weight:600;font-size:.9rem}
.ctl output{font:600 .9rem var(--mono);color:var(--gold)}
input[type=range]{width:100%;height:32px;margin:0;accent-color:var(--gold);background:transparent}
.meter{position:relative;height:10px;border-radius:5px;background:rgba(255,255,255,.07);overflow:hidden}
.meter span{position:absolute;left:0;top:0;bottom:0;border-radius:5px;transition:width .2s}
.meter-p{background:var(--cyan);opacity:.9;height:5px;top:auto!important}
.meter-osm{background:var(--salt);opacity:.85;height:5px;bottom:auto!important}
.meter-key{display:flex;gap:14px;margin:.35rem 0 0;font-size:.72rem;color:var(--mute)}
.key{display:inline-block;width:10px;height:4px;border-radius:2px;margin-right:5px;vertical-align:middle}
.key.osm{background:var(--salt)}.key.app{background:var(--cyan)}
.row{display:flex;gap:14px;flex-wrap:wrap;align-items:end}
.pick{display:flex;flex-direction:column;gap:4px;font-size:.8rem;color:var(--dim);flex:1;min-width:200px}
select{min-height:38px;border-radius:10px;border:1px solid var(--line);background:#06122b;color:var(--ink);font:inherit;padding:0 8px}
.check{display:inline-flex;align-items:center;gap:8px;min-height:38px;font-size:.86rem}
.check input{width:18px;height:18px;accent-color:var(--gold)}
.readouts{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:0}
.readouts div{padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:rgba(8,20,46,.6)}
.readouts dt{font-size:.7rem;letter-spacing:.06em;text-transform:uppercase;color:var(--mute)}
.readouts dd{margin:2px 0 0;font-size:.78rem;color:var(--dim)}
.readouts b{font:700 1.3rem var(--mono);color:var(--ink);margin-right:3px}
.status{margin:0;padding:10px 12px;border-radius:12px;border:1px solid rgba(255,198,92,.4);background:rgba(255,198,92,.07);font-size:.86rem;min-height:2.6em}
.status.is-stop{border-color:rgba(255,120,90,.6);background:rgba(255,120,90,.1)}
.fine{margin:0;color:var(--mute);font-size:.74rem}
:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
@media (max-width:820px){
.lab{grid-template-columns:1fr}
.view{height:40vh;z-index:2;border-bottom:1px solid var(--line)}
.side{border-left:0;padding:16px 16px 28px}
.legend .drag{display:none}
}
Have an idea of your own?
Look around your day, find the thing that wastes your time, and build the fix. Everything here is free to help you start. If you would rather I built it, or you just want to talk an idea through, write to me.