:root {
  --bg: #ffffff;
  --paper: #f7f9fa;
  --paper-alt: #eef2f6;
  --ink: #1f2933;
  --slate: #36414c;
  --muted: #5c6670;
  --border: #dfe5ec;
  --accent: #1f7a68;
  --accent-bright: #1f8f9a;
  --accent-soft: #edf7f5;
  --teal-play: #1f7a68;
  --teal-play-hover: #176152;
  --sage-bg: #edf5f2;
  --sage-ink: #1e4b41;
  --studio-bg: #101820;
  --studio-border: #253140;
  --mint: #8ee6d4;
  --radius: 14px;
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.09);
  --font: "Times New Roman", Times, serif;
  --serif: "Times New Roman", Times, serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; width: 100%; max-width: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}
.section, .hero-banner, .site-nav, .site-footer { width: 100%; max-width: 100%; overflow-x: hidden; }
.two-col-editorial > *, .split-grid > *, .pipe-detail > *, .hyst-grid > *, .chart-split > *, .rt-outputs > *, .rt-play-main > *, .card, .editorial-figure, .pipe-formula, .bibtex-box, .rt-studio, .table-wrap, .chart-panel {
  min-width: 0;
  max-width: 100%;
}
code, pre, kbd { font-family: var(--mono); }
img, video, canvas, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navbar */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  transition: background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
  padding: 12px 0;
  color: #ffffff;
}
.site-nav.is-scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a { color: inherit; opacity: 0.88; }
.nav-links a:hover { opacity: 1; text-decoration: none; }
.nav-cta {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff !important;
  opacity: 1 !important;
  font-weight: 600;
  font-size: 0.85rem;
}

/* Hero Banner */
.hero-banner {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  padding: 96px 0 56px;
  background: #101820;
  color: #ffffff;
  overflow: hidden;
}
.hero-bg-media { position: absolute; inset: 0; z-index: 0; }
.hero-bg-media img.hero-macro-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  opacity: 0.72;
  filter: contrast(1.04);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 50% 35%, rgba(12, 18, 26, 0.42) 0%, rgba(12, 18, 26, 0.84) 84%);
}
.hero-content { position: relative; z-index: 2; text-align: center; width: 100%; }
.hero-venue-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 15px;
  border-radius: 999px;
  background: rgba(31, 143, 154, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-title {
  margin: 0 auto 14px;
  max-width: 980px;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5.2vw, 4.4rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.82);
}
.hero-title span {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.35rem, 2.7vw, 2.15rem);
  font-weight: 400;
  line-height: 1.18;
  color: rgba(255, 255, 255, 0.96);
}
.hero-subtitle {
  margin: 14px auto 18px;
  max-width: 780px;
  font-size: clamp(0.98rem, 1.5vw, 1.12rem);
  color: rgba(255, 255, 255, 0.86);
}
.hero-authors { font-family: var(--serif); font-size: 1.24rem; font-weight: 500; margin: 0 0 4px; text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8); }
.hero-authors a { color: #ffffff; border-bottom: 1px dotted rgba(255, 255, 255, 0.48); }
.hero-authors a:hover { color: var(--mint); text-decoration: none; }
.hero-notes { margin: 0 0 4px; font-family: var(--serif); font-size: 0.98rem; color: rgba(255, 255, 255, 0.84); }
.hero-affil { margin: 0 0 24px; font-family: var(--serif); font-size: 1.02rem; color: rgba(255, 255, 255, 0.82); }
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}
.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-hero:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.22); text-decoration: none; }
.btn-hero--primary { background: var(--accent); border-color: rgba(255, 255, 255, 0.25); }
.btn-hero--primary:hover { background: #a51c1c; }

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 960px;
  margin: 0 auto;
}
.metric-card {
  background: rgba(20, 24, 33, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 13px 15px;
  text-align: left;
  backdrop-filter: blur(10px);
}
.metric-card strong { display: block; font-size: 1.4rem; font-weight: 800; color: var(--mint); line-height: 1.15; }
.metric-card span { display: block; font-size: 0.84rem; font-weight: 600; color: #ffffff; margin-top: 3px; }
.metric-card small { display: block; font-size: 0.74rem; color: rgba(255, 255, 255, 0.65); margin-top: 2px; }

/* Sections */
.section { padding: 64px 0; }
.section--paper { background: var(--paper); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-eyebrow {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.section-title {
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
}
.btn-hero--primary { background: var(--accent-bright); border-color: rgba(255, 255, 255, 0.35); }
.btn-hero--primary:hover { background: #187882; }
.section-lead {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 1.02rem;
}
.section-meta-line {
  text-align: center;
  font-size: 0.86rem;
  color: #6b7280;
  margin: -12px auto 24px;
}

/* =========================================================
   Play2Perfect-Style Interactive Simulator Card (.rt-studio)
   ========================================================= */
.rt-studio {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid #dfe4ec;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}
.rt-studio--full {
  border-radius: 14px;
}
.rt-play-main {
  display: grid;
  grid-template-columns: 1fr 310px;
  align-items: stretch;
}
.rt-viewport {
  position: relative;
  min-height: 440px;
  height: 100%;
  background: #f1f4f8;
  outline: none;
}
.rt-studio--full .rt-viewport { min-height: 460px; height: 100%; }
.rt-viewport canvas { width: 100%; height: 100%; display: block; }
.rt-drop-overlay {
  position: absolute;
  inset: 14px;
  z-index: 12;
  display: none;
  place-items: center;
  border: 2px dashed var(--teal-play);
  border-radius: 14px;
  background: rgba(237, 245, 242, 0.92);
  color: var(--sage-ink);
  font-size: 1.02rem;
  font-weight: 700;
  pointer-events: none;
}
.rt-viewport.is-dragover .rt-drop-overlay { display: grid; }
.rt-vp-top-left, .rt-vp-top-right, .rt-vp-bottom {
  position: absolute;
  z-index: 5;
  pointer-events: none;
}
.rt-vp-top-left { top: 12px; left: 12px; }
.rt-vp-top-right { top: 12px; right: 12px; display: flex; gap: 5px; pointer-events: auto; }
.rt-vp-top-right button {
  background: rgba(255, 255, 255, 0.88);
  color: var(--slate);
  border: 1px solid #d4dbe4;
  border-radius: 7px;
  padding: 4px 9px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.rt-vp-top-right button:hover { border-color: var(--teal-play); color: var(--teal-play); }
.rt-vp-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  border: 1px solid #d4dbe4;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  backdrop-filter: blur(6px);
}
.rt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-play); }
.rt-vp-bottom { left: 12px; right: 12px; bottom: 10px; display: flex; justify-content: flex-start; }
.rt-vp-hint {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #d4dbe4;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  color: var(--slate);
  backdrop-filter: blur(6px);
}
.rt-vp-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(241, 244, 248, 0.92);
  z-index: 10;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--teal-play);
}

/* Right White Play2Perfect Sidebar */
.rt-sidebar {
  background: #ffffff;
  border-left: 1px solid #e5e9f0;
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rt-side-group { display: flex; flex-direction: column; gap: 7px; }
.rt-side-label { font-size: 0.82rem; font-weight: 700; color: var(--slate); }
.rt-side-select {
  width: 100%;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid #d3dae3;
  background: #ffffff;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}
.rt-side-desc { margin: 0; font-size: 0.8rem; color: var(--muted); line-height: 1.42; }
.rt-side-row { display: grid; grid-template-columns: 1.35fr 0.9fr; gap: 7px; }
.rt-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid #d3dae3;
  background: #ffffff;
  color: var(--slate);
  font-size: 0.81rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.14s ease;
}
.rt-btn-outline:hover { border-color: var(--teal-play); color: var(--teal-play); text-decoration: none; }
.rt-btn-upload-light {
  background: #f0faf7;
  border-color: #9dd4c5;
  color: #165e4f;
}
.rt-btn-upload-light:hover { background: #e1f4ee; border-color: var(--teal-play); }

.rt-upload-box {
  background: #f8fafc;
  border: 1px solid #dbe2ec;
  border-radius: 9px;
  padding: 8px 10px;
}
.rt-upload-box[hidden] { display: none; }
.rt-upload-box-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 0.82rem; }
.rt-link-clear { background: none; border: none; color: var(--accent); font-weight: 700; font-size: 0.78rem; cursor: pointer; padding: 0; }
.rt-upload-box small { display: block; font-size: 0.72rem; color: var(--muted); font-family: var(--mono); margin: 3px 0 6px; }
.rt-upload-box-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.rt-upload-box-actions button, .rt-upload-box-actions select {
  border: 1px solid #d3dae3;
  background: #ffffff;
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate);
  cursor: pointer;
}

.rt-seg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.rt-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f4f8;
  border: 1px solid #dbe2ec;
  border-radius: 9px;
  padding: 3px;
}
.rt-seg button {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 4px;
  border-radius: 6px;
  cursor: pointer;
}
.rt-seg button.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.rt-btn-play {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: var(--teal-play);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}
.rt-btn-play:hover { background: var(--teal-play-hover); }
.rt-btn-play.is-playing { background: #b45309; }

.rt-macro-pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.rt-macro-pills button {
  border: 1px solid #dbe2ec;
  background: #f8fafc;
  color: var(--muted);
  border-radius: 7px;
  padding: 4px 4px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}
.rt-macro-pills button.is-active {
  border-color: var(--teal-play);
  background: #edf7f4;
  color: var(--teal-play);
}

.rt-btn-reset {
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #d3dae3;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}
.rt-btn-reset:hover { background: #f8fafc; }

.rt-status-sage {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--sage-bg);
  color: var(--sage-ink);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 0.79rem;
  font-weight: 600;
}
.rt-status-dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: #94a3b8; }
.rt-status-dot.is-active { background: #10b981; box-shadow: 0 0 6px #10b981; }

.rt-lowdetail-toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 0.81rem;
  font-weight: 600;
  color: var(--slate);
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid #e1e6ee;
  background: #f8fafc;
  cursor: pointer;
}
.rt-lowdetail-toggle input { accent-color: var(--teal-play); }
.rt-lowdetail-toggle small {
  width: 100%;
  font-size: 0.71rem;
  font-weight: 500;
  color: var(--teal-play);
  padding-left: 20px;
}

.rt-quick-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}
.rt-qp-btn {
  border: 1px solid #d3dae3;
  background: #f8fafc;
  color: var(--slate);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
}
.rt-qp-btn:hover { border-color: var(--accent-bright); color: var(--accent-bright); }
.rt-qp-btn.is-active { background: var(--accent-bright); border-color: var(--accent-bright); color: #ffffff; }

.pill-btn {
  border: 2px solid #d2d8dd;
  background: #ffffff;
  color: var(--slate);
  padding: 7px 16px;
  border-radius: 24px;
  font-family: var(--serif);
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.pill-btn:hover { border-color: var(--accent-bright); color: var(--accent-bright); }
.pill-btn.is-active { background: var(--accent-bright); border-color: var(--accent-bright); color: #ffffff; box-shadow: 0 2px 10px rgba(31, 143, 154, 0.25); }

.blender-showcase-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
  align-items: center;
}
.blender-main-card {
  background: #eef2f6;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.blender-main-card img { width: 100%; height: auto; display: block; }
.blender-tri-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.blender-sub-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.blender-sub-card {
  background: #101820;
  border: 1px solid #253140;
  border-radius: 10px;
  overflow: hidden;
}
.blender-sub-card .label {
  padding: 5px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #cbd5e1;
  background: #18222e;
}
.blender-sub-card img { width: 100%; height: auto; display: block; }

.rt-side-opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.81rem;
  color: var(--slate);
}
.rt-side-opts label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.rt-side-opts input[type="checkbox"] { accent-color: var(--teal-play); }
.rt-mu-row { justify-content: space-between; }
.rt-mu-row input[type="range"] { width: 110px; accent-color: var(--teal-play); }

.rt-side-foot {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding-top: 6px;
  border-top: 1px solid #edf0f5;
}

/* Bottom 3-Column Live Outputs Strip */
.rt-outputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  background: #f8fafc;
  border-top: 1px solid #e5e9f0;
}
.rt-out-card {
  background: #ffffff;
  border: 1px solid #e1e6ee;
  border-radius: 12px;
  padding: 10px;
}
.rt-out-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.rt-out-title { display: flex; align-items: baseline; gap: 6px; font-size: 0.88rem; color: var(--ink); }
.rt-num { font-family: var(--mono); font-size: 0.72rem; color: var(--teal-play); font-weight: 800; }
.rt-out-title small { color: var(--muted); font-size: 0.73rem; }
.rt-metric-chip {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--sage-ink);
  background: var(--sage-bg);
  border: 1px solid #cbe4db;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 700;
}
.rt-out-controls { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--muted); }
.rt-out-controls select {
  background: #f8fafc;
  color: var(--ink);
  border: 1px solid #d3dae3;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.76rem;
  font-weight: 600;
}
.rt-pill-mini {
  background: #f1f4f8;
  color: var(--slate);
  border: 1px solid #d3dae3;
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.rt-pill-mini.is-active {
  background: var(--sage-bg);
  border-color: #9dd4c5;
  color: var(--sage-ink);
}
.rt-canvas-wrap {
  background: #0d1016;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #d8dee7;
  aspect-ratio: 4 / 3;
}
.rt-canvas-wrap canvas { width: 100%; height: 100%; object-fit: contain; }
.rt-scale-wrap { margin-top: 7px; }
.rt-viridis-bar {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #440154, #3b528b, #21918c, #5ec962, #fde725);
}
.rt-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.71rem;
  color: var(--muted);
  margin-top: 3px;
  font-family: var(--mono);
}
.rt-out-foot { margin-top: 7px; font-size: 0.75rem; color: var(--muted); }
.rt-mono { font-family: var(--mono); color: var(--slate); font-weight: 600; }

/* Standalone demo.html light header */
.demo-body { background: #f3f5f8; color: var(--ink); min-height: 100vh; }
.demo-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  background: #ffffff;
  border-bottom: 1px solid #e1e5ec;
}
.demo-brand { display: flex; align-items: center; gap: 10px; }
.demo-brand small { display: block; font-size: 0.75rem; color: var(--muted); }
.demo-tips-inline { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.78rem; color: var(--slate); }
.demo-tips-inline kbd { background: #f1f4f8; border: 1px solid #d3dae3; padding: 2px 6px; border-radius: 4px; color: var(--teal-play); font-weight: 700; }
.demo-main { max-width: 1280px; margin: 16px auto; padding: 0 16px 24px; }

/* Abstract & Physics Motivation */
.two-col-editorial {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 32px;
  align-items: center;
}
.editorial-figure {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.editorial-figure img { border-radius: 10px; width: 100%; }
.editorial-figure figcaption { margin-top: 10px; font-size: 0.84rem; color: var(--muted); }

/* Hysteresis 4-Phase Explorer */
.hyst-card {
  margin-top: 34px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.hyst-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.hyst-header h3 { margin: 0; font-size: 1.16rem; }
.pill-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
/* Play2Perfect pill-btn styles defined above */
.hyst-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 0.9fr;
  gap: 18px;
  align-items: stretch;
}
.hyst-pane {
  background: var(--studio-bg);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #262c38;
}
.hyst-pane-label {
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
  background: #1b2029;
  border-bottom: 1px solid #262c38;
}
.hyst-pane img { width: 100%; height: auto; }
.hyst-info {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hyst-info h4 { margin: 0 0 8px; font-size: 1rem; color: var(--accent); }
.hyst-info p { margin: 0 0 14px; font-size: 0.92rem; color: var(--slate); }
.hyst-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hyst-stat { background: #ffffff; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.hyst-stat small { display: block; font-size: 0.72rem; color: var(--muted); }
.hyst-stat b { font-family: var(--mono); font-size: 0.9rem; color: var(--ink); }

/* Method Section */
.pipeline-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.pipe-step {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.16s ease;
}
.pipe-step:hover { border-color: var(--accent); transform: translateY(-2px); }
.pipe-step.is-active { border-color: var(--accent); background: var(--accent-soft); box-shadow: var(--shadow-sm); }
.pipe-step span { font-family: var(--mono); font-size: 0.75rem; font-weight: 700; color: var(--accent); }
.pipe-step strong { display: block; font-size: 0.92rem; margin-top: 4px; color: var(--ink); }
.pipe-step small { display: block; font-size: 0.76rem; color: var(--muted); margin-top: 4px; }

.pipe-detail {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
}
.pipe-formula {
  background: var(--studio-bg);
  color: var(--mint);
  padding: 14px 16px;
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 0.85rem;
  overflow-x: auto;
}

/* Marked vs Markerless Split Comparator */
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.compare-box {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  user-select: none;
  background: #14171d;
}
.compare-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare-top { clip-path: inset(0 50% 0 0); }
.compare-divider { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #ffffff; box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); pointer-events: none; }
.compare-handle {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%; background: #ffffff; color: var(--ink);
  display: grid; place-items: center; font-weight: 800; font-size: 0.8rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); pointer-events: none;
}
.compare-badge {
  position: absolute; top: 10px; padding: 3px 9px; border-radius: 6px;
  background: rgba(15, 23, 42, 0.78); color: #ffffff; font-size: 0.74rem; font-weight: 600;
}
.compare-badge--left { left: 10px; }
.compare-badge--right { right: 10px; }
.compare-range { width: 100%; margin-top: 10px; accent-color: var(--accent); }

/* Gallery */
.gallery-stage {
  background: var(--studio-bg);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--studio-border);
  color: #e2e8f0;
  margin-bottom: 28px;
}
.gallery-video-wrap {
  background: #0b0e14;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 520px;
}
.gallery-video-wrap video { max-height: 520px; width: auto; max-width: 100%; }
.gallery-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.gallery-meta p { margin: 4px 0 0; font-size: 0.88rem; color: #94a3b8; max-width: 760px; }

/* Charts */
.chart-host { position: relative; margin-top: 18px; }
.chart-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.chart-panel {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.chart-head h4 { margin: 0; font-size: 0.98rem; }
.chart-badge { font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--paper-alt); color: var(--slate); }
.chart-badge--warn { background: #fef3c7; color: #92400e; }
.chart-svg { width: 100%; height: auto; overflow: visible; }
.chart-axis-text { font-size: 11px; fill: #64748b; font-family: var(--font); }
.chart-label { font-size: 11.5px; fill: #334155; font-family: var(--font); }
.chart-label-strong { font-size: 11.5px; fill: #0f172a; font-weight: 700; font-family: var(--font); }
.chart-val { font-size: 11px; fill: #334155; font-family: var(--mono); }
.chart-val-sm { font-size: 10px; fill: #334155; font-family: var(--mono); }
.chart-foot { margin: 10px 0 0; font-size: 0.83rem; color: var(--muted); }
.chart-tooltip {
  position: absolute; pointer-events: none; opacity: 0;
  background: rgba(15, 23, 42, 0.95); color: #f8fafc;
  padding: 9px 12px; border-radius: 8px; font-size: 0.78rem; line-height: 1.45;
  max-width: 245px; box-shadow: var(--shadow-md); transition: opacity 0.12s ease; z-index: 20;
}
.chart-tooltip.is-visible { opacity: 1; }

/* Tables */
.table-wrap {
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--paper); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--slate); }
tr.is-robotac { background: var(--accent-soft); font-weight: 600; }
.badge-yes { color: #0f766e; font-weight: 700; }
.badge-no { color: #94a3b8; }
.badge-part { color: #b45309; font-weight: 600; }

details.boundaries-drawer {
  margin-top: 20px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
}
details.boundaries-drawer summary { cursor: pointer; font-weight: 700; color: var(--slate); }

/* BibTeX & Footer */
.bibtex-box {
  position: relative;
  background: var(--studio-bg);
  color: #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
}
.bibtex-box pre { margin: 0; font-size: 0.86rem; line-height: 1.55; }
.copy-btn {
  position: absolute; top: 12px; right: 12px;
  background: #232936; color: var(--mint); border: 1px solid #353e4f;
  border-radius: 8px; padding: 6px 12px; font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.copy-btn:hover { border-color: var(--mint); }
.site-footer { padding: 34px 0 44px; border-top: 1px solid var(--border); background: var(--paper); font-size: 0.86rem; color: var(--muted); }

@media (max-width: 1024px) {
  .hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col-editorial, .split-grid, .chart-split, .pipe-detail, .hyst-grid, .rt-play-main, .blender-showcase-grid { grid-template-columns: 1fr; }
  .rt-sidebar { border-left: none; border-top: 1px solid #e5e9f0; }
  .pipeline-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  html, body { width: 100%; overflow-x: hidden !important; }
  .container { padding: 0 16px; width: 100%; }
  .nav-links { display: none; }
  .hero-banner { padding: 78px 0 36px; min-height: auto; }
  .hero-title { font-size: 2.15rem; word-break: break-word; overflow-wrap: anywhere; }
  .hero-title span { font-size: 1.15rem; }
  .hero-subtitle { font-size: 0.94rem; }
  .hero-buttons { gap: 8px; }
  .btn-hero { padding: 8px 13px; font-size: 0.83rem; }
  .rt-outputs { grid-template-columns: 1fr; }
  .rt-viewport { min-height: 300px; height: 320px; }
  .hero-metrics { grid-template-columns: 1fr; }
  .pipeline-steps { grid-template-columns: 1fr; }
  .blender-sub-row { grid-template-columns: 1fr; }
}

/* Keep the three live sensor channels in view while the pointer is on the model. */
#studio-embed, #interactive-demo { scroll-margin-top: 72px; }
.rt-studio {
  --studio-height: clamp(474px, calc(100svh - 94px), 650px);
  --readout-width: clamp(134px, calc((100svh - 232px) * .36), 182px);
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(162px,20%) minmax(228px,24%);
  grid-template-areas:"scene readouts controls";
  align-items:stretch;
}
.rt-studio > .rt-viewport, .rt-studio--full > .rt-viewport {
  grid-area:scene;
  min-height:0;
  height:var(--studio-height);
  overflow:hidden;
}
.rt-studio > .rt-outputs {
  grid-area:readouts;
  min-width:0;
  height:var(--studio-height);
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:repeat(3,minmax(0,1fr));
  gap:7px;
  padding:8px;
  border-top:0;
  border-left:1px solid #e5e9f0;
  background:#f5f7fa;
}
.rt-studio > .rt-sidebar {
  grid-area:controls;
  min-width:0;
  max-height:var(--studio-height);
  overflow:auto;
  padding:10px 11px;
  gap:8px;
  border-left:1px solid #e5e9f0;
  border-top:0;
  overscroll-behavior:contain;
}
.rt-studio .rt-out-card { display:flex; flex-direction:column; justify-content:center; gap:4px; min-width:0; padding:6px 7px; }
.rt-studio .rt-out-head { margin:0; gap:3px; flex-wrap:wrap; }
.rt-studio .rt-out-title { gap:4px; font-size:.77rem; white-space:nowrap; }
.rt-studio .rt-out-title small,.rt-studio .rt-out-controls label .rt-arrow-label { display:none; }
.rt-studio .rt-num { font-size:.65rem; }
.rt-studio .rt-metric-chip,.rt-studio .rt-pill-mini { font-size:.64rem; padding:1px 4px; white-space:nowrap; }
.rt-studio .rt-out-controls { gap:3px; }
.rt-studio .rt-out-controls select { font-size:.63rem; padding:1px 2px; }
.rt-studio .rt-canvas-wrap { flex:none; width:min(100%,var(--readout-width)); align-self:center; }
.rt-studio .rt-canvas-wrap canvas { display:block; }
.rt-studio .rt-scale-wrap,.rt-studio .rt-out-foot { margin:0; font-size:.65rem; }
.rt-studio .rt-viridis-bar { height:3px; }
.rt-studio .rt-scale-labels { font-size:.62rem; margin-top:1px; }
.rt-studio .rt-side-group { gap:5px; }
.rt-studio .rt-side-select { padding:6px 9px; }
.rt-studio .rt-qp-btn { white-space:nowrap; }
.rt-studio .rt-advanced { border-top:1px solid #e8edf1; padding-top:6px; }
.rt-studio .rt-advanced summary { color:var(--slate); cursor:pointer; font-size:.76rem; font-weight:650; }
.rt-studio .rt-advanced[open] summary { margin-bottom:6px; }
.rt-studio .rt-advanced .rt-side-opts { margin-top:7px; }
@media (max-width: 1020px) {
  .rt-studio { grid-template-columns:minmax(0,1fr) minmax(170px,30%); grid-template-areas:"scene readouts" "controls controls"; }
  .rt-studio > .rt-sidebar { max-height:none; border-left:0; border-top:1px solid #e5e9f0; }
}
@media (max-width: 600px) {
  .rt-studio { grid-template-columns:minmax(0,1fr); grid-template-areas:"scene" "readouts" "controls"; }
  .rt-studio > .rt-viewport,.rt-studio--full > .rt-viewport { height:clamp(223px,43svh,355px); }
  .rt-studio > .rt-outputs { height:auto; grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-rows:auto; padding:5px; gap:4px; border-left:0; }
  .rt-studio .rt-out-card { padding:4px; justify-content:flex-start; gap:3px; }
  .rt-studio .rt-out-title .rt-num,.rt-studio .rt-out-foot,.rt-studio .rt-scale-wrap { display:none; }
  .rt-studio .rt-out-title { font-size:.69rem; }
  .rt-studio .rt-canvas-wrap { width:100%; }
  .rt-studio .rt-vp-hint { font-size:.64rem; }
  .rt-studio .rt-vp-top-right button { font-size:.66rem; padding:4px; }
  .rt-studio .rt-vp-badge { font-size:.68rem; padding:4px 5px; }
}


/* The RGB thumbnail keeps its live 320x240 source; click to inspect the pixels. */
.rt-rgb-inspect { position:relative; padding:0; cursor:zoom-in; }
.rt-inspect-badge { position:absolute; right:5px; bottom:5px; padding:2px 5px; background:#101c26cf; color:white; font:600 9px var(--mono); border-radius:4px; pointer-events:none; }
.rt-rgb-inspect:focus-visible { outline:2px solid #34a68e; outline-offset:2px; }
.rt-rgb-dialog { box-sizing:border-box; max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); overflow:auto; background:white; color:#172326; padding:14px; border:1px solid #dfe5ee; border-radius:12px; }
.rt-rgb-dialog::backdrop { background:rgba(20,31,45,.6); }
.rt-rgb-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:8px; }
.rt-rgb-mode { display:flex; align-items:center; gap:8px; font-size:.82rem; margin-bottom:8px; }
.rt-rgb-mode select,.rt-rgb-dialog-head button { font:inherit; color:inherit; border:1px solid #dfe5ee; border-radius:6px; background:#f5f8f8; padding:5px 8px; }
.rt-rgb-dialog canvas { display:block; width:auto; max-width:min(calc(100vw - 58px),calc((100dvh - 155px)*4/3)); height:auto; border-radius:6px; }
.rt-rgb-dialog canvas[width="320"] { image-rendering:pixelated; }
.rt-rgb-dialog small { display:block; max-width:42ch; margin-top:8px; color:#56646b; font-size:.73rem; line-height:1.45; }

.rt-engine-label { margin:0; padding:4px 7px; border-left:2px solid #94a3b8; color:#475569; font:600 .72rem/1.4 var(--mono); }
.rt-engine-label[data-engine="native"] { border-color:#1f8a76; color:#12624f; background:#edf7f3; }

/* Frame-locked dual RGB motion */
.split-motion{--split:50%;isolation:isolate;touch-action:pan-y;cursor:ew-resize;}
.split-motion .compare-top{clip-path:inset(0 calc(100% - var(--split)) 0 0);}
.split-motion .compare-divider{left:var(--split);transform:translateX(-50%);z-index:2;}
.split-motion .compare-handle{left:clamp(21px,var(--split),calc(100% - 21px));width:42px;height:42px;z-index:4;pointer-events:auto;touch-action:none;cursor:ew-resize;}
.split-motion .compare-handle svg{width:20px;height:20px;pointer-events:none;}
.split-motion .compare-handle:focus-visible{outline:3px solid #44d5bc;outline-offset:3px;}
.split-motion.is-dragging .compare-handle{background:#e4fbf5;}
.split-motion .compare-badge{z-index:3;pointer-events:none;}
.split-motion canvas{display:none;position:absolute;inset:0;width:100%;height:100%;pointer-events:none;}
.split-motion[data-motion="ready"] canvas{display:block;}
.split-motion[data-motion="ready"] img{visibility:hidden;}
.split-frame-source{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;}
.split-motion-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:10px;color:var(--muted);font-size:.79rem;}
.split-motion-controls .pill-btn{min-height:36px;}
.split-motion-note{font-size:.84rem;color:var(--muted);margin:8px 0 0;}
@media(max-width:420px){.split-motion .compare-badge{font-size:.62rem;top:6px;padding:3px 5px}.split-motion .compare-badge--left{left:6px}.split-motion .compare-badge--right{right:6px}}

/* Section 02: frame-locked, orbitable contact replay. */
#blender-showcase{scroll-margin-top:72px}
.bs-player [hidden]{display:none!important}
.bs-transport{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.bs-transport button,.bs-view-buttons button{font:inherit;line-height:1.2;border:1px solid #d2dae2;border-radius:7px;background:#f4f7fa;color:#273951;padding:7px 11px;cursor:pointer}
.bs-transport button:focus-visible,.bs-view-buttons button:focus-visible,.bs-orbit canvas:focus-visible{outline:2px solid #436b9c;outline-offset:1px}
.bs-transport button:disabled,.bs-transport input:disabled{opacity:.55;cursor:default}
#bs-play{min-width:72px;background:#223852;color:white;border-color:#223852}
#bs-clock,#bs-status{font-variant-numeric:tabular-nums}
#bs-clock{color:#435569;min-width:86px;font-size:.85rem}
.bs-timeline{flex:1;display:flex;align-items:center;min-width:105px}
.bs-timeline input{width:100%;accent-color:#385a80}
.bs-sr{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.bs-player[data-mode="replay"] .blender-showcase-grid{grid-template-columns:minmax(0,2fr) minmax(190px,1fr);align-items:start}
.bs-orbit{min-width:0;height:clamp(310px,47vw,510px);position:relative;background:#aab6bd}
.bs-orbit canvas{width:100%;height:100%;display:block;cursor:grab;touch-action:none}
.bs-orbit canvas:active{cursor:grabbing}
.bs-view-buttons{display:flex;align-items:center;gap:6px;padding:7px 9px;background:#18222e;color:#cbd5e1;flex-wrap:wrap}
.bs-view-buttons button{padding:5px 8px;font-size:.75rem}
.bs-view-buttons span{margin-left:auto;font-size:.75rem}
.bs-player[data-mode="still"] .bs-view-buttons{display:none}
.bs-player .blender-tri-grid canvas{display:block;width:100%;height:auto;aspect-ratio:4/3}
#bs-status{font-size:.82rem;color:#4a6176;margin-top:11px}
.bs-player[data-mode="replay"] #bs-caption{display:none}
@media(max-width:670px){
 .bs-player[data-mode="replay"] .blender-showcase-grid{grid-template-columns:minmax(0,1fr)}
 .bs-player[data-mode="replay"] .blender-sub-row{grid-template-columns:repeat(2,minmax(0,1fr))}
 .bs-orbit{height:clamp(245px,70vw,355px)}
 .bs-transport{gap:7px}
 #bs-mode{font-size:.78rem}
}

#bs-video-dialog{width:min(92vw,970px);max-height:90vh;padding:16px;color:#182334;background:#f3f6f9;border:1px solid #cbd6e2;border-radius:12px}
#bs-video-dialog::backdrop{background:rgba(15,24,36,.72)}
.bs-video-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.bs-video-header h3{margin:0;font-size:1rem}
.bs-video-header button{font:inherit;padding:5px 8px;border:1px solid #c1ccdb;background:white;color:#182334;border-radius:6px;cursor:pointer}
#bs-video-dialog video{display:block;width:100%;max-height:74vh;background:#131e2b;border-radius:7px}
#bs-video-dialog p:empty{display:none}


/* Keep controls on a compact toolbar instead of a full-height third column. */
.rt-studio {
  --studio-height: clamp(456px, calc(100svh - 148px), 600px);
  grid-template-columns:minmax(0,1fr) minmax(172px,21%);
  grid-template-areas:"controls controls" "scene readouts";
}
.rt-studio > .rt-sidebar-simple {
  display:grid;
  grid-template-columns:minmax(220px,1.6fr) minmax(120px,1fr) minmax(122px,1fr) minmax(128px,1fr);
  align-items:center;
  max-height:none;
  overflow:visible;
  padding:12px 16px;
  gap:16px;
  border:0;
  border-bottom:1px solid #e5e9f0;
}
.rt-sidebar-simple > .rt-side-group:first-child {display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px}
.rt-sidebar-simple .rt-btn-upload-light,.rt-sidebar-simple .rt-simple-actions button{width:100%;min-height:38px;margin:0}
.rt-sidebar-simple .rt-seg{width:100%;margin:0}
.rt-sidebar-simple .rt-seg button{flex:1 1 50%}
.rt-sidebar-simple .rt-side-select{width:100%;min-height:38px}
.rt-sidebar-simple .rt-simple-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.rt-upload-error{margin:0;color:#9f2734;font-size:.76rem;overflow-wrap:anywhere}
.rt-upload-error[hidden]{display:none!important}
.rt-studio .rt-out-card{gap:6px;padding:7px 8px}
.rt-studio .rt-out-head{min-height:20px}
.rt-studio .rt-out-controls select{min-height:20px}
.rt-studio .rt-rgb-markers{min-width:48px}
@media(max-width:760px){
 .rt-studio > .rt-sidebar-simple{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:9px 12px}
}
@media(max-width:600px){
 .rt-studio {grid-template-columns:minmax(0,1fr);grid-template-areas:"controls" "scene" "readouts"}
 .rt-studio > .rt-sidebar-simple{padding:10px}
 .rt-sidebar-simple > .rt-side-group:first-child {display:block}
 .rt-sidebar-simple > .rt-side-group:first-child label {display:none}
 .rt-sidebar-simple .rt-simple-actions button{padding-inline:5px}
 .rt-studio .rt-out-card{padding:4px;gap:4px}
}

button, select, input, textarea { font-family: inherit; }

/* Fixed optical presentation frame for the UMD M. No label or UI is rotated. */
.rt-studio[data-output-orientation="turned"] canvas:is([data-el="depthCanvas"],[data-el="markerCanvas"],[data-el="rgbCanvas"],[data-el="rgbDetail"],[data-el="readoutDetail"]){
  transform:rotate(180deg)
}

/* Readouts fit the card, including the header, controls and timing. */
.rt-studio .rt-out-card{display:flex;min-height:0;justify-content:flex-start;overflow:hidden;gap:4px}
.rt-studio .rt-out-head{flex:0 0 auto;display:flex;justify-content:space-between;align-items:center;gap:3px;min-width:0;min-height:0}
.rt-studio .rt-out-title{min-width:0;white-space:normal;line-height:1.1}
.rt-studio .rt-out-title b{white-space:normal;overflow-wrap:normal}
.rt-studio .rt-out-controls,.rt-studio .rt-out-controls label{min-width:0;max-width:100%}
.rt-studio .rt-out-controls select{max-width:100%;min-width:0}
.rt-studio .rt-canvas-wrap{position:relative;display:block;min-height:0;min-width:0;width:100%;flex:1 1 0;overflow:hidden;padding:0;border:0;background:transparent}
.rt-studio .rt-canvas-wrap canvas{display:block;width:100%;height:100%;border-radius:4px;object-fit:contain}
.rt-studio button.rt-canvas-wrap{cursor:zoom-in}
.rt-studio button.rt-canvas-wrap:focus-visible{outline:2px solid #3f6da7;outline-offset:-2px}
.rt-studio .rt-inspect-badge{position:absolute;z-index:1;right:3px;bottom:3px;padding:2px 4px;background:#182837de;color:#fff;font-size:clamp(.55rem,.9vw,.68rem);line-height:1.2;border-radius:4px;white-space:nowrap;pointer-events:none}
.rt-studio .rt-scale-wrap,.rt-studio .rt-out-foot{flex:0 0 auto;width:100%;box-sizing:border-box;min-width:0}
.rt-studio .rt-out-foot{line-height:1.15;overflow-wrap:anywhere}
.rt-studio .rt-out-foot.rt-mono{display:flex;justify-content:space-between;gap:2px 6px;flex-wrap:wrap}
.rt-studio .rt-timing{margin-left:auto;white-space:nowrap;color:#64748b}
.rt-studio .rt-readout-dialog canvas{width:min(640px,calc(100vw - 58px),calc((100dvh - 104px)*4/3));max-width:100%;height:auto;image-rendering:auto}
@media(max-width:600px){
 .rt-studio .rt-canvas-wrap{flex:none;aspect-ratio:4/3}
 .rt-studio .rt-out-head{align-items:flex-start}
 .rt-studio .rt-out-foot{display:none}
 .rt-studio .rt-out-foot.rt-mono{display:block;text-align:right}
 .rt-studio .rt-out-foot.rt-mono [data-el=forceVal]{display:none}
}

/* Keep readout geometry independent of changing force and timer widths. */
.rt-studio .rt-out-foot.rt-motion-stats {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-auto-rows:1.15em;
  gap:2px;
  font-variant-numeric:tabular-nums;
}
.rt-studio .rt-motion-stats [data-el="forceVal"] {
  min-width:0;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.rt-studio .rt-motion-stats .rt-timing {justify-self:end}
.rt-studio .rt-inspect-badge {font-size:.8rem;padding:2px 4px}
@media (max-width:600px) {
  .rt-studio .rt-out-foot.rt-motion-stats {grid-auto-rows:1.15em}
}
