:root {
  color-scheme: light;
  --paper: #f3f0e9;
  --paper-deep: #e8e3d8;
  --ink: #141413;
  --muted: #6d6a64;
  --line: rgba(20, 20, 19, 0.16);
  --dark: #171716;
  --dark-soft: #232321;
  --cream: #f8f5ee;
  --selected-bg: #f8f5ee;
  --selected-fg: #171716;
  --selected-muted: #716e67;
  --orange: #ff5c35;
  --blue: #748cff;
  --violet: #a77dff;
  --shell: 1200px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0b0b0a;
  --paper-deep: #171715;
  --ink: #f4f1ea;
  --muted: #9b9891;
  --line: rgba(244, 241, 234, 0.17);
  --dark: #050504;
  --dark-soft: #151513;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Manrope", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color 260ms ease, color 260ms ease;
}
button, input { font: inherit; }
a { color: inherit; }
.shell { width: min(var(--shell), calc(100% - 48px)); margin-inline: auto; }
.site-header {
  min-height: 82px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
}
.site-header > p { margin: 0; color: var(--muted); }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 9px; width: max-content; text-decoration: none; font-weight: 600; letter-spacing: -0.03em; }
.brand-mark { width: 13px; height: 13px; border-radius: 50%; background: var(--orange); box-shadow: inset -3px -2px 5px rgba(0, 0, 0, 0.18); }
.text-link { color: var(--muted); text-decoration: none; }
.text-link:hover { color: var(--ink); }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.68rem;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); }
.theme-toggle-mark {
  width: 12px;
  height: 12px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
  transform: rotate(0deg);
  transition: transform 260ms ease;
}
.theme-toggle[aria-pressed="false"] .theme-toggle-mark { transform: rotate(180deg); }
.kicker, .section-index, .live-result-label { font: 500 0.68rem/1.3 "DM Mono", monospace; letter-spacing: 0.12em; }

.hero {
  min-height: 760px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(440px, 0.95fr);
  gap: clamp(40px, 7vw, 110px);
  align-items: center;
  padding-block: 72px 96px;
}
.hero-copy { position: relative; z-index: 2; }
.kicker { margin: 0 0 28px; color: var(--muted); }
h1 { margin: 0; font-size: clamp(4.2rem, 7.2vw, 7.25rem); line-height: 0.91; letter-spacing: -0.076em; font-weight: 500; }
h1 em { color: var(--orange); font-style: normal; }
.hero-intro { max-width: 560px; margin: 34px 0 36px; color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.hero-cta { display: inline-flex; align-items: center; gap: 42px; padding: 15px 18px; border: 1px solid var(--ink); text-decoration: none; font-size: 0.8rem; font-weight: 600; transition: background 180ms ease, color 180ms ease; }
.hero-cta:hover { background: var(--ink); color: var(--paper); }
.hero-visual {
  --orb-shift-x: 0px;
  --orb-shift-y: 0px;
  --orb-tilt-x: 0deg;
  --orb-tilt-y: 0deg;
  --orb-scale: 1;
  --light-x: 32%;
  --light-y: 28%;
  --orb-hue: 0deg;
  --core-size: 18%;
  position: relative;
  min-height: 590px;
  display: grid;
  place-items: center;
  isolation: isolate;
  perspective: 1000px;
}
.orb {
  position: absolute;
  width: min(410px, 78%);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at var(--light-x) var(--light-y), rgba(255,255,255,0.96), transparent var(--core-size)),
    radial-gradient(circle at 34% 34%, #ffbf84 0, #ff6b43 24%, transparent 47%),
    radial-gradient(circle at 68% 68%, #5d75ff 0, #915cff 33%, #231f3f 72%);
  box-shadow: 0 44px 90px rgba(66, 48, 118, 0.28), inset -30px -32px 60px rgba(18, 13, 40, 0.35);
  overflow: hidden;
  filter: hue-rotate(var(--orb-hue));
  transform: translate3d(var(--orb-shift-x), var(--orb-shift-y), 0) rotateX(var(--orb-tilt-x)) rotateY(var(--orb-tilt-y));
  scale: var(--orb-scale);
  transition: filter 500ms ease, box-shadow 500ms ease, scale 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
.orb::before {
  content: "";
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: conic-gradient(from 30deg, transparent, rgba(255,255,255,0.14), transparent 30%, rgba(255,255,255,0.08), transparent 62%);
  mix-blend-mode: overlay;
  animation: surface-turn 24s linear infinite;
}
.orb::after { content: ""; position: absolute; inset: 9%; border-radius: 50%; border: 1px solid rgba(255,255,255,0.28); filter: blur(0.2px); }
.orb span {
  position: absolute;
  inset: -4%;
  background: repeating-radial-gradient(circle at 68% 70%, transparent 0 8px, rgba(255,255,255,0.065) 9px 10px);
  mix-blend-mode: overlay;
  animation: surface-breathe 8s ease-in-out infinite alternate;
}
.hero-visual.is-updating .orb {
  --orb-scale: 1.035;
  box-shadow: 0 52px 110px rgba(66, 48, 118, 0.36), inset -30px -32px 60px rgba(18, 13, 40, 0.3);
}
.orbit { position: absolute; border: 1px solid var(--line); border-radius: 50%; transform: rotate(-14deg); }
.orbit::after { content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); top: 15%; right: 12%; }
.orbit-one { width: 92%; aspect-ratio: 1.25; animation: orbit-one 22s linear infinite; }
.orbit-two { width: 100%; aspect-ratio: 1.5; transform: rotate(24deg); opacity: 0.58; animation: orbit-two 31s linear infinite; }
.orbit-two::after { top: auto; right: auto; left: 8%; bottom: 23%; background: var(--orange); }
.hero-number { position: absolute; z-index: 2; display: flex; flex-direction: column; align-items: center; color: white; text-shadow: 0 2px 18px rgba(17, 12, 30, 0.25); }
.hero-number > span { font: 500 clamp(3.25rem, 5vw, 4.8rem)/0.9 "DM Mono", monospace; letter-spacing: -0.08em; white-space: nowrap; }
.hero-number small { margin-top: 14px; font-size: 0.75rem; }
.hero-visual > p { position: absolute; bottom: 26px; margin: 0; color: var(--muted); font: 400 0.66rem/1.4 "DM Mono", monospace; }

@keyframes orbit-one {
  from { transform: rotate(-14deg); }
  to { transform: rotate(346deg); }
}
@keyframes orbit-two {
  from { transform: rotate(24deg); }
  to { transform: rotate(-336deg); }
}
@keyframes surface-turn {
  to { transform: rotate(360deg); }
}
@keyframes surface-breathe {
  from { transform: translate3d(-1.5%, -1%, 0) scale(0.98); opacity: 0.72; }
  to { transform: translate3d(1.5%, 1%, 0) scale(1.04); opacity: 1; }
}

.idea { padding-block: 110px 130px; border-top: 1px solid var(--line); }
.section-index { margin: 0 0 46px; color: var(--muted); }
.section-index--light { color: rgba(248,245,238,0.48); }
.idea-copy { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 80px; align-items: end; }
h2 { margin: 0; font-size: clamp(3rem, 5.6vw, 5.8rem); line-height: 0.97; letter-spacing: -0.065em; font-weight: 500; }
.idea-copy > p, .explore-heading > p { max-width: 500px; margin: 0; color: var(--muted); line-height: 1.7; }
.equation { margin-top: 80px; padding: 32px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 24px; align-items: center; }
.equation > div { display: flex; flex-direction: column; gap: 11px; }
.equation-label { color: var(--muted); font: 500 0.62rem "DM Mono", monospace; letter-spacing: 0.1em; }
.equation strong { font: 500 clamp(1.2rem, 2.2vw, 2rem) "DM Mono", monospace; letter-spacing: -0.04em; }
.equation-symbol { color: var(--orange); font-size: 1.5rem; }

.explore { padding-block: 110px 130px; background: var(--dark); color: var(--cream); }
.explore-heading { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 80px; align-items: end; }
.explore-heading > p { color: rgba(248,245,238,0.54); }
.control-layout { margin-top: 90px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr); gap: clamp(50px, 8vw, 120px); align-items: stretch; }
.controls { border-top: 1px solid rgba(248,245,238,0.16); }
.control-group { margin: 0; padding: 42px 0 48px; border: 0; border-bottom: 1px solid rgba(248,245,238,0.16); }
.control-group legend { padding: 0; font-size: 1.15rem; font-weight: 500; }
.control-group legend span { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 10px; border: 1px solid rgba(248,245,238,0.28); border-radius: 50%; color: rgba(248,245,238,0.62); font: 400 0.68rem "DM Mono", monospace; }
.control-group > p { max-width: 580px; margin: 14px 0 28px; color: rgba(248,245,238,0.5); font-size: 0.82rem; line-height: 1.6; }
.source-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.source-options button { padding: 18px; border: 1px solid rgba(248,245,238,0.18); border-radius: 16px; background: transparent; color: inherit; text-align: left; cursor: pointer; transition: background 180ms ease, border 180ms ease; }
.source-options button:hover { border-color: rgba(248,245,238,0.42); }
.source-options button[aria-pressed="true"] { border-color: var(--selected-bg); background: var(--selected-bg); color: var(--selected-fg); }
.source-options button span, .source-options button small { display: block; font-size: 0.7rem; color: rgba(248,245,238,0.52); }
.source-options button[aria-pressed="true"] span, .source-options button[aria-pressed="true"] small { color: var(--selected-muted); }
.source-options button strong { display: block; margin: 13px 0 6px; font: 500 1.65rem "DM Mono", monospace; }
.control-group .source-status { margin-bottom: 0; font: 400 0.64rem "DM Mono", monospace; }
.brain-readout { display: flex; align-items: baseline; gap: 10px; margin-bottom: 22px; }
.brain-readout strong { font: 500 2.8rem "DM Mono", monospace; letter-spacing: -0.06em; }
.brain-readout span { color: rgba(248,245,238,0.48); font-size: 0.72rem; }
input[type="range"] { width: 100%; accent-color: var(--orange); cursor: pointer; }
.scale-labels { display: flex; justify-content: space-between; margin-top: 12px; color: rgba(248,245,238,0.42); font: 400 0.58rem/1.5 "DM Mono", monospace; }
.scale-labels span:not(:first-child):not(:last-child) { text-align: center; }
.scale-labels span:last-child { text-align: right; }
.control-group .brain-description { margin-bottom: 0; color: var(--cream); }
.assumption-sources { margin-top: 24px; border-top: 1px solid rgba(248,245,238,0.16); }
.assumption-sources summary { padding: 18px 0 0; color: rgba(248,245,238,0.7); font-size: 0.72rem; cursor: pointer; }
.assumption-sources-body { padding: 18px 0 2px; }
.assumption-sources-body p { margin: 0 0 14px; color: rgba(248,245,238,0.54); font-size: 0.72rem; line-height: 1.62; }
.assumption-sources-body strong { color: var(--cream); font-weight: 500; }
.assumption-links { display: flex; flex-wrap: wrap; gap: 18px; padding-top: 4px; }
.assumption-links a { color: var(--cream); font: 400 0.62rem "DM Mono", monospace; text-decoration: none; }
.assumption-links a:hover { color: var(--orange); }
.live-result { container-type: inline-size; min-height: 620px; padding: clamp(30px, 4vw, 52px); border-radius: 32px; background: linear-gradient(150deg, #ff744d 0%, #ec4e91 35%, #6558e7 72%, #242742 100%); display: flex; flex-direction: column; box-shadow: 0 32px 80px rgba(0,0,0,0.24); overflow: hidden; }
.live-result-label { margin: 0 0 20px; color: rgba(255,255,255,0.7); }
.live-result > strong { max-width: 100%; color: white; font: 500 clamp(2.35rem, 17cqi, 5.25rem)/0.9 "DM Mono", monospace; letter-spacing: -0.08em; white-space: nowrap; }
.live-result > span { margin-top: 12px; color: rgba(255,255,255,0.72); font-size: 0.8rem; }
.constellation { margin: auto 0 34px; display: grid; grid-template-columns: repeat(12, 1fr); gap: 7px; }
.constellation span { aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,0.12); transform: scale(0.72); transition: background 240ms ease, transform 240ms ease; transition-delay: var(--delay); }
.constellation span.is-lit { background: rgba(255,255,255,0.88); transform: scale(1); box-shadow: 0 0 12px rgba(255,255,255,0.25); }
.constellation span.is-partial {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.12);
  transform: scale(1);
  box-shadow: 0 0 12px rgba(255,255,255,0.18);
}
.constellation span.is-partial::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: calc(var(--fraction) * 100%);
  background: rgba(255,255,255,0.92);
  transition: height 240ms ease;
}
.constellation-scale { min-height: 2.8em; margin: -18px 0 22px !important; color: rgba(255,255,255,0.62) !important; font: 400 0.62rem/1.4 "DM Mono", monospace !important; }
.live-result > p { margin: 0; max-width: 390px; color: rgba(255,255,255,0.76); font-size: 0.78rem; line-height: 1.55; }
#result-sentence { min-height: 4.65em; }

.translation { padding-block: 130px; }
.translation-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(60px, 9vw, 130px); align-items: center; }
.translation h2 span { color: var(--orange); }
.translation-grid > div:first-child > p { margin: 30px 0 0; color: var(--muted); }
.chip-field-wrap { padding: 40px; border: 1px solid var(--line); border-radius: 28px; }
.chip-field { display: grid; grid-template-columns: repeat(10, 1fr); gap: 9px; }
.chip-field span { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 4px; transition: background 200ms ease, border-color 200ms ease; }
.chip-field span.is-lit { border-color: var(--ink); background: var(--ink); }
.chip-field span.is-partial {
  border-color: var(--ink);
  background: linear-gradient(to top, var(--ink) calc(var(--fraction) * 100%), transparent 0);
}
.chip-field-wrap p { margin: 26px 0 0; color: var(--muted); font: 400 0.62rem/1.5 "DM Mono", monospace; }

.reality { padding-bottom: 130px; }
.reality details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.reality summary { min-height: 130px; display: flex; align-items: center; justify-content: space-between; gap: 30px; cursor: pointer; list-style: none; }
.reality summary::-webkit-details-marker { display: none; }
.reality summary > span:first-child { display: flex; flex-direction: column; gap: 9px; }
.reality summary small { color: var(--muted); font: 500 0.62rem "DM Mono", monospace; letter-spacing: 0.1em; }
.reality summary strong { font-size: 1.25rem; font-weight: 500; }
.summary-action { display: inline-flex; gap: 18px; align-items: center; color: var(--muted); font-size: 0.76rem; }
.summary-action b { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); font-size: 1.1rem; font-weight: 400; transition: transform 180ms ease; }
.reality details[open] .summary-action b { transform: rotate(45deg); }
.reality-body { display: grid; grid-template-columns: 1fr 0.8fr; gap: 90px; padding: 8px 0 54px; }
.reality-body p { max-width: 590px; margin: 0 0 32px; color: var(--muted); line-height: 1.65; }
.reality-body label { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 0.78rem; }
.reality-body label strong { font-family: "DM Mono", monospace; }
.effective-result { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-left: 48px; border-left: 1px solid var(--line); }
.effective-result span, .effective-result small { color: var(--muted); font-size: 0.72rem; }
.effective-result strong { margin: 14px 0 8px; font: 500 clamp(3rem, 5vw, 5rem)/0.9 "DM Mono", monospace; letter-spacing: -0.07em; }

.limits { padding-block: 120px; background: var(--dark); color: var(--cream); }
.limits-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; }
.limits h2 { font-size: clamp(3rem, 5.2vw, 5rem); }
.limit-list { border-top: 1px solid rgba(248,245,238,0.16); }
.limit-list p { display: grid; grid-template-columns: 38px 1fr; gap: 16px; margin: 0; padding: 25px 0; border-bottom: 1px solid rgba(248,245,238,0.16); color: rgba(248,245,238,0.64); line-height: 1.55; }
.limit-list span { color: var(--orange); font: 400 0.62rem "DM Mono", monospace; }
.site-footer { min-height: 112px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 30px; align-items: center; color: var(--muted); font-size: 0.65rem; }
.site-footer > p { margin: 0; }
.site-footer > p:last-child { justify-self: end; }
.footer-credit a { text-underline-offset: 3px; text-decoration-color: var(--line); }
.footer-credit a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 70px; }
  .hero-copy { max-width: 760px; }
  .hero-visual { min-height: 560px; }
  .idea-copy, .explore-heading, .translation-grid, .limits-grid { grid-template-columns: 1fr; gap: 34px; }
  .control-layout { grid-template-columns: 1fr; }
  .live-result { min-height: 560px; }
  .limits-grid { gap: 70px; }
}

@media (max-width: 640px) {
  .shell { width: min(var(--shell), calc(100% - 28px)); }
  .site-header { grid-template-columns: 1fr auto; }
  .site-header > p { display: none; }
  .header-actions .text-link { display: none; }
  h1 { font-size: clamp(3.55rem, 17vw, 5.2rem); }
  .hero { padding-block: 62px 74px; gap: 16px; }
  .hero-visual { min-height: 430px; }
  .hero-visual { overflow: hidden; margin-inline: -14px; padding-inline: 14px; }
  .orb { width: 78%; }
  .hero-number > span { font-size: clamp(2.8rem, 12vw, 4rem); }
  .orbit-one { width: 100%; }
  .orbit-two { width: 100%; }
  .idea, .translation { padding-block: 86px; }
  .explore, .limits { padding-block: 86px; }
  .equation { grid-template-columns: 1fr; gap: 18px; }
  .equation-symbol { transform: rotate(90deg); width: max-content; }
  .source-options { grid-template-columns: 1fr; }
  .live-result { min-height: 500px; padding: 28px; border-radius: 24px; }
  .constellation { gap: 5px; }
  .chip-field-wrap { padding: 24px; }
  .chip-field { gap: 6px; }
  .reality { padding-bottom: 86px; }
  .reality summary { align-items: flex-start; padding-block: 28px; }
  .summary-action { font-size: 0; }
  .reality-body { grid-template-columns: 1fr; gap: 40px; padding-bottom: 42px; }
  .effective-result { padding: 30px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .site-footer { grid-template-columns: 1fr; padding-block: 30px; gap: 12px; }
  .site-footer > p:last-child { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  .orbit, .orb::before, .orb span { animation: none !important; }
}
