
:root { --ink:#18202a; --muted:#5d6875; --paper:#fbfaf7; --panel:#f0eee8; --accent:#9a3e2f; --line:#d8d4ca; --nav:18rem; }
*{box-sizing:border-box} html{scroll-behavior:smooth} body{margin:0;background:var(--paper);color:var(--ink);font-family:Georgia,"Times New Roman",serif;line-height:1.68;font-size:18px}
a{color:#7e3126;text-decoration-thickness:.08em;text-underline-offset:.15em} a:hover{color:#b04a39}
#TOC{position:fixed;inset:0 auto 0 0;width:var(--nav);overflow:auto;padding:2rem 1.4rem;background:#202a34;color:#eef2f5;font-family:system-ui,sans-serif;font-size:.84rem;line-height:1.35;z-index:10}
#TOC:before{content:"SPECIAL RELATIVITY BOOT CAMP";display:block;font-weight:750;letter-spacing:.11em;font-size:.75rem;margin-bottom:1.5rem;color:#fff}
#TOC ul{list-style:none;padding-left:.7rem}#TOC>ul{padding-left:0}#TOC li{margin:.55rem 0}#TOC a{color:#cbd4dc;text-decoration:none}#TOC a:hover{color:white}
body>header, body>main, body>p, body>section, body>figure, body>div, body>h1,body>h2,body>h3,body>blockquote,body>table,body>ol,body>ul{max-width:800px;margin-left:calc(var(--nav) + max(3rem, (100vw - var(--nav) - 800px)/2));margin-right:auto}
header#title-block-header{padding:7rem 0 2rem;border-bottom:1px solid var(--line);margin-bottom:2rem}h1.title{font-size:3.4rem;line-height:1.05;margin:0 0 1rem;letter-spacing:-.035em}p.author{font-family:system-ui,sans-serif;font-size:1rem;letter-spacing:.06em;text-transform:uppercase}p.date{color:var(--muted);font-style:italic}
.hero-note{font-size:1.25rem;color:var(--muted);border-left:4px solid var(--accent);padding:.5rem 0 .5rem 1.2rem;margin-top:2.5rem!important;margin-bottom:3rem!important}
h1,h2,h3{line-height:1.2;scroll-margin-top:1.5rem}h1{font-size:2.35rem;margin-top:4.5rem!important;padding-top:1.2rem;border-top:1px solid var(--line)}h2{font-size:1.65rem;margin-top:3.3rem!important}h3{font-size:1.3rem;margin-top:2.4rem!important}.secno{color:var(--accent);font-variant-numeric:tabular-nums;margin-right:.35em}.unnumbered{border-top:0}
.epigraph{text-align:center;padding:3rem 1rem;margin-top:3rem!important;margin-bottom:4rem!important;background:var(--panel)}.epigraph p{font-size:1.15rem;margin:1rem}.epigraph cite{font-family:system-ui,sans-serif;font-size:.8rem;color:var(--muted)}
.book-figure{margin-top:3rem!important;margin-bottom:3rem!important}.figure-single{text-align:center}.figure-single img{max-width:min(100%,650px);height:auto}.figure-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;align-items:center}.figure-grid img{width:100%;height:auto}.book-figure figcaption{font-size:.92rem;color:#414b55;margin-top:1rem;line-height:1.5}.book-figure strong{color:var(--accent)}
.concept-box{border:1px solid #9ea7ae;border-left:5px solid var(--accent);padding:1.1rem 1.35rem;margin:2rem 0;background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.045)}.concept-box strong:first-child{font-family:system-ui,sans-serif;letter-spacing:.025em}
.equation{overflow-x:auto;margin:1.5rem 0;padding:.3rem}.MathJax{font-size:1.02em!important}
footer{max-width:800px;margin:5rem auto 2rem calc(var(--nav) + max(3rem, (100vw - var(--nav) - 800px)/2));padding-top:2rem;border-top:1px solid var(--line);font-family:system-ui,sans-serif;color:var(--muted);font-size:.85rem}
@media(max-width:1000px){:root{--nav:0rem}#TOC{position:relative;width:auto;max-height:none;padding:1.2rem 1.5rem}body>header,body>main,body>p,body>section,body>figure,body>div,body>h1,body>h2,body>h3,body>blockquote,body>table,body>ol,body>ul{margin-left:auto;margin-right:auto;padding-left:1.2rem;padding-right:1.2rem}.figure-grid{grid-template-columns:1fr}header#title-block-header{padding-top:3rem}h1.title{font-size:2.6rem}footer{margin-left:1.2rem;margin-right:1.2rem}}

/* Display mathematics: center equations and suppress accidental scrollbars. */
.equation {
  overflow: visible;
  margin: 1.75rem 0;
  padding: 0;
  width: 100%;
}
.equation > p {
  margin: 0;
  width: 100%;
  text-align: center;
}
.equation .math.display {
  display: block;
  width: 100%;
  text-align: center;
}
.equation mjx-container[jax="CHTML"][display="true"] {
  display: block !important;
  width: 100% !important;
  margin: 1em auto !important;
  text-align: center !important;
  overflow: visible !important;
}

/* Allow genuinely long formulas to scroll horizontally on narrow screens,
   without creating the small vertical scrollbars seen in desktop browsers. */
@media (max-width: 700px) {
  .equation {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
}

/* Keep equation blocks inside the same centered 800px text column.
   The earlier `margin: ... 0` shorthand accidentally erased the page-column
   left margin, placing equations underneath the fixed navigation panel. */
body > div.equation {
  max-width: 800px;
  margin-top: 1.75rem !important;
  margin-right: auto !important;
  margin-bottom: 1.75rem !important;
  margin-left: calc(var(--nav) + max(3rem, (100vw - var(--nav) - 800px)/2)) !important;
  padding: 0;
  overflow: visible;
}

body > div.equation > p,
body > div.equation .math.display,
body > div.equation mjx-container[jax="CHTML"][display="true"] {
  width: 100% !important;
  text-align: center !important;
}

@media (max-width: 1000px) {
  body > div.equation {
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }
}

/* Keep top-level definition, theorem, and principle boxes in the book's
   centered text column. The box's original `margin: 2rem 0` shorthand
   overrode the shared page-column margin and pushed it beneath the sidebar. */
body > .concept-box {
  max-width: 800px;
  width: 100%;
  margin-top: 2rem !important;
  margin-right: auto !important;
  margin-bottom: 2rem !important;
  margin-left: calc(var(--nav) + max(3rem, (100vw - var(--nav) - 800px)/2)) !important;
}

@media (max-width: 1000px) {
  body > .concept-box {
    width: auto;
    margin-left: 1.2rem !important;
    margin-right: 1.2rem !important;
  }
}


/* Proof environments restored from the LaTeX source. */
.proof {
  max-width: 800px;
  margin: 1.35rem 0 2.2rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--line);
}
.proof > p:first-child { margin-top: 0; }
.proof .qed { text-align: right; font-size: 1.15em; margin-top: .3rem; }
body > .proof {
  margin-left: calc(var(--nav) + max(3rem, (100vw - var(--nav) - 800px)/2));
  margin-right: auto;
}

/* Figures 12 and 13 are a matched vertical pair. */
.paired-book-figures {
  max-width: 760px !important;
  display: flex;
  flex-direction: column;
  gap: 4rem;
  align-items: center;
  margin-top: 3rem !important;
  margin-bottom: 3.5rem !important;
}
.paired-book-figures .book-figure {
  width: 100%;
  margin: 0 !important;
}
.paired-book-figures .figure-single {
  display: flex;
  justify-content: center;
}
.paired-book-figures .figure-single img {
  display: block;
  width: min(100%, 680px);
  max-width: 680px;
  height: auto;
}
.paired-book-figures figcaption {
  margin-top: 1rem;
}

@media (max-width: 1000px) {
  body > .proof { margin-left: auto; margin-right: auto; padding-left: 1.2rem; padding-right: 1.2rem; }
  .paired-book-figures { margin-left: 1.2rem !important; margin-right: 1.2rem !important; }
}


/* Complete sidebar table of contents. */
#TOC .toc-chapter { margin-top: .9rem; font-weight: 650; }
#TOC .toc-chapter > a { color: #eef2f5; }
#TOC .toc-section { margin: .32rem 0; font-weight: 400; font-size: .92em; }
#TOC .toc-section a { color: #b8c4ce; }
#TOC ul ul { padding-left: .85rem; margin-top: .35rem; border-left: 1px solid rgba(255,255,255,.12); }
#TOC a { display: block; }


/* Native SVG interactive spacetime figures. */
.interactive-figure {
  max-width: 920px;
  margin: 1.2rem 0 4rem;
  border: 1px solid #c7ccd1;
  border-left: 4px solid var(--accent);
  background: #fbfaf7;
  box-shadow: 0 5px 22px rgba(15,25,35,.06);
}
body > .interactive-figure {
  margin-left: calc(var(--nav) + max(3rem, (100vw - var(--nav) - 920px)/2));
  margin-right: auto;
}
.interactive-figure summary {
  cursor: pointer;
  padding: 1rem 1.2rem;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: .85rem;
  border-bottom: 1px solid transparent;
  font-family: system-ui,-apple-system,"Segoe UI",sans-serif;
}
.interactive-figure[open] summary { border-bottom-color: #d7dadd; }
.interactive-figure summary::-webkit-details-marker { display:none; }
.interactive-figure summary::before { content:"▸"; color:var(--accent); font-weight:700; }
.interactive-figure[open] summary::before { content:"▾"; }
.interactive-figure summary span { font-weight:700; color:#162431; }
.interactive-figure summary small { color:#58636d; font-size:.82rem; }
.interactive-shell { padding: 1rem; }
.interactive-stage { width:100%; min-height:420px; }
.interactive-layout { display:grid; grid-template-columns:minmax(0,1fr) 220px; gap:1rem; align-items:start; }
.interactive-canvas { width:100%; min-width:0; }
.interactive-canvas svg { display:block; width:100%; height:auto; background:#fff; border:1px solid #d8dcdf; }
.interactive-controls { font-family:system-ui,-apple-system,"Segoe UI",sans-serif; font-size:.84rem; color:#283640; padding:.25rem .1rem; }
.interactive-controls label { display:block; font-weight:650; margin:.1rem 0 .35rem; }
.interactive-controls input[type="range"] { width:100%; accent-color:#a6402c; }
.interactive-controls .readout { font-variant-numeric:tabular-nums; background:#f1f0ec; border:1px solid #d5d4cf; padding:.62rem .7rem; line-height:1.55; margin:.7rem 0; }
.interactive-controls button { border:1px solid #9ba4aa; background:#fff; padding:.45rem .7rem; border-radius:3px; cursor:pointer; font-weight:650; color:#26343e; }
.interactive-controls button:hover { background:#f0efeb; }
.interactive-controls .check { display:flex; gap:.45rem; align-items:center; font-weight:400; margin:.65rem 0; }
.interactive-note { margin-top:.75rem; color:#5d6870; font-size:.76rem; line-height:1.4; }
.sr-axis { stroke:#899198; stroke-width:1.2; }
.sr-grid { stroke:#e5e7e8; stroke-width:.7; }
.sr-cone { stroke:#858b90; stroke-width:1.5; stroke-dasharray:7 6; fill:none; }
.sr-hyperbola { stroke:#8d9295; stroke-width:1.5; fill:none; }
.sr-red { stroke:#c52828; fill:none; stroke-width:3; }
.sr-red-dash { stroke:#c52828; fill:none; stroke-width:2.5; stroke-dasharray:8 6; }
.sr-blue { stroke:#1557c0; fill:none; stroke-width:3; }
.sr-green { stroke:#278348; fill:none; stroke-width:3; }
.sr-rust { stroke:#a6402c; fill:none; stroke-width:3; }
.sr-muted { stroke:#aeb4b8; fill:none; stroke-width:1.3; }
.sr-event { stroke:#fff; stroke-width:1.4; }
.sr-label { font-family:Georgia,"Times New Roman",serif; font-size:15px; fill:#26323a; }
.sr-small { font-family:system-ui,-apple-system,"Segoe UI",sans-serif; font-size:11px; fill:#59656d; }
.sr-title { font-family:Georgia,"Times New Roman",serif; font-size:17px; font-weight:700; fill:#182631; }
@media(max-width:1000px){
 body > .interactive-figure { margin-left:1.2rem; margin-right:1.2rem; }
 .interactive-layout { grid-template-columns:1fr; }
 .interactive-controls { max-width:none; }
 .interactive-figure summary { align-items:flex-start; flex-wrap:wrap; }
 .interactive-stage { min-height:0; }
}
