/* Device study. The laptop packshot frames an independent, interactive screen. */
[data-kind="devices"] .v2-stage {
  min-height: 0;
  padding: 0;
}

[data-kind="devices"] .v2-hero {
  padding-block: clamp(20px, 4vh, 40px) clamp(16px, 3vh, 28px);
}

[data-kind="devices"] .v2-toolbar {
  gap: 8px 16px;
  padding: 10px 16px;
  background: var(--surface);
}

[data-kind="devices"] .v2-preview-region > .v2-bottom {
  justify-content: space-between;
  gap: 4px 10px;
}

[data-kind="devices"] .v2-bottom .v2-text-button {
  min-height: 44px;
}

.dv-compare-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.dv-compare-shortcut svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.dv-switch {
  max-width: 100%;
}

.dv-switch button {
  min-height: 44px;
}

.dv-studio {
  --dv-tint: var(--accent, #35d6c8);
  --dv-second: var(--violet, #8b7bff);
  --dv-paper: #151620;
  --dv-ink: #f6f5fc;
  --dv-rule: #ffffff26;
  container-type: inline-size;
  position: relative;
  overflow: hidden;
  min-width: 0;
  isolation: isolate;
  padding: clamp(16px, 3vw, 38px);
  color: var(--brand-text, var(--dv-ink));
  background-color: var(--brand-surface, var(--dv-paper));
  background-image:
    radial-gradient(ellipse at 26% 72%, color-mix(in srgb, var(--dv-tint), transparent 83%), transparent 47%),
    radial-gradient(ellipse at 78% 44%, color-mix(in srgb, var(--dv-second), transparent 82%), transparent 52%);
}

[data-theme="light"] .dv-studio {
  --dv-paper: #efedf5;
  --dv-ink: #211c31;
  --dv-rule: #231a3b28;
}

.dv-stage-head {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 14px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--dv-rule);
  font-size: clamp(10px, 1.2cqi, 13px);
}

.dv-stage-head p {
  margin: 0;
}

.dv-index {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.dv-index span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dv-tint);
  box-shadow: 0 0 12px color-mix(in srgb, var(--dv-tint), transparent 45%);
}

.dv-mode-label {
  color: inherit;
  opacity: .76;
}

.dv-composition {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: end center;
  min-height: clamp(190px, 48cqi, 527px);
  padding: clamp(22px, 5cqi, 52px) 0 clamp(0px, 1cqi, 10px);
}

.dv-ground {
  position: absolute;
  inset: 21% 3% 8%;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 46% 79%, #01000665, transparent 58%),
    repeating-radial-gradient(ellipse at 50% 82%, transparent 0 26px, var(--dv-rule) 27px 28px, transparent 29px 39px);
  mask-image: radial-gradient(ellipse, #000 17%, transparent 72%);
  opacity: .75;
  pointer-events: none;
}

.dv-laptop,
.dv-phone {
  position: relative;
  grid-area: 1 / 1;
  min-width: 0;
  margin: 0;
}

.dv-laptop {
  width: min(75%, 704px);
  margin-inline-end: 12%;
}

.dv-phone {
  z-index: 1;
  width: min(21.5%, 192px);
  justify-self: end;
  margin-inline-end: 7%;
}

[data-mode="laptop"] .dv-laptop {
  width: min(93%, 780px);
  margin-inline-end: 0;
}

[data-mode="phone"] .dv-phone {
  width: min(53%, 210px);
  margin-inline-end: 0;
  justify-self: center;
}

.dv-laptop-body {
  position: relative;
}

.dv-laptop-shell {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 15px #03040859);
  pointer-events: none;
}

.dv-phone-camera {
  position: absolute;
  top: 1.2%;
  left: 50%;
  width: clamp(2px, .7cqi, 8px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #06080c;
  box-shadow: inset 0 0 0 1px #3f4658, 0 0 0 1px #010206;
  translate: -50% 0;
}

.dv-phone-shell {
  position: relative;
  aspect-ratio: .492;
  border: 1px solid #aaa8be;
  border-radius: 15% / 7.4%;
  background: linear-gradient(150deg, #494851, #0c0c15 23% 78%, #5b5968);
  box-shadow: inset 0 0 0 1px #080910, inset -2px 0 2px #ffffff25, 0 14px 25px #01000686;
}

.dv-phone-shell::before,
.dv-phone-shell::after {
  position: absolute;
  right: -2px;
  width: 2px;
  height: 12%;
  border-radius: 2px;
  background: #7c798f;
  content: "";
}

.dv-phone-shell::before {
  top: 23%;
}

.dv-phone-shell::after {
  top: 37%;
  height: 7%;
}

.dv-phone-camera {
  top: 1.2%;
  width: max(3px, 3.3%);
}

.dv-phone-gesture {
  position: absolute;
  bottom: 1.5%;
  left: 36%;
  width: 28%;
  height: max(1px, .75%);
  border-radius: 100px;
  background: #aaaabd;
  opacity: .8;
}

.dv-screen {
  container-type: inline-size;
  position: absolute;
  overflow: hidden;
  background: #090a0d;
  scrollbar-width: none;
}

.dv-laptop .dv-screen {
  /* Screen bounds on the 1536 × 1024 packshot, with a small bleed under the bezel. */
  inset: 7.85% 10.05% 18.65%;
  border-radius: .45% / .74%;
}

.dv-phone .dv-screen {
  inset: 3.4% 3.8% 3.4%;
  border-radius: 11% / 5.5%;
}

.dv-screen:focus-visible {
  outline: 2px solid var(--dv-tint);
  outline-offset: -2px;
}

.dv-screen[data-fit="scroll"] {
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
}

.dv-screen .dv-image,
.dv-screen .dv-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dv-screen[data-fit="cover"] .dv-image,
.dv-screen[data-fit="cover"] .dv-video {
  object-fit: cover;
  object-position: 50% var(--dv-image-position, 50%);
}

.dv-screen[data-fit="scroll"] .dv-image {
  height: auto;
}

.dv-sample {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 3.5%;
  background: #e9e8e1;
  color: #20211f;
  font: 550 clamp(5px, 2cqi, 14px)/1.25 var(--brand-font-body, Instrument, sans-serif);
}

.dv-sample-top,
.dv-sample-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: .68em;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dv-sample-top {
  border-bottom: 1px solid #20211f35;
  padding-bottom: 2%;
}

.dv-sample-top b {
  font: 650 2.15em/.95 var(--brand-font-display, Fraunces, serif);
  letter-spacing: -.045em;
  text-transform: none;
  overflow-wrap: anywhere;
}

.dv-sample-foot {
  border-top: 1px solid #20211f35;
  padding-top: 2%;
}

.dv-sample-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  min-width: 0;
  min-height: 0;
  gap: 3%;
  padding: 4% 0;
}

.dv-sample-copy {
  min-width: 0;
}

.dv-sample-copy p {
  margin: 0 0 .9em;
  font-size: .73em;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.dv-sample-copy h2 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 .35em;
  color: #20211f;
  font: 540 clamp(10px, 7.7cqi, 58px)/.91 var(--brand-font-display, Fraunces, serif);
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.dv-sample-copy > span {
  display: inline-block;
  padding: .4em .6em;
  border: 1px solid #20211f;
  border-radius: 100px;
  font-size: .68em;
}

.dv-sample-copy > span > span {
  margin-inline-start: .2em;
}

.dv-sample-art {
  align-self: stretch;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 23% 15%, #e1eeeb63, transparent 32%),
    linear-gradient(135deg, #181a25, #111a26 62%, #1f203a);
  border-radius: clamp(2px, .8cqi, 7px);
}

.dv-sample-art::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: radial-gradient(#f8faff20 1px, transparent 1px);
  background-size: clamp(2px, .8cqi, 5px) clamp(2px, .8cqi, 5px);
  content: "";
}

.dv-sample-art i {
  position: absolute;
  inset: 10% 12%;
  border-radius: 48%;
  border: clamp(3px, 2.1cqi, 16px) solid transparent;
  background:
    linear-gradient(#111a26, #20223f) padding-box,
    linear-gradient(150deg, #f9ffff, var(--dv-tint) 29%, #153845 53%, var(--dv-second) 79%, #f9ffff) border-box;
  box-shadow: 3px 4px 8px #01070b77, inset 0 0 7px #051a17;
  transform: rotate(-33deg) scaleY(.73);
}

.dv-sample-art i:nth-child(2) {
  transform: rotate(27deg) scaleY(.7);
  background:
    linear-gradient(145deg, #212540, #121c2b) padding-box,
    linear-gradient(170deg, var(--dv-second), #e1d4ff 29%, #2b275c 58%, var(--dv-tint) 93%) border-box;
  opacity: .9;
}

.dv-sample-art i:nth-child(3) {
  inset: 36% 39%;
  border-width: 0;
  background: radial-gradient(circle at 27% 19%, #fff, var(--dv-tint) 26%, #15535b 64%, #1b1831);
  transform: rotate(-14deg);
  animation: dv-orbit-breathe 7s ease-in-out infinite alternate;
}

@keyframes dv-orbit-breathe {
  from { transform: translateY(0) rotate(-14deg); }
  to { transform: translateY(-13%) rotate(-22deg); }
}

.dv-phone .dv-sample {
  padding: 6%;
  font-size: clamp(4px, 4.9cqi, 12px);
}

.dv-phone .dv-sample-top,
.dv-phone .dv-sample-foot {
  padding-block: 5%;
}

.dv-phone .dv-sample-grid {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  gap: 6%;
  padding-block: 8%;
}

.dv-phone .dv-sample-copy h2 {
  font-size: clamp(8px, 15.1cqi, 32px);
}

.dv-phone .dv-sample-copy p {
  margin-bottom: .6em;
}

.dv-phone .dv-sample-art i {
  inset: 15% 13%;
  border-width: clamp(3px, 6cqi, 13px);
}

.dv-phone .dv-sample-art i:nth-child(3) {
  inset: 37% 35%;
  border-width: 0;
}

.dv-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 24px;
  margin-top: 6px;
  font-size: clamp(9px, 1.2cqi, 12px);
  line-height: 1;
  font-weight: 650;
}

.dv-caption i {
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--dv-tint);
}

.dv-phone .dv-caption i {
  background: var(--dv-second);
}

.dv-settings {
  display: grid;
  gap: 9px;
  min-width: 0;
  margin-top: 16px;
}

.dv-settings h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
}

.dv-settings-help {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.dv-setting {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.dv-setting > summary {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr) auto 8px;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}

.dv-setting > summary::-webkit-details-marker {
  display: none;
}

.dv-setting > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 12px;
}

.dv-setting > summary svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.dv-setting > summary::after {
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  content: "";
}

.dv-setting[open] > summary::after {
  margin-top: 3px;
  transform: rotate(225deg);
}

.dv-media-badge {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--page);
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.dv-setting-body {
  display: grid;
  gap: 12px;
  padding: 3px 12px 10px;
}

.dv-setting-body > label:not(.v2-upload) {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.dv-setting-body .v2-button,
.dv-setting-body .v2-text-button {
  justify-self: start;
}

.dv-setting-body select {
  width: 100%;
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--page);
}

.dv-setting-body input[type="range"] {
  width: 100%;
  min-height: 44px;
  margin: 0;
  accent-color: var(--accent);
}

.dv-setting-body output {
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.dv-media-uploads,
.dv-video-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dv-media-uploads .v2-button,
.dv-video-buttons .v2-button {
  padding-inline: 11px;
}

.dv-video-controls {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.dv-video-buttons [aria-pressed="true"] {
  color: var(--text);
  background: var(--surface2);
  border-radius: 10px;
}

.dv-video-seek {
  display: grid;
  color: var(--muted);
  font-size: 12px;
}

.dv-video-seek > span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.dv-media-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.dv-media-status:empty {
  position: absolute;
}

@container (max-width: 430px) {
  .dv-laptop {
    width: 82%;
    margin-inline-end: 15%;
  }

  .dv-phone {
    width: 24%;
    margin-inline-end: 1%;
  }

  .dv-ground {
    inset-inline: 0;
  }
}

[data-kind="devices"] .v2-workspace[data-editor-collapsed="false"] .v2-stage {
  padding: 0;
}

/* Keep both physical frames within the artboard as the inspector scrolls. */
[data-kind="devices"] [data-editor-collapsed="false"]:not([data-editor-constrained="true"]) {
  --dv-device-height: clamp(108px, calc(var(--editor-available-height) - 158px), 470px);
  overflow-anchor: none;
}

[data-kind="devices"] [data-editor-collapsed="false"]:not([data-editor-constrained="true"]) .dv-studio {
  padding: 14px clamp(12px, 2.2vw, 26px) 10px;
}

[data-kind="devices"] [data-editor-collapsed="false"]:not([data-editor-constrained="true"]) .dv-composition {
  min-height: 0;
  padding-block: 12px 2px;
}

[data-kind="devices"] [data-editor-collapsed="false"]:not([data-editor-constrained="true"]) .dv-laptop {
  max-width: calc(var(--dv-device-height) * 1.5);
}

[data-kind="devices"] [data-editor-collapsed="false"]:not([data-editor-constrained="true"]) .dv-phone {
  max-width: calc(var(--dv-device-height) * .492);
}

@media (max-width: 760px) {
  [data-kind="devices"] .v2-toolbar {
    padding-inline: 10px;
  }

  .dv-switch button {
    padding-inline: 8px;
  }
}

@media (max-width: 380px) {
  [data-kind="devices"] .v2-preview-region > .v2-bottom {
    padding-inline: 10px;
  }

  [data-kind="devices"] .v2-bottom .v2-text-button {
    padding-inline: 2px;
    font-size: 12px;
  }
}

@media (max-width: 959px) and (min-height: 450px) {
  [data-kind="devices"] .v2-workspace[data-editor-collapsed="false"]:not([data-editor-constrained="true"]) {
    --dv-preview-height: max(222px, calc(var(--editor-available-height) * .38));
    --dv-device-height: calc(var(--dv-preview-height) - 117px);
  }

  [data-kind="devices"] .v2-workspace[data-editor-collapsed="false"]:not([data-editor-constrained="true"]) [data-editor-layout] {
    height: var(--editor-available-height);
    grid-template-rows: var(--dv-preview-height) minmax(0, 1fr);
    align-items: stretch;
  }

  [data-kind="devices"] .v2-workspace[data-editor-collapsed="false"]:not([data-editor-constrained="true"]) :is([data-editor-preview], [data-editor-panel]) {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  [data-kind="devices"] .v2-workspace[data-editor-collapsed="false"]:not([data-editor-constrained="true"]) [data-editor-panel] {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  [data-kind="devices"] [data-editor-collapsed="false"]:not([data-editor-constrained="true"]) .dv-studio {
    padding: 8px 10px 4px;
  }

  [data-kind="devices"] [data-editor-collapsed="false"]:not([data-editor-constrained="true"]) .dv-stage-head {
    padding-bottom: 5px;
  }

  [data-kind="devices"] [data-editor-collapsed="false"]:not([data-editor-constrained="true"]) .dv-composition {
    padding-block: 7px 0;
  }
}

@media (max-width: 959px) and (450px <= height < 600px) {
  [data-kind="devices"] .v2-workspace[data-editor-collapsed="false"]:not([data-editor-constrained="true"]) {
    --dv-preview-height: max(150px, calc(var(--editor-available-height) * .38));
    --dv-device-height: calc(var(--dv-preview-height) - 70px);
  }

  [data-kind="devices"] [data-editor-collapsed="false"]:not([data-editor-constrained="true"]) :is(.dv-stage-head, .dv-caption) {
    display: none;
  }

  [data-kind="devices"] [data-editor-collapsed="false"]:not([data-editor-constrained="true"]) .v2-editor-panel-head {
    min-height: 50px;
    padding-block: 3px;
  }

  [data-kind="devices"] [data-editor-collapsed="false"] .dv-settings {
    margin-top: 10px;
  }

  [data-kind="devices"] [data-editor-collapsed="false"] .dv-settings-help {
    order: 1;
  }
}

html[data-view="thumbnail"] .dv-compare-shortcut {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .dv-sample-art i:nth-child(3) {
    animation: none;
  }
}

.dv-journey {
  display: grid;
  gap: 10px;
  padding: 0 0 6px;
}

.dj-intro, .dj-status, .dj-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.dj-demo, .dj-play {
  justify-self: start;
  padding-inline: 12px;
  font-size: 13px;
}

.dj-demo svg, .dj-play svg {
  width: 17px;
  height: 17px;
}

.dj-status:empty {
  position: absolute;
}

.dj-tools {
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.dj-transport, .dj-clocks, .dj-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.dj-clock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0 8px;
  font-size: 12px;
}

.dj-clock output, .dj-marker-times {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.dj-clock input {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 44px;
  margin: 0;
  accent-color: var(--accent);
}

.dj-form {
  margin-top: 12px;
}

.dj-name {
  display: grid;
  gap: 4px;
  font-size: 12px;
}

.dj-name input {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--page);
  font-size: 16px;
}

.dj-form button {
  justify-self: start;
  font-size: 13px;
}

.dj-hint {
  margin-top: 10px;
}

.dj-list {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.dj-list:empty {
  display: none;
}

.dj-marker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, 44px);
  align-items: center;
  gap: 4px;
}

.dj-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1px 8px;
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--page);
  text-align: left;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.dj-jump:hover, .dj-jump[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--surface2);
}

.dj-marker-times {
  white-space: nowrap;
  font-size: 11px;
}

.dj-icon-button {
  padding: 8px;
}

.dj-icon-button svg {
  width: 17px;
  height: 17px;
}
