:root { color-scheme: dark; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; color: #e8e9eb; background: #08090b; }
* { box-sizing: border-box; }
body { margin: 0; padding: 16px; }
.space-app { height: calc(100vh - 32px); height: calc(100dvh - 32px); min-height: 520px; border: 1px solid #303338; display: flex; flex-direction: column; background: #090a0c; }
.space-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 20px; padding: 11px 24px; min-height: 66px; border-bottom: 1px solid #303338; font-size: 18px; font-weight: 500; letter-spacing: .4px; }
.discover-toggle { min-height: 44px; margin-left: auto; padding: 0; border: 0; background: transparent; color: #a8afb7; font: inherit; font-size: 13px; letter-spacing: 0; text-decoration: underline; text-underline-offset: 5px; cursor: pointer; }
.discover-toggle:hover { color: #e8e9eb; }
.discover-toggle:focus-visible, .discover-panel a:focus-visible { outline: 1px solid #8b949e; outline-offset: 5px; }
.workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.space-app[data-discover-open="true"] .workspace { grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr); }
.discover-panel { min-width: 0; min-height: 0; padding: 35px 30px; border-left: 1px solid #303338; overflow-y: auto; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.discover-panel p { margin: 0 0 24px; }
.discover-panel p:last-child { margin-bottom: 0; }
.discover-panel a { color: inherit; text-underline-offset: 3px; }
.mix-formula { padding: 4px 0; text-align: center; white-space: nowrap; }
.vector-panel { min-width: 0; min-height: 0; }
.vector-stage { --edge: 52px; position: relative; height: 100%; min-height: 440px; isolation: isolate; }
.vector { position: absolute; top: 50%; width: 24px; height: 336px; transform: translate(-50%, -50%); }
.vector svg { display: block; width: 24px; height: 336px; overflow: visible; }
.vector circle { transition: fill 90ms linear; }
.vector-a { left: var(--edge); }
.vector-b { left: calc(100% - var(--edge)); }
.endpoint { z-index: 1; }
.current { z-index: 2; pointer-events: none; }
.current circle { pointer-events: auto; stroke: #e7e9ec; stroke-opacity: .38; stroke-width: .7px; }
.current[data-merged="true"] svg { visibility: hidden; }
.mix-alpha { position: absolute; top: calc(100% + 19px); left: 50%; transform: translateX(-50%); color: #929ba5; font-size: 11px; line-height: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.endpoint[data-active="true"] circle { stroke: #e7e9ec; stroke-opacity: .38; stroke-width: .7px; }
.interpolation-line { position: absolute; left: var(--edge); right: var(--edge); top: 50%; height: 1px; background: #68717b; }
.mix-slider { appearance: none; -webkit-appearance: none; position: absolute; z-index: 3; left: calc(var(--edge) - 4px); top: calc(50% - 22px); width: calc(100% - var(--edge) * 2 + 8px); height: 44px; padding: 0; margin: 0; background: transparent; cursor: ew-resize; }
.mix-slider::-webkit-slider-runnable-track { height: 1px; background: transparent; }
.mix-slider::-moz-range-track { height: 1px; background: transparent; }
.mix-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 8px; height: 8px; margin-top: -3.5px; border: 0; border-radius: 50%; background: #eef0f2; box-shadow: 0 0 0 4px #090a0c; }
.mix-slider::-moz-range-thumb { width: 8px; height: 8px; border: 0; border-radius: 50%; background: #eef0f2; box-shadow: 0 0 0 4px #090a0c; }
.mix-slider:focus { outline: none; }
.mix-slider:focus-visible { outline: 1px solid #8b949e; outline-offset: 8px; border-radius: 3px; }
.explanation-panel { min-width: 0; min-height: 0; padding: 29px 25px; border-left: 1px solid #303338; overflow-y: auto; }
.explanation-selector { position: relative; margin-bottom: 27px; }
.explanation-selector::after { content: ""; position: absolute; right: 3px; top: 7px; width: 5px; height: 5px; border-right: 1px solid #929ba5; border-bottom: 1px solid #929ba5; transform: rotate(45deg); pointer-events: none; }
.explanation-selector select { appearance: none; display: block; width: 100%; min-width: 0; margin: 0; padding: 0 15px 0 0; border: 0; border-radius: 0; background: transparent; color: #a8afb7; font: inherit; font-size: 11px; line-height: 20px; cursor: pointer; }
.explanation-selector select option { background: #121417; color: #e8e9eb; }
.explanation-selector select:focus-visible { outline: 1px solid #8b949e; outline-offset: 4px; }
.explanation { margin: 0; font-size: 15px; line-height: 1.75; overflow-wrap: anywhere; white-space: pre-line; }
@media (max-width: 1050px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 260px; }
  .vector-stage { --edge: 40px; }
}
@media (max-width: 700px) {
  body { padding: 12px; }
  .space-app { height: calc(100vh - 24px); height: calc(100dvh - 24px); }
  .space-header { padding: 9px 17px; font-size: 16px; }
  .discover-toggle { font-size: 12px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 34%; }
  .space-app[data-discover-open="true"] .workspace { grid-template-columns: minmax(0, 1fr); }
  .space-app[data-discover-open="true"] .vector-panel { display: none; }
  .discover-panel { padding: 28px 22px; border-left: 0; font-size: 14px; }
  .vector-stage { --edge: 25px; }
  .mix-alpha { font-size: 10px; }
  .explanation-panel { padding: 28px 14px; }
  .explanation-selector { margin-bottom: 23px; margin-right: -10px; }
  .explanation-selector select { font-size: 9px; padding-right: 12px; }
  .explanation { font-size: 12px; line-height: 1.7; }
}
@media (prefers-reduced-motion: reduce) { .vector circle { transition: none; } }

[hidden] { display: none !important; }
.vector-selector { position: absolute; top: -43px; left: 50%; transform: translateX(-50%); width: 48px; height: 28px; }
.vector-selector::after { content: ""; position: absolute; top: 10px; right: 3px; width: 5px; height: 5px; border-right: 1px solid #929ba5; border-bottom: 1px solid #929ba5; transform: rotate(45deg); pointer-events: none; }
.vector-selector select { appearance: none; width: 48px; height: 28px; padding: 0 10px 0 0; border: 0; border-radius: 0; background: transparent; color: #e8e9eb; font: inherit; font-size: 12px; text-align: center; text-align-last: center; cursor: pointer; }
.vector-selector select option { background: #121417; color: #e8e9eb; }
.vector-selector select:focus-visible { outline: 1px solid #8b949e; outline-offset: 3px; }
.vector-selector select:disabled { cursor: default; }
.mix-slider:disabled { cursor: default; }
.retry { margin-top: 20px; padding: 7px 10px; border: 1px solid #6b737e; border-radius: 0; background: transparent; color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.retry:hover { border-color: #d9dfe6; }
.retry:focus-visible { outline: 1px solid #b6c0cd; outline-offset: 4px; }
