:root{--space-black:#05070C;--saturn-butter:#D9B77A;--ring-ivory:#E8E0CC;--titan-amber:#B8742E;--titan-charcoal:#22201E;--frost-ochre:#8C7A5E;--hearth-gold:#FFB866;--garden-green:#5E8C4A;--ice-white:#E9F1F5;--plume-cyan:#9FD8E8;--heritage-gold:#C9A04A;--signal-red:#E0402F;--signal-green:#3FBF6A;--p-methalox:#6F7BFF;--p-ntr:#FF8FB0;--p-fusion:#B05CFF;--p-ion:#5AA8FF;--p-radiator:#FF7A2E;--b-physics:#5AA8FF;--b-design:#C9A04A;--b-challenge:#FF7A2E;--b-fiction:#B05CFF;--b-law:#9FD8E8;--b-illustrative:#E8E0CC;--b-styled:#FF8FB0}
/* Titan 2100 companion site. Colour custom properties come from assets/data/palette.json (build.mjs prepends them). */
:root {
  color-scheme: dark;
  --bg: var(--space-black);
  --panel: #0b0f18;
  --panel-2: #111826;
  --line: #1f2a3d;
  --text: #e8e0cc;
  --muted: #9aa3b2;
  --accent: var(--heritage-gold);
  --sans: 'IBM Plex Sans', system-ui, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', monospace;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.62 var(--sans); -webkit-text-size-adjust: 100%; }
a { color: var(--plume-cyan); text-underline-offset: 3px; }
a:hover { color: #fff; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--panel-2); padding: 8px 12px; z-index: 10; }

.top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: #070a11ee; position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px); }
.brand { font-weight: 600; letter-spacing: .04em; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; font-size: 18px; }
.brand-mark { width: 22px; height: 22px; border-radius: 50%; background: var(--saturn-butter); box-shadow: 0 0 0 3px #05070c, 0 0 0 4px var(--ring-ivory); }
.primary { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-left: auto; align-items: center; font-size: 15px; }
.primary a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.primary a:hover, .primary a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.primary a.launch { color: var(--bg); background: var(--accent); padding: 6px 14px; border: 0; border-radius: 3px; font-weight: 600; }
.primary a.launch:hover { background: #e3bd6c; color: var(--bg); }
.basis-toggle { font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }

main { max-width: 760px; margin: 0 auto; padding: 36px 20px 64px; }
main.wide { max-width: 1060px; }
h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.12; margin: 8px 0 14px; letter-spacing: -.01em; }
h2 { font-size: 26px; line-height: 1.2; margin: 2.2em 0 .5em; padding-top: .6em; border-top: 1px solid var(--line); }
h3 { font-size: 19px; margin: 1.6em 0 .3em; }
.lead { font-size: 20px; color: #f4ecd6; margin: 0 0 1.4em; }
.crumbs { font: 13px var(--mono); color: var(--muted); margin: 0; }
.crumbs a { color: var(--muted); }
p, li { max-width: 68ch; }
code { font-family: var(--mono); font-size: .9em; background: var(--panel-2); padding: 1px 5px; border-radius: 3px; }
.toc { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 10px 18px; margin: 0 0 1.6em; font-size: 15px; }
.toc ul { margin: 6px 0 0; padding-left: 18px; }

.b { font: 500 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 2px 6px 1px; border-radius: 2px; border: 1px solid currentColor; vertical-align: .12em; white-space: nowrap; cursor: help; }
.b-physics { color: var(--b-physics); } .b-design { color: var(--b-design); } .b-challenge { color: var(--b-challenge); }
.b-fiction { color: var(--b-fiction); } .b-law { color: var(--b-law); } .b-illustrative { color: var(--b-illustrative); } .b-styled { color: var(--b-styled); }
html.hide-basis .b { display: none; }

.table-wrap { overflow-x: auto; margin: 1em 0 1.6em; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; }

figure.diagram { margin: 1.6em -4px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
figure.diagram svg { width: 100%; height: auto; max-height: 78vh; display: block; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; max-width: 70ch; }
.dg text { fill: var(--text); font-family: var(--sans); }
.dg-l { font-size: 15px; } .dg-strong { font-weight: 600; font-size: 16px; } .dg-in { font-size: 14px; fill: #fff; font-weight: 500; }
.dg-note { font-size: 13.5px; fill: var(--muted); } .dg-gold { fill: var(--heritage-gold); } .dg-sunt { fill: #ffd98a; }
.dg-orbit { fill: none; stroke: #2a3446; stroke-width: 1; }
.dg-gw { stroke: var(--heritage-gold); stroke-dasharray: 4 4; }
.dg-sun { stroke: #ffd98a; stroke-width: 2; stroke-dasharray: 2 5; }
.dg-grid { stroke: #243049; stroke-width: 1; }
@media (max-width: 640px) { figure.diagram { overflow-x: auto; } figure.diagram svg { min-width: 640px; max-height: none; } }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 1.2em 0; padding: 0; list-style: none; }
.cards li { max-width: none; }
.card { display: block; height: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; text-decoration: none; color: var(--text); border-top: 3px solid var(--card, var(--accent)); }
.card:hover { background: var(--panel-2); }
.card h3 { margin: 0 0 4px; font-size: 18px; }
.card p { margin: 0; font-size: 14.5px; color: var(--muted); }
.card .meta { font: 12px var(--mono); color: var(--accent); margin-bottom: 6px; display: block; }

.hero { text-align: left; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.2em 0 0; }
.btn { display: inline-block; padding: 10px 20px; border-radius: 3px; text-decoration: none; font-weight: 600; border: 1px solid var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--bg); }
.btn:hover { background: #e3bd6c; color: var(--bg); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 1.2em 0; }
.fact { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 10px 14px; }
.fact strong { display: block; font: 500 24px var(--mono); color: var(--saturn-butter); }
.fact span { font-size: 13.5px; color: var(--muted); }
.chapter { border-top: 1px solid var(--line); padding: 20px 0; display: grid; grid-template-columns: 56px 1fr; gap: 6px 16px; }
.chapter .n { font: 500 30px var(--mono); color: var(--accent); }
.chapter h2 { margin: 0; padding: 0; border: 0; font-size: 22px; }
.chapter p { margin: .3em 0; }
.chapter .shots { font: 13px var(--mono); color: var(--muted); }
.chapter .shots a { margin-right: 10px; }
.vehicle h2 { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.vehicle h2 small { font: 13px var(--mono); color: var(--muted); font-weight: 400; }
.note { border-left: 3px solid var(--accent); background: var(--panel); padding: 10px 16px; margin: 1.4em 0; }
.note p { margin: .4em 0; }
.foot { border-top: 1px solid var(--line); padding: 22px 20px 40px; color: var(--muted); font-size: 14px; max-width: 1060px; margin: 0 auto; }
.foot p { margin: .3em 0; max-width: none; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .top { position: static; }
  .primary { margin-left: 0; width: 100%; }
  main { padding: 24px 16px 48px; }
  .chapter { grid-template-columns: 40px 1fr; }
}
@media (prefers-reduced-motion: no-preference) { a, .card { transition: background .15s, color .15s; } }
