:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --bg-tint: #edf4fc;
  --heading: #17375e;
  --body: #334155;
  --secondary: #5b6b82;
  --ink: #17375e;
  --text: #334155;
  --muted: #7c8da5;
  --line: #dbe5f0;
  --accent: #2563eb;
  --accent-bright: #3b82f6;
  --accent-dark: #1d4ed8;
  --accent-soft: #eff6ff;
  --cyan: #0ea5e9;
  --violet: #8b5cf6;
  --panel: #f8fbff;
  --panel-2: #ffffff;
  --panel-3: #edf4ff;
  --panel-line: rgba(38, 84, 148, 0.16);
  --card: #ffffff;
  --shadow: 0 16px 42px rgba(22, 48, 86, 0.08);
  --radius: 8px;
  --max: 1040px;
  --wide: 1240px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}

a {
  color: inherit;
}

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

button {
  letter-spacing: 0;
}

img {
  display: block;
  max-width: 100%;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: var(--scroll-progress, 0%);
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  transition: width 0.1s ease;
  z-index: 1;
}

.nav-inner {
  width: min(var(--wide), calc(100% - 40px));
  min-height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--accent);
}

.container,
.wide {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.wide {
  width: min(var(--wide), calc(100% - 40px));
}

.narrow {
  max-width: 860px;
}

.studio-hero {
  position: relative;
  isolation: isolate;
  min-height: 680px;
  overflow: hidden;
  padding: 44px 0;
  color: #f8fafc;
  background: #5b3a2d;
}

.studio-hero::before,
.studio-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.studio-hero::before {
  z-index: -2;
  background-color: #5b3a2d;
  background-image: url("static/figures/hero-scenes.png");
  background-image: image-set(
    url("static/figures/hero-scenes.webp") type("image/webp"),
    url("static/figures/hero-scenes.png") type("image/png")
  );
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(1.015);
}

.studio-hero::after {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(5, 12, 22, 0.34) 0%, rgba(5, 12, 22, 0.54) 58%, rgba(5, 12, 22, 0.82) 100%),
    radial-gradient(circle at 50% 34%, rgba(15, 23, 42, 0.06), rgba(5, 10, 18, 0.38) 78%);
}

.studio-hero-inner {
  width: min(1120px, calc(100% - 40px));
  min-height: 592px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-copy {
  min-width: 0;
  width: 100%;
  max-width: 1020px;
  text-align: center;
}

.venue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  margin: 0 0 14px;
  padding: 4px 13px;
  color: #eff6ff;
  background: rgba(15, 23, 42, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 900px;
  margin: 0 auto 16px;
  color: var(--heading);
  font-size: 2.42rem;
  line-height: 1.16;
  letter-spacing: 0;
}

.studio-hero h1 {
  max-width: 980px;
  color: #ffffff;
  font-size: clamp(2.4rem, 4.1vw, 3.55rem);
  font-weight: 760;
  line-height: 1.13;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.46);
}

h2 {
  margin: 0 0 16px;
  text-align: center;
  font-size: 2.1rem;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 10px;
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 620;
}

.hero-summary {
  max-width: 720px;
  margin: 0 auto 20px;
  color: rgba(241, 245, 249, 0.92);
  font-size: 1.02rem;
  line-height: 1.58;
}

.authors span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 7px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
}

sup {
  color: var(--accent);
  font-size: 0.68em;
  line-height: 0;
}

.studio-hero sup {
  color: #bfdbfe;
}

.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px 14px;
  color: rgba(241, 245, 249, 0.9);
  font-size: 0.88rem;
}

.author-notes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin-top: 6px;
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.8rem;
  font-weight: 680;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.button,
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(22, 48, 86, 0.04);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.button:hover:not(.muted):not([aria-disabled="true"]) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(47, 111, 218, 0.15);
}

.studio-hero .button {
  color: #ffffff;
  background: rgba(15, 23, 42, 0.42);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px);
}

.studio-hero .button:hover:not(.muted):not([aria-disabled="true"]) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.62);
}

.button:hover,
.copy-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button.primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.button.muted {
  color: var(--secondary);
  background: #f8fbff;
  border-color: #d8e4f2;
  cursor: default;
}

.studio-hero .button.muted {
  color: rgba(241, 245, 249, 0.82);
  background: rgba(15, 23, 42, 0.3);
  border-color: rgba(255, 255, 255, 0.18);
}

.button.resource {
  min-width: 166px;
  gap: 10px;
  justify-content: space-between;
  padding: 8px 10px 8px 15px;
}

.button.resource .resource-label {
  color: var(--heading);
  font-weight: 820;
}

.button.resource .resource-status {
  min-height: 22px;
  padding: 3px 7px;
  color: #315f9c;
  background: #edf5ff;
  border: 1px solid #c9dcf6;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 820;
  line-height: 1.1;
}

.studio-hero .button.resource.muted {
  background: rgba(15, 23, 42, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.studio-hero .button.resource .resource-label {
  color: #ffffff;
}

.studio-hero .button.resource .resource-status {
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.22);
  border-color: rgba(191, 219, 254, 0.28);
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  gap: 10px;
  margin: 24px auto 0;
  padding: 10px;
  background: rgba(15, 23, 42, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px);
}

.hero-highlights span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(241, 245, 249, 0.9);
  padding: 0 8px;
  font-size: 0.86rem;
}

.hero-highlights strong {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 800;
}

.demo-section {
  padding: 32px 0 56px;
  background: linear-gradient(135deg, #eef6ff 0%, #f8fbff 50%, #f5f8fc 100%);
  scroll-margin-top: 58px;
}

.demo-section-inner {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
  max-width: 720px;
}

.hero-stats div {
  min-width: 0;
  padding: 16px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-stats strong {
  display: block;
  color: #ffffff;
  font-size: 1.5rem;
  line-height: 1.05;
}

.hero-stats span {
  display: block;
  margin-top: 4px;
  color: #aab7c7;
  font-size: 0.8rem;
  line-height: 1.35;
}

.demo-console {
  position: relative;
  min-width: 0;
  width: 100%;
  max-width: 1180px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: var(--radius);
  box-shadow: 0 22px 65px rgba(22, 48, 86, 0.12), 0 2px 8px rgba(22, 48, 86, 0.05);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.demo-console::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  z-index: 2;
}

.console-topbar {
  min-height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--body);
  background: #f8fbff;
  border-bottom: 1px solid rgba(37, 99, 235, 0.12);
  font-size: 0.86rem;
  font-weight: 750;
}

.console-topbar > div {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  color: #526985;
  background: #eef5ff;
  border: 1px solid #d3e2f5;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.status-chip.success {
  color: #176b4f;
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.demo-shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  min-height: 600px;
}

.case-rail {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: linear-gradient(180deg, #f4f8fe, #eef5fc);
  border-right: 1px solid rgba(37, 99, 235, 0.12);
}

.rail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--secondary);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.rail-heading strong {
  color: var(--heading);
  text-transform: none;
}

.case-list {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  overflow-y: scroll;
  padding: 8px 7px 8px 8px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(37, 99, 235, 0.11);
  border-radius: var(--radius);
  scrollbar-gutter: stable;
  scrollbar-color: #8eb8ee #dce9f8;
  scrollbar-width: auto;
}

.case-list::-webkit-scrollbar {
  width: 10px;
}

.case-list::-webkit-scrollbar-track {
  background: #dce9f8;
  border-radius: 999px;
}

.case-list::-webkit-scrollbar-thumb {
  background: #8eb8ee;
  border: 2px solid #dce9f8;
  border-radius: 999px;
}

.case-list::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.case-select {
  display: none;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--heading);
  background: #ffffff;
  border: 1px solid #d7e4f3;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 750;
}

.case-card {
  width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 18px 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--secondary);
  text-align: left;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(22, 48, 86, 0.03);
}

.case-card[data-active="true"] {
  border-color: rgba(37, 99, 235, 0.42);
  color: var(--heading);
  background: linear-gradient(180deg, #ffffff, #edf5ff);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
}

.case-check {
  width: 17px;
  height: 17px;
  border: 2px solid #bfd1e8;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 0 0 3px #ffffff;
}

.case-card[data-active="true"] .case-check {
  border-color: var(--accent);
  background: var(--accent);
}

.case-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-height: 32px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 850;
  background: #eef5ff;
  border-radius: 6px;
}

.case-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.case-copy strong {
  min-width: 0;
  overflow: hidden;
  color: var(--heading);
  font-size: 0.84rem;
  font-weight: 820;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-copy em,
.case-copy small {
  min-width: 0;
  overflow: hidden;
  color: var(--secondary);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 680;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-copy small {
  color: var(--muted);
}

.case-card:hover,
.case-card:focus-visible {
  border-color: rgba(37, 99, 235, 0.38);
  outline: none;
}

.demo-workspace {
  min-width: 0;
  padding: 16px;
  background: #fbfdff;
}

.workspace-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.workspace-header h2 {
  margin: 0;
  color: var(--heading);
  text-align: left;
  font-size: 1.28rem;
  line-height: 1.2;
}

.workspace-kicker {
  margin: 0 0 3px;
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

.tab-row.compact {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

.demo-tab {
  min-height: 34px;
  padding: 7px 12px;
  color: var(--secondary);
  background: #ffffff;
  border: 1px solid #d7e4f3;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(22, 48, 86, 0.03);
}

.demo-tab[data-active="true"] {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.stage-filmstrip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.stage-frame {
  min-width: 0;
  min-height: 66px;
  padding: 6px;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--secondary);
  text-align: left;
  background: #ffffff;
  border: 1px solid #d7e4f3;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(22, 48, 86, 0.03);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.stage-frame:hover,
.stage-frame:focus-visible {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
  outline: none;
}

.stage-frame[data-active="true"] {
  border-color: rgba(37, 99, 235, 0.56);
  background: linear-gradient(180deg, #ffffff, #f3f8ff);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
}

.stage-frame-image {
  display: block;
  width: 70px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eef4fb;
  border: 1px solid #e0e9f5;
  border-radius: 6px;
}

.stage-frame-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stage-frame-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.stage-frame-copy strong {
  min-width: 0;
  color: var(--heading);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.15;
}

.stage-frame-copy em {
  min-width: 0;
  color: var(--secondary);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 680;
  line-height: 1.2;
}

.prompt-panel {
  margin: 10px 0;
  padding: 10px 12px;
  color: var(--body);
  background: #f7fbff;
  border: 1px solid #dbe8f6;
  border-radius: var(--radius);
}

.prompt-panel span {
  display: block;
  margin-bottom: 4px;
  color: var(--heading);
  font-size: 0.84rem;
  font-weight: 850;
}

.prompt-panel p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.38;
}

.media-toolbar {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.media-toolbar > span {
  flex: 0 0 auto;
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 750;
}

.demo-media,
.demo-model {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 240px;
  max-height: 600px;
  overflow: hidden;
  background: #f3f7fc;
  border: 1px solid #dbe7f4;
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.demo-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f8fbff;
}

.before-after {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #f8fbff;
}

.compare-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f8fbff;
  user-select: none;
  pointer-events: none;
}

.compare-before {
  z-index: 1;
}

.compare-after {
  position: absolute;
  inset: 0;
  z-index: 2;
  clip-path: inset(0 0 0 50%);
}

.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 4;
  width: 2px;
  background: rgba(37, 99, 235, 0.85);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9), 0 0 18px rgba(37, 99, 235, 0.2);
  pointer-events: none;
}

.compare-divider span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border: 2px solid var(--accent);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.18);
}

.compare-divider span::before,
.compare-divider span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}

.compare-divider span::before {
  left: 9px;
  transform: translateY(-50%) rotate(-45deg);
}

.compare-divider span::after {
  right: 9px;
  transform: translateY(-50%) rotate(135deg);
}

.demo-media[data-demo-view="perspectiveCompare"] .compare-image {
  transform: scale(1.15);
}

.compare-labels {
  position: absolute;
  inset: 10px 10px auto;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.compare-labels span {
  min-height: 24px;
  padding: 4px 8px;
  color: #17375e;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.1;
  box-shadow: 0 4px 14px rgba(22, 48, 86, 0.08);
}

.compare-range {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.demo-model {
  background: #0f172a;
}

.model-canvas {
  width: 100%;
  height: 100%;
}

.model-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.model-overlay {
  position: absolute;
  left: 12px;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: min(360px, calc(100% - 24px));
  padding: 10px;
  color: #dbeeff;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(219, 234, 254, 0.18);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.22);
  backdrop-filter: blur(10px);
}

.model-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 750;
}

.model-state-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.model-status {
  min-width: 0;
  flex: 1 1 auto;
}

.model-status-row strong {
  color: #bfdbfe;
  font-size: 0.72rem;
  line-height: 1;
}

.model-progress {
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  background: rgba(226, 232, 240, 0.2);
  border-radius: 999px;
}

.model-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #22c55e);
  border-radius: inherit;
  transition: width 180ms ease;
}

.model-hint {
  margin: 7px 0 0;
  color: #b8c8dc;
  font-size: 0.72rem;
  line-height: 1.35;
}

.model-overlay[data-state="idle"] .model-progress,
.model-overlay[data-state="loaded"] .model-progress,
.model-overlay[data-state="error"] .model-progress {
  display: none;
}

.model-overlay[data-state="loaded"] {
  width: auto;
  right: auto;
  background: rgba(15, 23, 42, 0.68);
}

.model-overlay[data-state="loaded"] .model-state-dot {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.model-overlay[data-state="error"] .model-state-dot {
  background: #fb7185;
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.16);
}

.model-overlay[data-state="error"] .model-hint {
  color: #fecdd3;
}

.requirement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.memory-panel {
  margin-top: 12px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.5), rgba(37, 99, 235, 0.02));
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: var(--radius);
}

.memory-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--secondary);
}

.memory-panel-head span {
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
}

.memory-panel-head strong {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
}

.memory-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr) 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.memory-node {
  position: relative;
  min-width: 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: var(--radius);
}

.memory-node span,
.memory-node em {
  display: block;
  min-width: 0;
  color: var(--secondary);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.memory-node strong {
  display: block;
  margin: 3px 0;
  color: var(--body);
  font-size: 0.83rem;
  line-height: 1.25;
}

.working-node,
.scene-node,
.skill-node {
  overflow: hidden;
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.08);
}

.working-node {
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.88));
  box-shadow: inset 3px 0 0 #2563eb, 0 8px 22px rgba(37, 99, 235, 0.08);
}

.scene-node {
  background:
    linear-gradient(135deg, rgba(238, 242, 255, 0.95), rgba(248, 251, 255, 0.88));
  box-shadow: inset 3px 0 0 #6366f1, 0 8px 22px rgba(99, 102, 241, 0.08);
}

.skill-node {
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(236, 253, 245, 0.82));
  box-shadow: inset 3px 0 0 var(--accent), 0 8px 22px rgba(37, 99, 235, 0.08);
}

.working-node > span {
  color: #2563eb;
}

.scene-node > span {
  color: #4f46e5;
}

.skill-node > span {
  color: var(--accent);
}

.working-node strong,
.scene-node strong,
.skill-node strong {
  color: var(--heading);
}

.skill-node small {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 22px;
  margin-top: 7px;
  padding: 4px 8px;
  color: #176b4f;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.1;
}

.memory-mini-flow,
.skill-mini-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 8px;
}

.memory-mini-flow b,
.skill-mini-flow b {
  min-width: 0;
  padding: 4px 5px;
  color: #315f9c;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 6px;
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1;
  text-align: center;
}

.working-node .memory-mini-flow b {
  color: #315f9c;
  border-color: rgba(37, 99, 235, 0.16);
}

.scene-node .memory-mini-flow b {
  color: #4f46e5;
  border-color: rgba(99, 102, 241, 0.16);
}

.memory-link {
  height: 1px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.3), rgba(37, 99, 235, 0.65));
}

.studio-bridge {
  margin-top: -1px;
  padding: 28px 0 36px;
  background: linear-gradient(180deg, #e9f2f8 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
}

.bridge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.bridge-grid > div {
  min-width: 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(190, 204, 222, 0.72);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(23, 32, 54, 0.055);
}

.bridge-grid span {
  display: block;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.bridge-grid strong {
  display: block;
  margin: 5px 0 6px;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.25;
}

.bridge-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.48;
}

.requirement-grid > div {
  min-width: 0;
  padding: 11px;
  background: #ffffff;
  border: 1px solid #dbe7f4;
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(22, 48, 86, 0.03);
}

.requirement-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--secondary);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.demo-pill,
.demo-empty {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 750;
  line-height: 1.2;
}

.demo-pill {
  color: #315f9c;
  background: #eff6ff;
  border: 1px solid #c8daf4;
}

.requirement-grid > div:nth-child(2) .demo-pill {
  color: #176b4f;
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.requirement-grid > div:nth-child(3) .demo-pill {
  color: #8a4b1d;
  background: #fff7ed;
  border-color: #fed7aa;
}

.demo-empty {
  color: var(--muted);
  background: #f4f7fb;
}

.section {
  padding: 78px 0;
}

.section:first-of-type {
  padding-top: 68px;
}

.section + .section {
  padding-top: 78px;
}

.section.alt {
  background: linear-gradient(180deg, #f7f9fc, #f3f7fb);
  border-top: 1px solid rgba(219, 229, 240, 0.75);
  border-bottom: 1px solid rgba(219, 229, 240, 0.75);
}

.section-lead {
  max-width: 820px;
  margin: 0 auto 32px;
  color: var(--muted);
  text-align: center;
  font-size: 1.02rem;
  line-height: 1.65;
}

.narrow p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.02rem;
  text-align: justify;
  line-height: 1.72;
}

.figure-block {
  margin: 28px 0 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.figure-block + .figure-block {
  margin-top: 36px;
}

.figure-block.compact {
  margin: 0;
}

.figure-block img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  background: #fff;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
}

.tradeoff-figure {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.centered-result {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.centered-result img {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

figcaption {
  max-width: 900px;
  margin: 12px auto 2px;
  padding: 0 10px;
  color: var(--muted);
  text-align: center;
  font-size: 0.93rem;
  line-height: 1.5;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.55fr);
  gap: 28px;
  align-items: center;
}

.metric-grid,
.result-grid {
  display: grid;
  gap: 14px;
}

.metric-grid {
  grid-template-columns: 1fr;
}

.metric,
.result-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 240ms ease-out, box-shadow 240ms ease-out;
}

.metric:hover,
.result-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 56px rgba(23, 32, 54, 0.14);
}

.metric {
  padding: 18px;
}

.metric-value {
  display: block;
  color: var(--accent);
  font-size: 2rem;
  font-weight: 850;
  line-height: 1.05;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.result-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 26px;
}

.result-card {
  padding: 20px;
  transform-style: preserve-3d;
}

.result-card h3 {
  color: var(--muted);
  font-size: 0.92rem;
}

.result-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.paper-table-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 6px 0 28px;
}

.paper-table-card {
  min-width: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.paper-table-card.construction-table {
  border-top: 4px solid #2563eb;
}

.paper-table-card.editing-table {
  border-top: 4px solid #10b981;
}

.paper-table-head {
  padding: 12px 16px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(248, 251, 255, 0.95));
  border-bottom: 1px solid #dbe7f4;
}

.editing-table .paper-table-head {
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.92), rgba(248, 251, 255, 0.95));
}

.paper-table-head h3 {
  margin: 0;
  color: var(--heading);
  font-size: 1rem;
  line-height: 1.2;
}

.table-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
}

.paper-table-card table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.78rem;
  line-height: 1.25;
}

.paper-table-card th,
.paper-table-card td {
  padding: 8px 9px;
  border-bottom: 1px solid #e5edf7;
  text-align: right;
  white-space: nowrap;
}

.paper-table-card th:first-child,
.paper-table-card td:first-child {
  text-align: left;
}

.paper-table-card thead th {
  color: var(--secondary);
  background: #f8fbff;
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.paper-table-card tbody th {
  color: var(--heading);
  font-weight: 820;
}

.paper-table-card tbody td {
  color: var(--body);
  font-weight: 720;
}

.paper-table-card tbody tr:last-child th,
.paper-table-card tbody tr:last-child td {
  border-bottom: 0;
}

.paper-table-card .ours-row {
  background: linear-gradient(90deg, #eff6ff, #ecfdf5);
}

.paper-table-card .ours-row th,
.paper-table-card .ours-row td {
  color: #174a7c;
  font-weight: 900;
}

.big-number {
  margin: 10px 0 8px !important;
  color: var(--accent) !important;
  font-size: 2.5rem !important;
  font-weight: 850;
  line-height: 1;
}

.bibtex {
  overflow-x: auto;
  margin: 20px 0 14px;
  padding: 18px;
  color: #172036;
  background: #f4f6fa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.55;
}

.copy-button {
  border-radius: var(--radius);
}

.footer {
  padding: 26px 0;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer p {
  margin: 0;
  font-size: 0.9rem;
}

@media (max-width: 1180px) {
  .studio-hero-inner {
    align-items: center;
  }

  h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 900px) {
  .nav-inner {
    padding: 14px 0;
    flex-direction: column;
    gap: 10px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
  }

  .studio-hero {
    min-height: 640px;
    padding: 36px 0;
  }

  .studio-hero-inner {
    min-height: 568px;
  }

  .studio-hero::before {
    background-position: 50% center;
  }

  .hero-highlights {
    border-radius: var(--radius);
  }

  .hero-highlights span {
    flex: 1 1 180px;
    justify-content: center;
  }

  h1 {
    font-size: 2.18rem;
  }

  h2 {
    font-size: 1.78rem;
  }

  .demo-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .case-rail {
    display: flex;
    border-right: 0;
    border-bottom: 1px solid var(--panel-line);
  }

  .case-list {
    max-height: 360px;
  }

  .split,
  .result-grid,
  .paper-table-grid,
  .requirement-grid,
  .stage-filmstrip,
  .bridge-grid,
  .memory-flow {
    grid-template-columns: 1fr;
  }

  .memory-link {
    width: 1px;
    height: 16px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(47, 111, 218, 0.3), rgba(91, 142, 230, 0.65));
  }
}

@media (max-width: 640px) {
  .container,
  .wide,
  .nav-inner,
  .studio-hero-inner,
  .demo-section-inner {
    width: min(100% - 28px, var(--max));
  }

  .studio-hero {
    min-height: 0;
    padding: 36px 0 40px;
  }

  .studio-hero-inner {
    min-height: 0;
  }

  .studio-hero::before {
    background-position: 48% center;
    background-size: auto 100%;
  }

  .studio-hero h1 {
    font-size: 2rem;
  }

  .demo-section {
    padding: 32px 0 24px;
  }

  .section {
    padding: 46px 0;
  }

  h1 {
    font-size: 1.82rem;
  }

  h2 {
    font-size: 1.55rem;
  }

  .authors {
    gap: 4px 14px;
  }

  .case-select {
    display: block;
    margin-bottom: 10px;
  }

  .case-list {
    display: grid;
    max-height: 320px;
    overflow-x: hidden;
    scrollbar-width: thin;
  }

  .case-card {
    min-height: 52px;
  }

  .stage-frame {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .stage-frame-image {
    width: 82px;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button,
  .button.resource {
    width: 100%;
    min-width: 0;
  }

  .hero-highlights {
    display: grid;
    width: 100%;
    border-radius: var(--radius);
  }

  .hero-highlights span {
    padding: 2px 4px;
  }

  .console-topbar,
  .workspace-header,
  .media-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .console-topbar {
    padding: 10px 12px;
  }

  .demo-workspace {
    padding: 12px;
  }

  .demo-media,
  .demo-model {
    min-height: 200px;
    aspect-ratio: 4 / 3;
  }

  .narrow p {
    text-align: left;
  }
}

/* Gradient animation */
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  cursor: pointer;
  animation: fadeIn 0.3s ease;
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox img {
  max-width: 95%;
  max-height: 95vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  font-weight: 300;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Demo image transition */
.demo-media img {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.demo-media img.transitioning {
  opacity: 0;
  transform: scale(0.98);
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .studio-hero {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
