/* Gravitational time dilation lesson. All rules scoped under .gtd-* */
.gtd-room, .gtd-sky, .gtd-bh { position: relative; width: 100%; max-width: 360px; margin: 0 auto; }
.gtd-room svg, .gtd-sky svg, .gtd-bh svg { display: block; width: 100%; height: auto; overflow: visible; }

/* clocks */
.gtd-foot { fill: #8A6A2E; }
.gtd-rim { fill: #C9962F; stroke: #FFE08A; stroke-width: 1.5; }
.gtd-dial { fill: #F7F1E4; }
.gtd-tick { stroke: #4A3A20; stroke-width: 1.6; }
.gtd-hr { stroke: #2A1B10; stroke-width: 3; stroke-linecap: round; }
.gtd-sec { stroke: #D85555; stroke-width: 1.6; stroke-linecap: round; }
.gtd-hub { fill: #2A1B10; }
.gtd-hit { fill: transparent; cursor: grab; touch-action: none; }
.gtd-on .gtd-hit { pointer-events: none; }
.gtd-floor { fill: #1C2338; }
.gtd-step { fill: none; stroke: rgba(234,227,215,.45); stroke-width: 2; stroke-dasharray: 6 5; transition: fill .3s; }
.gtd-on .gtd-step { fill: #2A3150; stroke: rgba(234,227,215,.3); stroke-dasharray: none; }
.gtd-dim { fill: none; stroke: var(--gold); stroke-width: 2; }
.gtd-dl { font: 800 14px var(--sans); fill: var(--gold); text-anchor: middle; }
.gtd-ro { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 8px; min-height: 44px; text-align: center; opacity: 0; transition: opacity .3s; }
.gtd-run .gtd-ro { opacity: 1; }
.gtd-yr { font: 700 14px var(--sans); color: var(--dim); }
.gtd-yr b { color: var(--text); font-size: 17px; }
.gtd-ah { font: 600 13.5px var(--sans); color: var(--dim); }
.gtd-ah b { color: var(--gold); font-size: 17px; }
.gtd-end .gtd-b .gtd-rim { filter: drop-shadow(0 0 8px rgba(252,192,80,.9)); }

/* the 2010 art */
.gtd-hero { width: 100%; max-width: 340px; margin: 0 auto; }
.gtd-hero img { display: block; width: 100%; }

/* you */
.gtd-you { position: relative; width: 100%; max-width: 330px; margin: 0 auto; }
.gtd-you svg { display: block; width: 100%; height: auto; overflow: visible; }
.gtd-me circle { fill: #F3C9A0; }
.gtd-me path { fill: none; stroke: var(--text); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.gtd-tie { stroke: rgba(234,227,215,.35); stroke-width: 2; stroke-dasharray: 4 5; }
.gtd-ml { font: 700 15px var(--sans); fill: var(--text); }
.gtd-fx { font: 800 15px var(--sans); fill: var(--gold); opacity: 0; transition: opacity .4s; }
.gtd-hi .gtd-fx { opacity: 1; }
.gtd-hi .gtd-mh .gtd-rim { filter: drop-shadow(0 0 8px rgba(252,192,80,.9)); }

/* the satellite */
.gtd-orb { fill: none; stroke: rgba(234,227,215,.3); stroke-width: 1.5; stroke-dasharray: 4 5; }
.gtd-up { stroke: rgba(252,192,80,.5); stroke-width: 2; stroke-dasharray: 4 4; opacity: 0; transition: opacity .4s; }
.gtd-ul { font: 700 13.5px var(--sans); fill: var(--text); opacity: 0; transition: opacity .4s; }
.gtd-pnl { fill: #3B4FA8; stroke: #9FB2FF; stroke-width: 1; }
.gtd-bus { fill: var(--gold); }
.gtd-gain { font: 800 15px var(--sans); fill: var(--gold); text-anchor: middle; opacity: 0; transition: opacity .4s; }
.gtd-high .gtd-up, .gtd-high .gtd-ul, .gtd-high .gtd-gain { opacity: 1; }

/* the tug */
.gtd-tug { width: 100%; max-width: 340px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.gtd-sides { display: flex; justify-content: space-between; gap: 12px; }
.gtd-sides > div { flex: 1; max-width: 140px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: center; line-height: 1.2; }
.gtd-sides span { display: block; font: 600 13px var(--sans); color: var(--dim); }
.gtd-sides b { display: block; font: 800 30px var(--sans); }
.gtd-sides em { display: block; font: 600 13px var(--sans); font-style: normal; color: var(--dim); }
.gtd-sp b { color: var(--violet-bright); } .gtd-ht b { color: var(--gold); }
.gtd-rope { position: relative; height: 22px; margin: 0 10px; }
.gtd-rope::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 4px; translate: 0 -50%; border-radius: 2px; background: linear-gradient(90deg, var(--violet-bright), #CFC8BC 50%, var(--gold)); }
.gtd-mid { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; background: var(--faint); }
.gtd-knot { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; translate: -50% -50%; border-radius: 50%; background: #F4EEE2; box-shadow: 0 0 0 3px rgba(10,14,26,.8); }
.gtd-unit { font: 600 12.5px var(--sans); color: var(--faint); text-align: center; }
.gtd-net { display: none; font: 600 14px var(--sans); color: var(--dim); text-align: center; }
.gtd-net b { color: var(--gold); font-size: 20px; }
.gtd-won .gtd-net { display: block; }
.gtd-won .gtd-unit { display: none; }

/* the black hole */
.gtd-hole { fill: #000; stroke: rgba(255,217,138,.6); stroke-width: 1.5; }
.gtd-arc { fill: none; stroke: rgba(255,217,138,.75); stroke-width: 4; filter: drop-shadow(0 0 4px rgba(252,192,80,.8)); }
.gtd-planet { fill: #6BB0C9; }
.gtd-home { fill: #4C8BE8; }
.gtd-tl { font: 700 13px var(--sans); fill: var(--text); text-anchor: middle; }
.gtd-big { font: 800 17px var(--sans); fill: var(--gold); text-anchor: middle; opacity: 0; transition: opacity .4s; }
.gtd-show .gtd-big { opacity: 1; }
.gtd-big.gtd-st { text-anchor: start; }

@media (max-height: 700px) {
  .gtd-room, .gtd-sky, .gtd-bh, .gtd-you { max-width: 320px; }
  .gtd-hero { max-width: 290px; }
}
