#depth-demo {
  --depth-font: var(--font-sans, Inter, -apple-system, BlinkMacSystemFont, sans-serif);
  --depth-mono: var(--font-mono, "JetBrains Mono", ui-monospace, SFMono-Regular, monospace);
  --depth-display: var(--font-display, "Space Grotesk", Inter, system-ui, sans-serif);
  --depth-accent: #d8f7a1;
  padding: clamp(64px, 9vw, 128px) clamp(20px, 4vw, 40px);
  scroll-margin-top: 55px;
  font-family: var(--depth-font);
  color: #101518;
}

.depth-demo-inner { max-width: 1200px; margin-inline: auto; }

.depth-demo-heading {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  align-items: end;
  column-gap: clamp(24px, 7vw, 96px);
  row-gap: 18px;
  margin-bottom: clamp(24px, 4vw, 44px);
}

.depth-demo-kicker {
  margin: 0 0 14px;
  font: 500 11px/1.5 var(--depth-mono);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #526360;
}

.depth-demo-heading h2 {
  margin: 0;
  font: 600 clamp(43px, 6.1vw, 80px)/.99 var(--depth-display);
  letter-spacing: -.061em;
}

.depth-demo-heading > p {
  max-width: 41ch;
  margin: 0 0 1px;
  color: #4c565a;
  font-size: clamp(15px, 1.55vw, 18px);
  line-height: 1.65;
}

.depth-demo-shell {
  overflow: hidden;
  border: 1px solid #263335;
  border-radius: clamp(14px, 2vw, 22px);
  background: #151d20;
  color: #eef4f2;
  box-shadow: 0 24px 65px #0c252314;
  isolation: isolate;
}

.depth-demo-toolbar, .depth-demo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(12px, 2.1vw, 24px);
}

.depth-demo-toolbar {
  border-bottom: 1px solid #ffffff19;
  background: #151d20;
}

.depth-demo-scene {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 500 11px/1.3 var(--depth-mono);
  letter-spacing: .055em;
  color: #d6e0de;
  text-transform: uppercase;
  white-space: nowrap;
}

.depth-demo-indicator {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--depth-accent);
  box-shadow: 0 0 10px #d8f7a14f;
}

.depth-demo-controls {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
}

.depth-demo-controls fieldset {
  display: flex;
  align-items: center;
  position: relative;
  gap: 2px;
  min-width: 0;
  margin: 0;
  padding: 2px;
  border: 1px solid #ffffff1d;
  border-radius: 8px;
  background: #101719;
}

.depth-demo-controls legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

.depth-demo-controls label {
  position: relative;
  display: block;
  margin: 0;
}

.depth-demo-controls input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.depth-demo-controls label span {
  display: block;
  padding: 6px 11px;
  border-radius: 5px;
  font: 500 12px/1.4 var(--depth-font);
  color: #b7c4c3;
  pointer-events: none;
  transition: color .18s, background-color .18s;
}

.depth-demo-controls input:hover + span { color: #fff; }
.depth-demo-controls input:checked + span { background: #334044; color: #f5faf8; }
.depth-demo-controls input:focus-visible + span { outline: 2px solid var(--depth-accent); outline-offset: -2px; }

.depth-demo-view {
  position: relative;
  aspect-ratio: 560 / 266;
  overflow: hidden;
  isolation: isolate;
  background: #233539;
}

.depth-demo-view:focus-within { outline: 2px solid var(--depth-accent); outline-offset: -2px; }

.depth-demo-layer {
  position: absolute;
  display: block;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.depth-demo-sparse { clip-path: inset(0 calc(100% - var(--depth-split)) 0 0); }

.depth-demo-view::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, #0715122b, transparent 24%, transparent 80%, #08161520);
  pointer-events: none;
}

.depth-demo-labels {
  position: absolute;
  z-index: 2;
  inset: clamp(10px, 2vw, 19px) clamp(10px, 2vw, 19px) auto;
  display: flex;
  justify-content: space-between;
  gap: 4px;
  pointer-events: none;
}

.depth-demo-labels span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid #ffffff25;
  border-radius: 6px;
  background: #0d181bce;
  backdrop-filter: blur(8px);
  color: #f5fafa;
  font: 500 clamp(9px, 1.2vw, 11px)/1.2 var(--depth-mono);
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.depth-demo-labels i {
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a7c8be;
}

.depth-demo-labels span:last-child i { background: var(--depth-accent); }

.depth-demo-divider {
  position: absolute;
  z-index: 3;
  inset: 0 auto 0 clamp(1px, var(--depth-split), calc(100% - 1px));
  width: 1px;
  background: #f3ffe4db;
  box-shadow: 0 0 0 1px #16201e20, 0 0 8px #0c15115c;
  pointer-events: none;
}

.depth-demo-grip {
  position: absolute;
  inset: 50% auto auto 0;
  display: grid;
  place-items: center;
  width: clamp(36px, 4.4vw, 48px);
  aspect-ratio: 1;
  border: 1px solid #f6ffeaa8;
  border-radius: 50%;
  background: #ecf9d9;
  color: #15261d;
  box-shadow: 0 3px 15px #0c181866;
  transform: translate(-50%, -50%);
}

.depth-demo-slider {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  cursor: ew-resize;
  opacity: 0;
  touch-action: pan-y;
  appearance: none;
  -webkit-appearance: none;
}

.depth-demo-slider::-webkit-slider-runnable-track { height: 100%; }
.depth-demo-slider::-webkit-slider-thumb {
  width: 1px;
  height: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.depth-demo-slider::-moz-range-track { height: 100%; }
.depth-demo-slider::-moz-range-thumb { width: 1px; height: 100%; border: 0; border-radius: 0; }

.depth-demo-footer {
  align-items: start;
  padding-block: 13px;
  border-top: 1px solid #ffffff1b;
  background: #151d20;
}

.depth-demo-footer p {
  margin: 0;
  color: #c7d1d0;
  font-size: 12px;
  line-height: 1.5;
}

.depth-demo-count {
  display: inline-block;
  margin-inline-start: 6px;
  color: #a9bcba;
  font-family: var(--depth-mono);
  font-size: 10px;
}

.depth-demo-scale {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  color: #bdc9c7;
  font: 500 10px/1.5 var(--depth-mono);
  text-transform: uppercase;
}

.depth-demo-scale i {
  width: clamp(48px, 10vw, 120px);
  height: 5px;
  border-radius: 5px;
  background: linear-gradient(90deg, #e7f89e, #9de799, #45c4a6, #2f86a5, #3c528f, #422b72);
}

.depth-demo-note {
  margin: 13px 1px 0;
  color: #5a6668;
  font-size: 12px;
  line-height: 1.5;
}

.depth-demo-mode { font-weight: 600; color: #344440; }

@media (max-width: 680px) {
  .depth-demo-heading { grid-template-columns: 1fr; }
  .depth-demo-toolbar { flex-wrap: wrap; row-gap: 12px; padding-block: 11px; }
  .depth-demo-controls { justify-content: flex-end; gap: 8px; }
  .depth-demo-controls label span { padding: 7px 8px; font-size: 11px; }
  .depth-demo-view { aspect-ratio: 1.52; }
  .depth-demo-footer { gap: 10px; }
  .depth-demo-count { display: block; margin-inline-start: 0; }
}

@media (max-width: 385px) {
  .depth-demo-scene { flex: 0 0 100%; }
  .depth-demo-controls { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .depth-demo-controls label span { transition: none; }
}
