@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./assets/fonts/plus-jakarta-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('./assets/fonts/plus-jakarta-sans-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./assets/fonts/plus-jakarta-sans-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./assets/fonts/plus-jakarta-sans-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('./assets/fonts/plus-jakarta-sans-800.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./assets/fonts/ibm-plex-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('./assets/fonts/ibm-plex-mono-500.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./assets/fonts/ibm-plex-mono-600.woff2') format('woff2');
}

:root {
  --ink: #090A0D;
  --ink-sec: #1F242D;
  --hairline: rgba(9, 10, 13, 0.22);
  --vermilion: #E63926;
  --halo: 0 1px 10px rgba(255, 255, 255, 0.72);
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  background-color: #E4E7E4;
  color: var(--ink);
  font-family: var(--font-sans);
  overflow-x: hidden;
  scrollbar-width: none;
  -webkit-font-smoothing: antialiased;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

#webgl-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 1;
  cursor: grab;
}

#webgl-canvas:active {
  cursor: grabbing;
}

#webgl-canvas.is-hovering {
  cursor: pointer;
}

#scroll-track {
  position: relative;
  width: 100%;
  height: 600vh;
  z-index: 0;
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
   Swiss Architectural Perimeter Frame Rails & Corner Crop Ticks
--------------------------------------------------------------------------- */
.swiss-frame {
  position: fixed;
  inset: 0;
  z-index: 21;
  pointer-events: none;
}

.crop-mark {
  position: absolute;
  pointer-events: none;
}

.crop-tl {
  top: 12px;
  left: 12px;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid var(--ink);
  border-left: 1.5px solid var(--ink);
}

.crop-tr {
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid var(--ink);
  border-right: 1.5px solid var(--ink);
}

.crop-bl {
  bottom: 12px;
  left: 12px;
  width: 8px;
  height: 8px;
  border-bottom: 1.5px solid var(--ink);
  border-left: 1.5px solid var(--ink);
}

.crop-br {
  bottom: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-bottom: 1.5px solid var(--ink);
  border-right: 1.5px solid var(--ink);
}

.crop-tc {
  top: 10px;
  left: 50%;
  width: 1.5px;
  height: 9px;
  background: var(--ink);
  transform: translateX(-50%);
}

.crop-bc {
  bottom: 10px;
  left: 50%;
  width: 1.5px;
  height: 9px;
  background: var(--ink);
  transform: translateX(-50%);
}

.rail-left,
.rail-right {
  position: fixed;
  top: 76px;
  bottom: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.rail-left {
  left: 14px;
}

.rail-right {
  right: 14px;
}

.rail-item {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink);
  white-space: nowrap;
}

.rail-left .rail-item {
  transform: rotate(180deg);
}

/* ---------------------------------------------------------------------------
   Monumental Swiss Hero Cover (0% Scroll, Left Sky)
--------------------------------------------------------------------------- */
.hero-cover {
  position: fixed;
  left: 64px;
  top: 49%;
  transform: translateY(-50%);
  z-index: 7;
  pointer-events: none;
  width: min(500px, 44vw);
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.12s linear;
}

.hero-numeral {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(4.8rem, 9.2vw, 9rem);
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: var(--ink);
}

.hero-title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(2.8rem, 4.6vw, 4.4rem);
  letter-spacing: -0.055em;
  line-height: 0.94;
  color: var(--ink);
  margin-top: 2px;
}

.hero-submeta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-sec);
  margin-bottom: 6px;
}

.hero-eq-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 10px;
  border-bottom: 2.5px solid var(--vermilion);
}

.hero-katex {
  font-size: clamp(1.45rem, 2.25vw, 2.25rem);
  color: var(--ink);
  line-height: 1.05;
  white-space: nowrap;
}

.hero-eq-ind {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: var(--ink);
  white-space: nowrap;
}

.vermilion-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--vermilion);
  flex-shrink: 0;
  display: inline-block;
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(0.95rem, 1.25vw, 1.15rem);
  letter-spacing: -0.02em;
  color: var(--ink-sec);
  margin-top: 6px;
}

.hero-credit {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------------------
   Fixed Frame Chrome (Jet-Black High Contrast, No Washed-Out Gray)
--------------------------------------------------------------------------- */
.hud-chrome {
  position: fixed;
  inset: 0;
  z-index: 22;
  pointer-events: none;
}

.chrome-corner-tl {
  position: fixed;
  top: 20px;
  left: 44px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  pointer-events: auto;
}

.chrome-corner-tr {
  position: fixed;
  top: 20px;
  right: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.corner-icon-btn {
  appearance: none;
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  padding: 2px 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.corner-icon-btn:hover,
.corner-icon-btn.is-active {
  color: var(--ink);
  border-bottom-color: var(--vermilion);
}

.chrome-tl {
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: auto;
  transition: opacity 0.28s ease;
}

.brand-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-sec);
}

.chrome-bl {
  position: fixed;
  bottom: 18px;
  left: 44px;
  display: flex;
  align-items: center;
  gap: 18px;
  pointer-events: auto;
}

.chrome-br {
  position: fixed;
  bottom: 18px;
  right: 44px;
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: auto;
}

.chrome-btn {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 2.5px solid transparent;
  padding: 2px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-sec);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.chrome-btn:hover {
  color: var(--ink);
}

.chrome-btn.is-active {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--vermilion);
}

.chrome-hint,
.chrome-rail-readout {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-sec);
  letter-spacing: 0.04em;
}

.chrome-counter {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.05em;
  margin-right: 4px;
}

/* ---------------------------------------------------------------------------
   Borderless 3D-Tracked Spatial Callout (Swiss Vermilion Anchor)
--------------------------------------------------------------------------- */
#callout-layer {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#callout-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

#callout-line {
  stroke: var(--ink);
  stroke-width: 1.25;
  fill: none;
}

#callout-dot {
  fill: var(--vermilion);
}

@keyframes vermilionPulse {
  0% { r: 4.5; stroke-opacity: 0.9; }
  70% { r: 14; stroke-opacity: 0.0; }
  100% { r: 14; stroke-opacity: 0.0; }
}

#callout-ring {
  fill: none;
  stroke: var(--vermilion);
  stroke-width: 1.5;
  animation: vermilionPulse 2.1s cubic-bezier(0.2, 0.7, 0.3, 1) infinite;
}

.callout-tag {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 2px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  transform: translate(0, -50%);
}

.callout-main {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  text-shadow: var(--halo);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.callout-tag:hover .callout-main {
  border-bottom-color: var(--vermilion);
}

.callout-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-sec);
  text-shadow: var(--halo);
  white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   High-Contrast Jet-Black Underline Tabs
--------------------------------------------------------------------------- */
.underline-btn {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 2.5px solid transparent;
  padding: 4px 1px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-sec);
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.underline-btn:hover {
  color: var(--ink);
}

.underline-btn.is-active {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--vermilion);
}

.callout-tag:focus:not(:focus-visible),
.chrome-btn:focus:not(:focus-visible),
.corner-icon-btn:focus:not(:focus-visible),
.underline-btn:focus:not(:focus-visible) {
  outline: none;
}

.callout-tag:focus-visible,
.chrome-btn:focus-visible,
.corner-icon-btn:focus-visible,
.underline-btn:focus-visible {
  outline: 1.5px solid var(--vermilion);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------------------
   Stop 05 Bottom Morph Switcher (Clears Reflections Above)
--------------------------------------------------------------------------- */
.morph-dock {
  position: fixed;
  bottom: 42px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

.morph-dock[hidden] {
  display: none;
}

.morph-credit {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink);
}

.morph-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Borderless Quick Jump Strip (G) */
.quick-jump {
  position: fixed;
  top: 52px;
  right: 44px;
  z-index: 24;
  display: flex;
  gap: 16px;
  padding: 6px 12px;
  background: rgba(232, 235, 233, 0.85);
  pointer-events: auto;
}

.quick-jump[hidden] {
  display: none;
}

/* ---------------------------------------------------------------------------
   Borderless Swiss Editorial Inspection Column (1:1 ref_ui.jpg Scale)
--------------------------------------------------------------------------- */
.inspect-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 36px 68px 46px 40px;
  background: linear-gradient(270deg, rgba(232, 235, 233, 0.94) 0%, rgba(232, 235, 233, 0.78) 44%, rgba(232, 235, 233, 0.0) 76%);
  pointer-events: auto;
}

.inspect-backdrop[hidden] {
  display: none;
}

.inspect-panel {
  width: min(560px, 43vw);
  max-height: calc(100vh - 82px);
  overflow-y: auto;
  scrollbar-width: none;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 4px 2px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
}

.inspect-panel::-webkit-scrollbar {
  display: none;
}

.inspect-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.editorial-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-sec);
  letter-spacing: 0.08em;
}

.inspect-numeral {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(5.5rem, 10.5vw, 10rem);
  line-height: 0.84;
  letter-spacing: -0.06em;
  color: var(--ink);
  margin: 2px 0 8px 0;
}

.inspect-title {
  font-family: var(--font-sans);
  font-size: clamp(2.1rem, 3.4vw, 3.35rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
  color: var(--ink);
}

.inspect-submeta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.07em;
  color: var(--ink-sec);
  margin-top: 6px;
  margin-bottom: 14px;
}

.inspect-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Signature ref_ui.jpg Display Equation + Red Dot + 2.5px Vermilion Rule */
.hero-eq-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
  border-bottom: 2.5px solid var(--vermilion);
}

.hero-eq-math {
  font-size: clamp(1.9rem, 2.65vw, 2.65rem);
  line-height: 1.04;
  color: var(--ink);
  white-space: nowrap;
}

.hero-eq-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-align: left;
  text-transform: none;
  flex-shrink: 0;
}

/* Tactile 2.5px Jet-Black Range Slider + Solid 14px Black Thumb */
.lab-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 0 2px;
}

.lab-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2.5px;
  background: var(--ink);
  outline: none;
  cursor: pointer;
}

.lab-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
  border: none;
  box-shadow: none;
  cursor: pointer;
}

.lab-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
  border: none;
  cursor: pointer;
}

.lab-slider-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: none;
  color: var(--ink);
}

.lab-slider-center {
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: none;
  color: var(--ink);
}

.inspect-prose {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.48;
  color: var(--ink-sec);
}

.editorial-block {
  border-top: 1px solid var(--hairline);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editorial-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.katex-box {
  font-size: 13.5px;
  line-height: 1.48;
  color: var(--ink);
  overflow: visible;
  padding: 2px 0;
}

.lab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px;
  border-top: 1px solid var(--hairline);
  padding-top: 10px;
}

.metric-cell {
  background: transparent;
  border: none;
  padding: 0;
}

.metric-key {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-sec);
  margin-bottom: 3px;
}

.metric-val {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.credits-banner {
  border-top: 1px solid var(--hairline);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.credits-name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.credits-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-sec);
}

/* Borderless Speaker Notes Mist Column (P) */
.notes-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 18;
  width: min(460px, calc(100vw - 48px));
  padding: 78px 36px 76px 46px;
  overflow-y: auto;
  scrollbar-width: none;
  background: linear-gradient(90deg, rgba(232, 235, 233, 0.94) 0%, rgba(232, 235, 233, 0.72) 72%, transparent 100%);
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  pointer-events: auto;
}

.notes-panel[hidden] {
  display: none;
}

.notes-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid var(--vermilion);
  padding-bottom: 10px;
}

@media (max-width: 1440px) {
  .inspect-backdrop { padding: 28px 60px 42px 32px; }
  .inspect-panel { width: min(520px, 44vw); }
  .inspect-numeral { font-size: clamp(5.5rem, 8.2vw, 7.6rem); margin-bottom: 6px; }
  .inspect-title { font-size: clamp(2.1rem, 2.8vw, 2.65rem); }
  .inspect-submeta { margin-bottom: 10px; }
  .inspect-body { gap: 10px; }
  .hero-eq-math { font-size: clamp(1.9rem, 2.4vw, 2.3rem); }
  .hero-eq-block { padding-bottom: 10px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
}

@media (max-width: 960px) {
  .hero-cover { left: 48px; max-width: 72vw; }
  .inspect-backdrop { padding: 24px 42px; }
  .inspect-panel { width: min(480px, calc(100vw - 64px)); }
  .chrome-rail-readout { display: none; }
}

@media (max-width: 768px) {
  .rail-left, .rail-right { display: none; }
  .hero-cover { left: 22px; top: 38%; width: calc(100vw - 44px); }
  .chrome-corner-tl { left: 20px; }
  .chrome-corner-tr { right: 20px; }
  .chrome-bl { bottom: 16px; left: 20px; }
  .chrome-br { bottom: 16px; right: 20px; }
  .morph-dock { bottom: 50px; }
}
