/* Galactism — shared styles
   Palette and type follow the original single-page site:
   void / ember / bone, Cormorant Garamond for display, Spectral for text. */
:root {
  --void: #0a0a0f;
  --deep: #111119;
  --raised: #171722;
  --line: rgba(200, 147, 90, 0.18);
  --line-soft: rgba(212, 208, 200, 0.10);
  --ember: #c8935a;
  --ember-dim: #9a714a;
  --ember-glow: #e8b87a;
  --ash: #8a8a9a;
  --bone: #d4d0c8;
  --parchment: #e8e4da;
  --human: #f2a54a;
  --machine: #67d3e1;
  --display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --text: 'Spectral', Georgia, 'Times New Roman', serif;
  --nav-h: 3.25rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--void); scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); }
body {
  margin: 0;
  font-family: var(--text);
  font-weight: 300;
  background: var(--void);
  color: var(--bone);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--ember-glow); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--parchment); }
:focus-visible { outline: 2px solid var(--ember-glow); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; z-index: 200; background: var(--deep); color: var(--parchment); padding: 0.6rem 1rem; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 clamp(1rem, 3vw, 2rem);
  background: linear-gradient(to bottom, rgba(10, 10, 15, 0.94), rgba(10, 10, 15, 0.78));
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-brand {
  display: flex; align-items: center; gap: 0.55rem; flex: none;
  font-family: var(--display); font-weight: 400; font-size: 1.15rem;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--parchment); text-decoration: none;
}
.nav-brand img { width: 22px; height: 22px; display: block; }
.nav-links {
  display: flex; gap: clamp(0.9rem, 2.2vw, 1.9rem); margin: 0 0 0 auto; padding: 0; list-style: none;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  display: block; padding: 0.9rem 0 0.8rem; white-space: nowrap;
  font-family: var(--display); font-weight: 500; font-size: 1.08rem; letter-spacing: 0.05em;
  color: var(--ash); text-decoration: none; border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--parchment); }
.nav-links a[aria-current="page"] { color: var(--ember-glow); border-bottom-color: var(--ember); }
@media (max-width: 720px) {
  .nav { gap: 0.9rem; }
  .nav-brand span { display: none; }
  .nav-links { margin-left: 0; -webkit-mask-image: linear-gradient(to right, #000 88%, transparent); mask-image: linear-gradient(to right, #000 88%, transparent); padding-right: 1.5rem; }
}

/* ---------- Starfield + grain (text pages) ---------- */
#starfield { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}

/* ---------- Prose pages ---------- */
.page { position: relative; z-index: 1; padding: calc(var(--nav-h) + clamp(3rem, 9vw, 6rem)) clamp(1.25rem, 4vw, 2rem) 4rem; }
.measure { max-width: 660px; margin: 0 auto; }
.wide { max-width: 1040px; margin: 0 auto; }
.page-title {
  font-family: var(--display); font-weight: 300; font-size: clamp(2.3rem, 6vw, 3.8rem);
  letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.12;
  color: var(--parchment); margin: 0 0 1.4rem;
}
.lede { font-family: var(--display); font-style: italic; font-weight: 300; font-size: clamp(1.25rem, 2.6vw, 1.55rem); line-height: 1.6; color: var(--ash); margin: 0 0 3rem; }
.rule { width: 60px; height: 1px; background: var(--ember); border: 0; margin: 0 0 2.2rem; }
.prose h2 {
  font-family: var(--display); font-weight: 400; font-size: clamp(1.5rem, 3.4vw, 2rem);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--parchment);
  margin: 4.5rem 0 1.4rem; line-height: 1.25;
}
.prose h3 { font-family: var(--display); font-weight: 500; font-size: 1.4rem; color: var(--ember-glow); margin: 2.4rem 0 0.7rem; letter-spacing: 0.02em; }
.prose p, .prose li { font-size: clamp(1.03rem, 1.9vw, 1.14rem); line-height: 1.85; }
.prose p { margin: 0 0 1.5rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.5rem; }
.prose li { margin-bottom: 0.55rem; }
.prose strong { font-weight: 500; color: var(--parchment); }
.prose em { color: var(--ember-glow); }
.prose .aside { border-left: 1px solid var(--ember-dim); padding: 0.15rem 0 0.15rem 1.2rem; color: var(--ash); margin: 0 0 1.5rem; }
.prose .aside p:last-child { margin-bottom: 0; }
.figure-num { font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, 6vw, 3.4rem); color: var(--ember-glow); line-height: 1; font-variant-numeric: lining-nums; }
.sources { font-size: 0.92rem; line-height: 1.65; color: var(--ash); }
.sources li { font-size: 0.92rem; line-height: 1.6; margin-bottom: 0.4rem; }
table.plain { width: 100%; border-collapse: collapse; margin: 0 0 1.8rem; font-size: 0.98rem; font-variant-numeric: lining-nums tabular-nums; }
table.plain th, table.plain td { text-align: left; padding: 0.55rem 0.9rem 0.55rem 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.plain th { font-weight: 400; color: var(--ash); font-size: 0.9rem; }
.table-scroll { overflow-x: auto; }

/* contents list on Findings */
.toc { list-style: none; padding: 0; margin: 0 0 1rem; border-top: 1px solid var(--line-soft); }
.prose .toc { padding: 0; }
.prose .toc li, .toc li { margin: 0; border-bottom: 1px solid var(--line-soft); }
.toc a { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: baseline; padding: 0.95rem 0; text-decoration: none; color: var(--bone); }
.toc a:hover .toc-q { color: var(--ember-glow); }
.toc-q { font-family: var(--display); font-size: 1.35rem; font-weight: 500; color: var(--parchment); line-height: 1.3; }
.toc-a { color: var(--ash); font-size: 0.95rem; text-align: right; max-width: 22ch; line-height: 1.4; }
@media (max-width: 560px) { .toc a { grid-template-columns: 1fr; gap: 0.2rem; } .toc-a { text-align: left; max-width: none; } }

/* way-finding cards (home, footers of explorers) */
.places { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); margin: 0 auto; max-width: 1040px; }
.place { min-width: 0; background: var(--void); padding: 0; text-decoration: none; color: var(--bone); display: flex; flex-direction: column; }
.place img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; display: block; opacity: 0.86; transition: opacity 0.4s ease; }
.place:hover img { opacity: 1; }
.place-body { padding: 1.3rem 1.4rem 1.6rem; }
.place-scale { font-size: 0.9rem; color: var(--ember); font-variant-numeric: lining-nums; }
.place-name { font-family: var(--display); font-weight: 400; font-size: 1.65rem; letter-spacing: 0.05em; color: var(--parchment); margin: 0.15rem 0 0.5rem; }
.place-text { font-size: 0.98rem; line-height: 1.65; color: var(--ash); margin: 0; }
@media (max-width: 820px) { .places { grid-template-columns: 1fr; } }

.button {
  display: inline-block; font-family: var(--display); font-weight: 500; font-size: 1.05rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ember-glow); text-decoration: none; padding: 0.85rem 1.9rem; border: 1px solid rgba(200, 147, 90, 0.35); background: transparent; cursor: pointer;
  transition: border-color 0.4s ease, color 0.4s ease;
}
.button:hover { color: var(--parchment); border-color: var(--ember); }

.footer { position: relative; z-index: 1; text-align: center; padding: 4rem 1.5rem 3rem; color: var(--ash); font-size: 0.88rem; }
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.4rem; margin-bottom: 1.2rem; }
.footer a { color: var(--ash); text-decoration: none; }
.footer a:hover { color: var(--ember-glow); }
.footer p { margin: 0; opacity: 0.6; letter-spacing: 0.05em; }

/* ---------- Explorers (Neighborhood, Kiloparsec) ---------- */
.xp { position: relative; z-index: 1; padding-top: var(--nav-h); }
#gl { pointer-events: none; }
.xp-stage { position: relative; height: calc(100vh - var(--nav-h)); height: calc(100svh - var(--nav-h)); min-height: 520px; overflow: hidden; background: var(--void); }
.xp-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; outline: none; }
.xp-stage canvas.dragging { cursor: grabbing; }
.xp-stage canvas.pointing { cursor: pointer; }
.xp-stage canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--ember-dim); }
.xp-title { position: absolute; left: clamp(1rem, 3vw, 2rem); top: 1.4rem; max-width: 25rem; pointer-events: none; text-shadow: 0 1px 12px var(--void), 0 0 2px var(--void); }
.xp-title h1 { font-family: var(--display); font-weight: 300; font-size: clamp(1.7rem, 3.6vw, 2.5rem); letter-spacing: 0.14em; text-transform: uppercase; color: var(--parchment); margin: 0 0 0.5rem; line-height: 1.15; }
.xp-title p { margin: 0; font-size: 0.98rem; line-height: 1.6; color: var(--ash); }

.panel { background: rgba(14, 14, 21, 0.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--line-soft); }
.xp-controls { position: absolute; left: clamp(1rem, 3vw, 2rem); bottom: 1.4rem; width: min(23.5rem, calc(100% - 2rem)); padding: 1rem 1.15rem 1.1rem; font-size: 0.93rem; }
.xp-controls fieldset { border: 0; padding: 0; margin: 0 0 0.95rem; min-width: 0; }
.xp-controls fieldset:last-child { margin-bottom: 0; }
.xp-controls legend, .ctl-label { padding: 0; font-family: var(--display); font-weight: 500; font-size: 1.12rem; letter-spacing: 0.04em; color: var(--parchment); margin-bottom: 0.35rem; display: block; }
.ctl-note { color: var(--ash); font-size: 0.88rem; line-height: 1.5; margin: 0.35rem 0 0; min-height: 1.4em; font-variant-numeric: lining-nums tabular-nums; }
.ctl-note b { font-weight: 400; color: var(--ember-glow); }
.check { display: flex; align-items: center; gap: 0.55rem; padding: 0.16rem 0; cursor: pointer; line-height: 1.35; }
.check input { accent-color: var(--ember); width: 1rem; height: 1rem; margin: 0; flex: none; }
.check .dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; flex: none; }
.check .n { color: var(--ash); margin-left: auto; font-variant-numeric: lining-nums tabular-nums; font-size: 0.86rem; }
.row { display: flex; align-items: center; gap: 0.7rem; }
input[type="range"] { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 1.4rem; background: transparent; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--ember) var(--fill, 0%), rgba(212, 208, 200, 0.22) var(--fill, 0%)); }
input[type="range"]::-moz-range-track { height: 2px; background: rgba(212, 208, 200, 0.22); }
input[type="range"]::-moz-range-progress { height: 2px; background: var(--ember); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--ember-glow); border: 2px solid var(--void); margin-top: -6px; cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--ember-glow); border: 2px solid var(--void); cursor: pointer; }
.tool { font-family: var(--text); font-weight: 300; font-size: 0.9rem; color: var(--bone); background: rgba(212, 208, 200, 0.06); border: 1px solid var(--line-soft); padding: 0.32rem 0.7rem; cursor: pointer; line-height: 1.3; }
.tool:hover { border-color: var(--ember-dim); color: var(--parchment); }
.tool[aria-pressed="true"] { border-color: var(--ember); color: var(--ember-glow); }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.55rem; }
.xp-tools { position: absolute; right: clamp(1rem, 3vw, 2rem); bottom: 1.4rem; display: flex; flex-direction: column; gap: 0.35rem; align-items: stretch; }
.xp-tools .tool { text-align: center; background: rgba(14, 14, 21, 0.86); }
.xp-tools .zoom { display: flex; gap: 0.35rem; }
.xp-tools .zoom .tool { flex: 1; font-size: 1.1rem; padding: 0.2rem 0.7rem; }

.xp-card { position: absolute; right: clamp(1rem, 3vw, 2rem); top: 1.4rem; width: min(21rem, calc(100% - 2rem)); padding: 1.1rem 1.25rem 1.2rem; max-height: calc(100% - 9.5rem); overflow-y: auto; }
.xp-card[hidden] { display: none; }
.xp-card h2 { font-family: var(--display); font-weight: 500; font-size: 1.55rem; color: var(--parchment); margin: 0 1.6rem 0.15rem 0; line-height: 1.2; letter-spacing: 0.02em; }
.xp-card .kind { color: var(--ember-glow); font-size: 0.93rem; margin: 0 0 0.75rem; }
.xp-card p { font-size: 0.95rem; line-height: 1.6; margin: 0 0 0.75rem; }
.xp-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1rem; font-size: 0.9rem; font-variant-numeric: lining-nums tabular-nums; }
.xp-card dt { color: var(--ash); }
.xp-card dd { margin: 0; text-align: right; color: var(--parchment); }
.xp-card .fine { color: var(--ash); font-size: 0.84rem; margin: 0.75rem 0 0; }
.xp-card .close { position: absolute; right: 0.5rem; top: 0.45rem; width: 2rem; height: 2rem; background: none; border: 0; color: var(--ash); font-size: 1.35rem; line-height: 1; cursor: pointer; }
.xp-card .close:hover { color: var(--parchment); }
.xp-card .go { display: inline-block; margin-top: 0.8rem; font-size: 0.95rem; }
.xp-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2rem; color: var(--ash); }
.xp-msg[hidden] { display: none; }
.xp-msg div { max-width: 30rem; }

@media (max-width: 860px) {
  .xp-stage { height: 64vh; height: 64svh; min-height: 400px; }
  .xp-title { top: 0.9rem; max-width: calc(100% - 2rem); }
  .xp-title p { display: none; }
  .xp-controls { position: static; width: auto; border-left: 0; border-right: 0; padding: 1.1rem clamp(1rem, 3vw, 2rem) 1.3rem; -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--deep); }
  .xp-tools { bottom: 0.8rem; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; left: 1rem; }
  .xp-card { top: auto; bottom: 3.4rem; right: 0.6rem; left: 0.6rem; width: auto; max-height: 55%; }
}

/* ---------- Home page (kept from the original design) ---------- */
.home .section { position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 6rem 2rem; }
.home .content { max-width: 640px; width: 100%; }
.hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4rem 2rem; position: relative; z-index: 1; }
.hero-title { font-family: var(--display); font-weight: 300; font-size: clamp(2.6rem, 8vw, 6.5rem); letter-spacing: 0.25em; text-indent: 0.25em; text-transform: uppercase; color: var(--parchment); margin: 0 0 2rem; opacity: 0; animation: breatheIn 3s ease-out 0.5s forwards; }
.hero-line { width: 60px; height: 1px; background: var(--ember); margin: 0 auto 2.5rem; opacity: 0; animation: breatheIn 2s ease-out 1.8s forwards; }
.hero-epigraph { font-family: var(--display); font-weight: 300; font-style: italic; font-size: clamp(1.15rem, 2.8vw, 1.5rem); line-height: 1.9; color: var(--ash); letter-spacing: 0.04em; max-width: 520px; margin: 0 auto; opacity: 0; animation: breatheIn 2.5s ease-out 2.5s forwards; }
.scroll-cue { position: absolute; bottom: 3rem; left: 50%; transform: translateX(-50%); opacity: 0; animation: breatheIn 2s ease-out 4s forwards, drift 3s ease-in-out infinite 4s; }
.scroll-cue span { display: block; width: 1px; height: 40px; background: linear-gradient(to bottom, var(--ember-dim), transparent); }
.narrative { padding: 8rem 2rem; }
.narrative .content { max-width: 600px; }
.narrative p { font-weight: 300; font-size: clamp(1.05rem, 2vw, 1.2rem); line-height: 2; color: var(--bone); margin: 0 0 2.2rem; }
.narrative p em { font-style: italic; color: var(--ember-glow); }
.narrative p strong { font-weight: 400; color: var(--parchment); }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1.2s ease-out, transform 1.2s ease-out; }
.reveal.visible { opacity: 1; transform: none; }
.divider { display: flex; align-items: center; justify-content: center; padding: 4rem 2rem; position: relative; z-index: 1; }
.divider-symbol { font-family: var(--display); font-weight: 300; font-size: 1.5rem; color: var(--ember-dim); letter-spacing: 0.8em; }
.pull-quote { padding: 6rem 2rem; text-align: center; position: relative; z-index: 1; }
.pull-quote blockquote { font-family: var(--display); font-weight: 300; font-style: italic; font-size: clamp(1.4rem, 3.5vw, 2rem); line-height: 1.7; color: var(--ember-glow); max-width: 580px; margin: 0 auto; }
.section-heading { font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: 0.12em; text-transform: uppercase; color: var(--parchment); text-align: center; margin: 0 0 4rem; }
.see { position: relative; z-index: 1; padding: 5rem clamp(1.25rem, 4vw, 2rem) 6rem; }
.see-intro { max-width: 600px; margin: 0 auto 3.5rem; text-align: center; }
.see-intro p { font-size: clamp(1.05rem, 2vw, 1.2rem); line-height: 1.9; color: var(--bone); margin: 0; }
.see-more { text-align: center; margin-top: 2.5rem; color: var(--ash); }
.bridge { text-align: center; padding: 8rem 2rem 6rem; position: relative; z-index: 1; }
.bridge-text { font-weight: 200; font-size: 1rem; color: var(--ash); margin: 0 auto 2.5rem; max-width: 420px; line-height: 1.8; }
.bridge-text em { color: var(--ember-dim); }
@keyframes breatheIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes drift { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }
@media (max-width: 640px) { .narrative { padding: 5rem 1.5rem; } .narrative p { line-height: 1.85; } .hero { padding: 3rem 1.5rem; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-title, .hero-line, .hero-epigraph, .scroll-cue { animation: none; opacity: 1; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

.xp-card [hidden] { display: none !important; }
@media (min-width: 861px) { .xp-controls.narrow { width: 19rem; } }

/* ---------- Galaxy simulation ---------- */
:root { --ink: #e8e4da; --muted: #8a8a9a; --rule: rgba(212, 208, 200, 0.16); }
.gal { position: relative; z-index: 1; padding-top: var(--nav-h); font-variant-numeric: lining-nums tabular-nums; }
.gal .wrap { max-width: 1320px; margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 3vw, 2.25rem) 2rem; }
.gal .masthead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 0.75rem 3rem; align-items: end; }
.gal .masthead .page-title { margin: 0; }
.gal .masthead .lede { margin: 0; font-size: clamp(1.1rem, 2vw, 1.3rem); }
@media (max-width: 860px) { .gal .masthead { grid-template-columns: 1fr; } }
.gal .console { margin-top: 1.9rem; display: flex; flex-wrap: wrap; gap: 0.85rem 1.4rem; align-items: center; padding: 0.85rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.gal .clock { display: flex; flex-direction: column; min-width: 13ch; margin-right: auto; }
.gal .clock-main { font-family: var(--display); font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 400; color: var(--parchment); line-height: 1; }
.gal .clock-sub { color: var(--ash); font-size: 0.88rem; margin-top: 0.3rem; }
.gal .ctrl { display: flex; align-items: center; gap: 0.5rem; font-size: 0.92rem; color: var(--ash); }
.gal .ctrl input[type="range"] { width: 120px; flex: none; }
.gal select, .gal button, .gal table.params input { font-family: var(--text); font-weight: 300; font-size: 0.92rem; color: var(--bone); background: rgba(212, 208, 200, 0.06); border: 1px solid var(--rule); border-radius: 0; padding: 0.42rem 0.75rem; }
.gal button { cursor: pointer; }
.gal button:hover, .gal select:hover { border-color: var(--ember-dim); color: var(--parchment); }
.gal button.primary { border-color: var(--ember); color: var(--ember-glow); min-width: 5.5em; }
.gal select option { background: var(--deep); color: var(--bone); }
.gal .preset-note { flex-basis: 100%; margin: 0; font-size: 0.93rem; line-height: 1.55; color: var(--ash); max-width: 95ch; }
@media (max-width: 600px) { .gal .clock { flex-basis: 100%; margin-right: 0; } }
.gal .views { margin-top: 1.1rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 860px) { .gal .views { grid-template-columns: 1fr; } }
.gal figure.view { margin: 0; min-width: 0; }
.gal .stage { position: relative; aspect-ratio: 1 / 1; background: #07070c; border: 1px solid var(--line-soft); overflow: hidden; touch-action: pan-y; cursor: grab; }
.gal .stage:active { cursor: grabbing; }
.gal .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gal .stage .tag { position: absolute; left: 0.9rem; top: 0.7rem; font-family: var(--display); font-weight: 500; font-size: 1.25rem; letter-spacing: 0.03em; color: var(--parchment); pointer-events: none; display: flex; align-items: center; gap: 0.5rem; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7); }
.gal .swatch { width: 0.65rem; height: 0.65rem; border-radius: 50%; display: inline-block; }
.gal .sw-h { background: var(--human); } .gal .sw-m { background: var(--machine); }
.gal figcaption { margin-top: 0.7rem; }
.gal .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem 1rem; margin: 0; }
.gal .stats div { min-width: 0; }
.gal .stats dt { font-size: 0.84rem; color: var(--ash); }
.gal .stats dd { margin: 0.1rem 0 0; font-size: 1.05rem; color: var(--parchment); overflow-wrap: anywhere; }
.gal .stats dd.big { font-family: var(--display); font-size: 1.7rem; line-height: 1.1; color: var(--ember-glow); }
.gal .regime { margin: 0.7rem 0 0; font-size: 0.93rem; line-height: 1.55; color: var(--ash); min-height: 3em; }
.gal .regime b { color: var(--parchment); font-weight: 400; }
.gal .mapbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.8rem; font-size: 0.9rem; color: var(--ash); }
.gal .mapbar label { display: inline-flex; gap: 0.4rem; align-items: center; margin-left: 0.3rem; }
.gal .mapbar input[type="checkbox"] { accent-color: var(--ember); }
.gal .mapbar .hint { margin-left: auto; }
@media (max-width: 600px) { .gal .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gal .mapbar .hint { margin-left: 0; flex-basis: 100%; } }
.gal h2 { font-family: var(--display); font-weight: 500; font-size: 1.45rem; letter-spacing: 0.02em; color: var(--parchment); margin: 0 0 0.8rem; }
.gal .lower { margin-top: 2.6rem; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 2.4rem; }
@media (max-width: 960px) { .gal .lower { grid-template-columns: 1fr; } }
.gal .chartwrap { position: relative; height: 260px; }
.gal #chart { position: absolute; inset: 0; width: 100%; height: 100%; }
.gal .legend { display: flex; gap: 1.2rem; font-size: 0.9rem; color: var(--ash); margin-top: 0.5rem; }
.gal .legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.gal table.ms { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.gal table.ms th { text-align: left; font-weight: 400; color: var(--ash); font-size: 0.86rem; padding: 0 0 0.4rem; border-bottom: 1px solid var(--rule); }
.gal table.ms th.num, .gal table.ms td.num { text-align: right; white-space: nowrap; }
.gal table.ms td { padding: 0.45rem 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; line-height: 1.4; }
.gal table.ms td.num { padding-left: 0.8rem; color: var(--parchment); }
.gal table.ms td.pending { color: var(--ash); opacity: 0.6; }
.gal .th-h { color: var(--human) !important; } .gal .th-m { color: var(--machine) !important; }
.gal .assume { margin-top: 2.6rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.gal .assume summary { cursor: pointer; padding: 0.9rem 0; font-family: var(--display); font-weight: 500; font-size: 1.3rem; color: var(--parchment); }
.gal .assume summary:hover { color: var(--ember-glow); }
.gal .assume-head p { margin: 0 0 0.8rem; color: var(--ash); font-size: 0.95rem; line-height: 1.55; max-width: 75ch; }
.gal .tablewrap { overflow-x: auto; }
.gal table.params { border-collapse: collapse; min-width: 640px; width: 100%; font-size: 0.95rem; }
.gal table.params th, .gal table.params td { padding: 0.5rem 0.65rem 0.5rem 0; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; font-weight: 300; }
.gal table.params thead th { font-size: 0.86rem; color: var(--ash); }
.gal table.params td.why { color: var(--ash); font-size: 0.86rem; line-height: 1.45; max-width: 34ch; }
.gal table.params input { width: 6.5em; padding: 0.3rem 0.45rem; }
.gal table.params td.na { color: var(--ash); }
.gal .assume-actions { margin: 0.9rem 0 1.1rem; display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; }
.gal .assume-actions span { font-size: 0.9rem; color: var(--ash); }
.prose .eq { font-size: 0.98rem; background: var(--deep); border: 1px solid var(--line-soft); padding: 0.75rem 0.9rem; white-space: nowrap; margin: 0 0 1.5rem; color: var(--parchment); }

/* ---------- Responses ---------- */
.resp { border-left: 1px solid var(--ember-dim); padding: 0.1rem 0 0.1rem 1.2rem; margin: 0 0 2rem; }
.resp-agent { border-left-color: var(--machine); }
.prose .resp p { margin: 0 0 0.7rem; }
.prose .resp-head { font-size: 0.95rem; color: var(--ash); }
.resp-kind { font-family: var(--display); font-weight: 500; font-size: 1.2rem; color: var(--ember-glow); letter-spacing: 0.02em; }
.resp-agent .resp-kind { color: var(--machine); }
.prose .resp-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.03rem; line-height: 1.75; }
.prose .resp-src, .prose .resp-by { font-size: 0.9rem; line-height: 1.5; color: var(--ash); overflow-wrap: anywhere; }
.resp-reply { margin: 0.9rem 0 0; padding: 0.8rem 1rem; background: var(--deep); border: 1px solid var(--line-soft); }
.prose .resp-reply p { font-size: 0.98rem; line-height: 1.65; white-space: pre-wrap; }
.prose .resp-reply p:last-child { margin-bottom: 0; }
.prose .resp-reply-by { font-family: var(--display); font-weight: 500; font-size: 1.05rem; color: var(--parchment); }
.prose h3.resp-title { margin-top: 1.6rem; }
.prose .resp-link { font-size: 0.98rem; margin: -0.6rem 0 0; }
.resp-form { margin: 0 0 1rem; }
.resp-form .field { margin: 0 0 1.3rem; }
.resp-form label, .resp-form legend { display: block; font-family: var(--display); font-weight: 500; font-size: 1.2rem; color: var(--parchment); margin: 0 0 0.35rem; padding: 0; }
.resp-form .hint { font-size: 0.9rem; color: var(--ash); margin: 0 0 0.4rem; line-height: 1.5; }
.resp-form select, .resp-form input[type="text"], .resp-form input[type="url"], .resp-form textarea {
  width: 100%; font-family: var(--text); font-weight: 300; font-size: 1.03rem; line-height: 1.6; color: var(--parchment);
  background: rgba(17, 17, 25, 0.9); border: 1px solid var(--line-soft); border-radius: 0; padding: 0.6rem 0.8rem; }
.resp-form select option { background: var(--deep); }
.resp-form textarea { min-height: 11rem; resize: vertical; }
.resp-form select:focus, .resp-form input:focus, .resp-form textarea:focus { border-color: var(--ember); outline: none; }
.resp-form fieldset { border: 0; padding: 0; margin: 0 0 1.3rem; min-width: 0; }
.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.kinds label { display: flex; gap: 0.6rem; align-items: baseline; font-family: var(--text); font-weight: 300; font-size: 0.98rem; color: var(--bone); border: 1px solid var(--line-soft); padding: 0.6rem 0.8rem; cursor: pointer; margin: 0; line-height: 1.45; }
.kinds label:has(input:checked) { border-color: var(--ember); }
.kinds input { accent-color: var(--ember); flex: none; }
.kinds b { font-weight: 400; color: var(--parchment); }
@media (max-width: 560px) { .kinds { grid-template-columns: 1fr; } }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }
.resp-count { float: right; font-size: 0.86rem; color: var(--ash); font-variant-numeric: lining-nums tabular-nums; }
.resp-note { min-height: 1.6em; font-size: 0.98rem; color: var(--ember-glow); margin: 0.9rem 0 0; }
.resp-note.bad { color: #f0a08c; }
.resp-form button[disabled] { opacity: 0.45; cursor: default; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.prose pre { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.84rem; line-height: 1.6; background: var(--deep); border: 1px solid var(--line-soft); padding: 0.9rem 1rem; overflow-x: auto; margin: 0 0 1.5rem; color: var(--bone); }
.resp-filter { display: flex; align-items: center; gap: 0.7rem; margin: 0 0 1.8rem; font-size: 0.95rem; color: var(--ash); }
.resp-filter select { font-family: var(--text); font-weight: 300; font-size: 0.95rem; color: var(--bone); background: var(--deep); border: 1px solid var(--line-soft); padding: 0.4rem 0.6rem; max-width: 100%; }

/* four way-finding cards on the home page */
.places.four { max-width: 1240px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.places.four .place-name { font-size: 1.45rem; }
@media (max-width: 1080px) { .places.four { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; } }
@media (max-width: 600px) { .places.four { grid-template-columns: 1fr; } }
@media (max-width: 1040px) { .nav-links { -webkit-mask-image: linear-gradient(to right, #000 90%, transparent); mask-image: linear-gradient(to right, #000 90%, transparent); padding-right: 1.5rem; } }

.row.wrap { flex-wrap: wrap; }
.row.wrap input[type="range"] { min-width: 7rem; }
select.tool { -webkit-appearance: auto; appearance: auto; padding: 0.28rem 0.4rem; }
select.tool option { background: var(--deep); color: var(--bone); }
