/* The Musk comparison, scoped to its own body class. The navy hero with its orange edge, the
   result wordmark, the stat tiles, the disclosure, the share row and the article cards come from
   results.css and styles.css; only this page's layout choices live here. All colours are tokens. */
.musk-page main > .page-title p { max-width: 68ch; }
.musk-page .musk-calculator { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
.musk-page .musk-calculator .field input { min-width: 0; }
.musk-page .musk-calculator .hint { font-size: 0.85rem; line-height: 1.5; }
.musk-page .musk-conversion { font-size: 0.85rem; color: var(--muted); margin: 0 0 8px; }
.musk-page .musk-form-actions { margin: 4px 0 0; }
.musk-page .musk-form-actions .link-btn { min-height: 44px; }
.musk-page .musk-form-actions .link-btn:focus-visible { outline: 2px solid var(--highlight); outline-offset: 3px; border-radius: 4px; }

/* The result panel: the shared hero, then the four supporting tiles and the two actions. */
.musk-page .musk-results .rp-hero { margin-bottom: 16px; }
.musk-page .musk-results .rp-hero .value { overflow-wrap: anywhere; }
.musk-page .musk-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.musk-page .musk-tiles .stat { min-width: 0; }

/* One 48-year career against the whole fortune, drawn on a linear bar. */
.musk-page .musk-career { padding: 18px; border-radius: var(--radius); background: var(--accent); margin: 24px 0; }
.musk-page .musk-career .rp-heading { margin-top: 0; }
.musk-page .musk-career-number { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 16px 0 12px; }
.musk-page .musk-career-number strong { font-size: clamp(1.4rem, 4vw, 1.9rem); overflow-wrap: anywhere; }
.musk-page .musk-career-number span { font-size: 0.85rem; color: var(--muted); }
.musk-page .musk-track { height: 12px; border-radius: 6px; overflow: hidden; background: var(--rest); }
.musk-page .musk-track span { display: block; height: 100%; background: var(--highlight); transition: width 0.2s ease; }
.musk-page .musk-track-labels { display: flex; justify-content: space-between; gap: 12px; font-size: 0.75rem; color: var(--muted); margin: 7px 0 12px; }
.musk-page .musk-insight { font-size: 0.95rem; line-height: 1.6; margin: 14px 0 10px; overflow-wrap: anywhere; }
.musk-page .musk-career .rp-assumption { margin-bottom: 0; }

/* The salary-multiplier explorer: a linear curve plus the number it is pointing at. */
.musk-page .musk-explorer { margin: 24px 0; }
.musk-page .musk-explorer .rp-heading { margin-top: 0; }
.musk-page .musk-curve { display: block; width: 100%; height: auto; margin: 12px 0; }
.musk-page .musk-curve text { fill: var(--muted); font: 13px system-ui, sans-serif; }
.musk-page .fortune-axis { fill: none; stroke: var(--border); stroke-width: 2; }
.musk-page .fortune-line { fill: none; stroke: var(--primary); stroke-width: 4; stroke-linejoin: round; }
.musk-page .fortune-guide { fill: none; stroke: var(--muted); stroke-dasharray: 4 4; }
.musk-page .fortune-point { fill: var(--highlight); stroke: var(--card); stroke-width: 2; }
.musk-page .musk-explorer .rp-explore-answer strong { color: var(--primary); }
.musk-page .musk-explorer .rp-explore-answer p { margin: 6px 0 0; font-size: 0.9rem; line-height: 1.55; overflow-wrap: anywhere; }

/* The one timeline: a logarithmic bar with its landmarks under it. */
.musk-page .musk-timeline { margin: 24px 0; }
.musk-page .musk-timeline .rp-heading { margin-top: 0; }
.musk-page .musk-scale { margin: 10px 0 0; }
.musk-page .musk-scale #scale-fill { background: var(--primary); }
.musk-page .musk-ruler { position: relative; height: 40px; margin: 8px 0 4px; }
.musk-page .musk-ruler .tick { position: absolute; top: 0; transform: translateX(-50%); font-size: 0.72rem; line-height: 1.25; white-space: normal; max-width: 74px; text-align: center; color: var(--muted); }
.musk-page .musk-ruler .first { transform: none; text-align: left; }
/* The last label is pinned inside the ruler's right edge: with left:100% and a wrapping label its
   shrink-to-fit width would be zero, which stacks the letters vertically. */
.musk-page .musk-ruler .last { left: auto; right: 0; transform: none; text-align: right; }
.musk-page .musk-timeline .rp-caption { margin: 6px 0 0; }

/* The folded-away figures: two short lists, then the unit table. */
.musk-page .musk-comparisons { margin: 0 0 20px; }
.musk-page .musk-comparisons > div { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.musk-page .musk-comparisons dt { font-size: 0.9rem; color: var(--muted); }
.musk-page .musk-comparisons dd { font-weight: 600; margin: 0; text-align: right; overflow-wrap: anywhere; }
.musk-page .calc-disclosure .rp-heading { margin: 20px 0 8px; }
.musk-page .calc-disclosure .rp-heading:first-child { margin-top: 0; }

/* Sourcing and article prose. */
.musk-page .musk-article h3 { font-size: 1.05rem; margin: 22px 0 8px; }
.musk-page .musk-article p { max-width: 78ch; }
.musk-page .musk-article caption { text-align: left; color: var(--muted); font-size: 0.85rem; padding-bottom: 10px; }
.musk-page .musk-article th[scope="row"] { text-align: left; font-weight: 600; }
.musk-page .musk-article .formula { white-space: normal; overflow-wrap: anywhere; }
/* A number in a table is one token: it wraps between cells, never in the middle of "16,666,667".
   A table too wide for the phone scrolls inside its own .scroll-x region instead. */
.musk-page .fee-table { overflow-wrap: normal; }
.musk-page .fee-table th,
.musk-page .fee-table td { min-width: 84px; }
.musk-page #unit-table td { text-align: right; }
.musk-page .musk-sources { padding-left: 20px; }
.musk-page .musk-sources li { margin: 0 0 10px; line-height: 1.55; }
.musk-page .scroll-x:focus-visible { outline: 2px solid var(--highlight); outline-offset: 2px; }

/* Five facts, stacked one per row at every width. The text always runs left to right: no grid
   columns, no vertical writing and no card narrow enough to break a word into a column. */
.musk-page .fact-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 14px; }
.musk-page .fact { min-width: 0; padding: 14px 16px; border-left: 3px solid var(--highlight); border-radius: 0 var(--radius) var(--radius) 0; background: var(--accent); writing-mode: horizontal-tb; }
.musk-page .fact h3 { display: block; margin: 0 0 7px; font-size: 0.98rem; line-height: 1.35; min-width: 0; overflow-wrap: break-word; word-break: normal; }
.musk-page .fact p { margin: 0; font-size: 0.9rem; line-height: 1.6; min-width: 0; overflow-wrap: break-word; word-break: normal; }

@media (max-width: 800px) {
  .musk-page .musk-calculator { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .musk-page .musk-career { padding: 14px; }
  .musk-page .musk-comparisons > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .musk-page .musk-comparisons dd { text-align: left; }
  .musk-page .musk-article th,
  .musk-page .musk-article td { min-width: 100px; }
}
@media (max-width: 380px) {
  .musk-page .musk-tiles { grid-template-columns: minmax(0, 1fr); }
  .musk-page .musk-ruler .tick { max-width: 84px; font-size: 0.68rem; }
}
@media (prefers-reduced-motion: reduce) {
  .musk-page .musk-track span { transition: none; }
}
