Twin Paradox

by Chantal Roth

HTML

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Hidden Medium Twin Paradox: Deep Space Scenario</title>
  <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
  <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
  <style>
    body { font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; margin: 0; padding: 1rem; background: #1a1a1a; color: #eee; }
    h2 { text-align: center; color: #fff; margin-bottom: 0.5rem; }
    .subtitle { text-align: center; color: #aaa; font-style: italic; margin-bottom: 1.5rem; font-size: 0.9rem;}
    
    #container { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
    #left-panel { flex: 0 0 900px; }
    #explanation { flex: 0 0 320px; background: #2a2a2a; border: 1px solid #444; border-radius: 8px; padding: 1.2rem; color: #ccc; height: fit-content; }
    
    #ctrl { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: .5rem; padding: 1rem; background: #2a2a2a; border-radius: 8px; align-items: center; border: 1px solid #444; }
    .ctrl-group { display: flex; flex-direction: column; gap: 5px; }
    .ctrl-group label { font-size: .9rem; font-weight: bold; display: flex; justify-content: space-between; }
    .slider-val { font-family: monospace; color: #fff; }
    
    input[type=range] { cursor: pointer; width: 180px; }
    
    button { cursor: pointer; padding: 8px 24px; color: #fff; border: none; border-radius: 4px; font-weight: bold; transition: background 0.2s; font-size: 1rem; }
    #go { background: #2e7d32; } #go:hover { background: #43a047; }
    #reset { background: #c62828; } #reset:hover { background: #e53935; }

    /* Canvas styling */
    canvas { background: #000000; border: 2px solid #555; border-radius: 8px; display: block; box-shadow: inset 0 0 50px rgba(0,0,0,0.8); }

    /* Readout styling */
    #readout { margin-top: .5rem; font-size:...