/* Device story | scroll-driven product scenes. Dark studio, real HTML screens. */

html.is-home {
  overflow-x: clip;
}

.device-story {
  position: relative;
  z-index: 1;
  background: #07080b;
}

.device-sticky {
  position: relative;
  height: 100svh;
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(280px, 34%) 1fr;
  align-items: center;
  padding: 6.2rem 5vw 3rem;
  overflow: hidden;
}

.device-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 48% 42% at 72% 48%, rgba(185, 196, 209, 0.14) 0%, transparent 68%),
    radial-gradient(ellipse 30% 24% at 18% 78%, rgba(243, 239, 230, 0.04) 0%, transparent 70%),
    linear-gradient(180deg, #07080b 0%, #0a0c10 48%, #07080b 100%);
}

.device-floor {
  position: absolute;
  left: 38%;
  right: 6%;
  bottom: 6%;
  height: 18%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55) 0%, transparent 72%);
  filter: blur(12px);
}

.device-copy {
  position: relative;
  z-index: 2;
  min-height: 22rem;
  max-width: 28rem;
  padding-right: 1.5rem;
}

.device-copy-block {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 28rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease-soft), transform 0.5s var(--ease-soft), visibility 0.5s;
  pointer-events: none;
}

.device-copy-block.is-on {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.home-lede {
  position: relative;
  z-index: 2;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100svh;
  min-height: 100dvh;
  padding: 7.4rem 5vw 3.4rem;
  max-width: none;
  overflow: hidden;
  background: #07080b;
}

.home-lede-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 52% 48% at 78% 42%, rgba(185, 196, 209, 0.14) 0%, transparent 68%),
    radial-gradient(ellipse 36% 28% at 12% 82%, rgba(243, 239, 230, 0.045) 0%, transparent 70%),
    linear-gradient(180deg, #07080b 0%, #0a0c10 48%, #07080b 100%);
}

.home-lede-main,
.home-lede-systems {
  position: relative;
  z-index: 1;
}

.home-lede-main {
  width: min(100%, 88rem);
  padding-top: 3.2vh;
}

.home-lede-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(3.15rem, 8.6vw, 7.4rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.035em;
  color: var(--ivory);
  max-width: 12ch;
  text-wrap: balance;
}

.home-lede-dek {
  margin: 1.7rem 0 0;
  max-width: 38rem;
  font-size: clamp(1.05rem, 1.45vw, 1.28rem);
  line-height: 1.55;
  font-weight: 300;
  color: rgba(243, 239, 230, 0.78);
}

.home-lede-systems {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.4rem 2.2rem;
  width: min(100%, 88rem);
  margin: 3.4rem 0 0;
  padding: 1.55rem 0 0;
  list-style: none;
  border-top: 1px solid rgba(243, 239, 230, 0.12);
}

.home-lede-systems,
.home-lede-systems li {
  margin-left: 0;
}

.home-lede-systems li {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.home-lede-num {
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(243, 239, 230, 0.42);
}

.home-lede-systems strong {
  font-family: var(--font-sans);
  font-size: clamp(1.02rem, 1.35vw, 1.28rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ivory);
}

.home-lede-systems li > span:last-child {
  font-size: 0.92rem;
  line-height: 1.45;
  font-weight: 300;
  color: rgba(243, 239, 230, 0.58);
}

.device-kicker {
  margin: 0 0 0.85rem;
  font-size: 0.625rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(243, 239, 230, 0.48);
}

.device-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(2.15rem, 4.5vw, 3.35rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--ivory);
  text-wrap: balance;
}

.device-dek {
  margin: 1.15rem 0 0;
  max-width: 44ch;
  font-size: 1.08rem;
  line-height: 1.55;
  font-weight: 300;
  color: rgba(243, 239, 230, 0.78);
}

.device-cta {
  margin: 1.8rem 0 0;
}

.device-viewport {
  position: relative;
  z-index: 1;
  height: min(72vh, 620px);
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1600px;
  perspective-origin: 50% 46%;
}

.device-rig {
  position: relative;
  width: min(760px, 52vw);
  aspect-ratio: 4 / 3;
  transform-style: preserve-3d;
  transform: rotateX(8deg) rotateY(-16deg) translate3d(0, 0, 0);
  will-change: transform;
}

.device-shadow {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -10%;
  height: 20%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.7) 0%, transparent 70%);
  filter: blur(22px);
  transform: rotateX(90deg) translateZ(-36px);
  pointer-events: none;
}

.device {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.device-side {
  position: absolute;
  inset: 0;
  border-radius: 36px;
  background: linear-gradient(90deg, #3a3d44 0%, #14161a 22%, #0c0d11 78%, #2c2f36 100%);
  transform: translateZ(-16px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.device-edge {
  position: absolute;
  top: 18%;
  width: 5px;
  height: 54%;
  border-radius: 2px;
  background: linear-gradient(#4a4e56, #1c1e24);
  transform: translateZ(-8px);
}

.device-edge-l { left: -3px; }
.device-edge-r { right: -3px; height: 22%; top: 28%; }

.device-btn {
  position: absolute;
  left: -4px;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #6a6e76, #2a2c32);
  transform: translateZ(-6px);
}

.device-btn-vol { top: 22%; height: 36px; }
.device-btn-mute { top: 18%; height: 14px; }
.device-btn-pwr {
  left: auto;
  right: -4px;
  top: 26%;
  height: 48px;
}

.device-front {
  position: absolute;
  inset: 0;
  border-radius: 36px;
  background:
    linear-gradient(165deg, #4a4e56 0%, #1c1e24 28%, #12141a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 40px 80px rgba(0, 0, 0, 0.5);
  transform: translateZ(0);
  overflow: hidden;
}

.device-bezel {
  position: absolute;
  inset: 12px;
  border-radius: 26px;
  background: #05060a;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.device-cam {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a3140, #0a0b0e 62%);
  box-shadow: inset 0 0 0 1.5px #07080b, 0 0 0 1px rgba(255, 255, 255, 0.1);
  z-index: 4;
}

.device-screen {
  position: absolute;
  inset: 22px 12px 12px;
  border-radius: 12px;
  background: #10131a;
  overflow: hidden;
  color: var(--ivory);
  isolation: isolate;
  container-type: size;
}

.ui-app,
.screen > .ui-body {
  zoom: var(--ui-fit, 1);
}

@supports not (zoom: 1) {
  .ui-app,
  .screen > .ui-body {
    transform: scale(var(--ui-fit, 1));
    transform-origin: top center;
  }
}

.device-glare {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.16) 0%, transparent 28%, transparent 64%, rgba(185, 196, 209, 0.06) 100%);
  mix-blend-mode: screen;
}

.ui-app {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 132px 1fr;
  overflow: hidden;
}

.ui-rail {
  padding: 0.55rem 0.5rem;
  border-right: 1px solid rgba(243, 239, 230, 0.08);
  background: rgba(8, 10, 14, 0.9);
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.ui-rail-item {
  padding: 0.38rem 0.42rem;
  border-radius: 6px;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  color: var(--ivory-dim);
}

.ui-rail-item.is-now {
  background: rgba(185, 196, 209, 0.1);
  color: var(--ivory);
}

.ui-rail-item b {
  display: block;
  font-weight: 500;
  font-size: 0.62rem;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #10131a;
  font-family: var(--font-sans);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
}

.screen.is-on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

.ui-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.28rem 0.7rem 0.1rem;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: rgba(243, 239, 230, 0.7);
  font-variant-numeric: tabular-nums;
}

.ui-status-sig {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.ui-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem 0.6rem;
  border-bottom: 1px solid rgba(243, 239, 230, 0.08);
  background: rgba(12, 14, 19, 0.94);
}

.ui-bar-id {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.ui-bar-id strong {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}

.ui-bar-id span {
  font-size: 0.62rem;
  color: var(--ivory-dim);
}

.ui-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9dba9a;
}

.ui-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7dce78;
  box-shadow: 0 0 8px #7dce78;
}

.ui-live.is-busy::before {
  animation: livePulse 1.1s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

.ui-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0.75rem 0.9rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.62rem;
}

.ui-msg {
  max-width: 92%;
  padding: 0.55rem 0.68rem;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.42;
  opacity: 0;
  transform: translateY(8px);
}

.ui-msg.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.4s var(--ease-soft), transform 0.4s var(--ease-soft);
}

.ui-msg-user {
  align-self: flex-end;
  background: rgba(243, 239, 230, 0.09);
  color: var(--ivory);
}

.ui-msg-agent {
  align-self: flex-start;
  background: rgba(185, 196, 209, 0.08);
  border: 1px solid rgba(185, 196, 209, 0.12);
}

.ui-msg small {
  display: block;
  margin-bottom: 0.22rem;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--metal);
}

.ui-caret {
  display: inline-block;
  width: 1.5px;
  height: 0.85em;
  margin-left: 2px;
  background: var(--ivory);
  vertical-align: -0.08em;
  animation: caretBlink 0.9s steps(1) infinite;
}

.ui-caret.is-off { display: none; }

@keyframes caretBlink {
  50% { opacity: 0; }
}

.ui-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.38rem;
  opacity: 0;
}

.ui-steps.is-in {
  opacity: 1;
  transition: opacity 0.45s var(--ease-soft);
}

.ui-step {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.42rem 0.5rem;
  border: 1px solid rgba(243, 239, 230, 0.08);
  border-radius: 8px;
  font-size: 0.64rem;
  line-height: 1.3;
  color: var(--ivory-dim);
  min-height: 2.6rem;
}

.ui-step img {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 1px;
  filter: grayscale(0.15) brightness(1.15);
}

.ui-step b {
  display: block;
  font-weight: 500;
  color: inherit;
}

.ui-step em {
  font-style: normal;
  color: rgba(243, 239, 230, 0.45);
}

.ui-step.is-on {
  border-color: rgba(185, 196, 209, 0.4);
  color: var(--ivory);
  background: rgba(185, 196, 209, 0.08);
}

.ui-step.is-on em { color: var(--metal); }

.ui-step.is-done {
  border-color: rgba(125, 206, 120, 0.3);
  color: #cfe8cc;
  background: rgba(125, 206, 120, 0.07);
}

.ui-step.is-done em { color: #9dba9a; }

.ui-resolved {
  margin-top: auto;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: rgba(125, 206, 120, 0.1);
  border: 1px solid rgba(125, 206, 120, 0.22);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: #d7efd4;
  opacity: 0;
}

.ui-resolved.is-in {
  opacity: 1;
  transition: opacity 0.45s var(--ease-soft);
}

.ui-home {
  height: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 4px;
}

.ui-home::before {
  content: "";
  width: 78px;
  height: 4px;
  border-radius: 99px;
  background: rgba(243, 239, 230, 0.22);
}

.mail-row,
.match-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.48rem 0.2rem;
  border-bottom: 1px solid rgba(243, 239, 230, 0.06);
  font-size: 0.7rem;
  opacity: 0;
  transform: translateY(6px);
}

.mail-row.is-in,
.match-row.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.35s var(--ease-soft), transform 0.35s var(--ease-soft);
}

.mail-row strong,
.match-row strong {
  display: block;
  font-weight: 500;
  color: var(--ivory);
}

.mail-row span,
.match-row span {
  color: var(--ivory-dim);
}

.mail-row.is-route {
  background: rgba(185, 196, 209, 0.07);
  margin: 0 -0.2rem;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
  border-radius: 6px;
}

.mail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--metal);
}

.mail-row.is-route .mail-dot { background: #7dce78; }

.mail-label {
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--metal);
  white-space: nowrap;
}

.mail-draft {
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(185, 196, 209, 0.16);
  border-radius: 8px;
  background: rgba(185, 196, 209, 0.06);
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--ivory-dim);
  opacity: 0;
}

.mail-draft.is-in {
  opacity: 1;
  transition: opacity 0.4s var(--ease-soft);
}

.mail-draft strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--metal);
  font-weight: 500;
}

.mem-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.mem-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.42rem;
  border-radius: 99px;
  border: 1px solid rgba(185, 196, 209, 0.16);
  background: rgba(185, 196, 209, 0.06);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--metal);
  opacity: 0;
  transform: translateY(5px);
}

.mem-chip.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.35s var(--ease-soft), transform 0.35s var(--ease-soft),
    border-color 0.35s var(--ease-soft), color 0.35s var(--ease-soft);
  border-color: rgba(185, 196, 209, 0.38);
  color: var(--ivory);
}

.mem-graph {
  position: relative;
  height: 5rem;
  margin: 0.08rem 0 0.12rem;
  opacity: 0;
}

.mem-graph.is-in {
  opacity: 1;
  transition: opacity 0.45s var(--ease-soft);
}

.mem-graph svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.mem-graph [data-mem-edge] {
  fill: none;
  stroke: rgba(185, 196, 209, 0.18);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
}

.mem-graph [data-mem-edge].is-in {
  stroke: rgba(185, 196, 209, 0.7);
  stroke-dashoffset: 0;
  transition: stroke 0.5s var(--ease-soft), stroke-dashoffset 0.7s var(--ease-soft);
}

.mem-graph [data-mem-node] circle {
  fill: #0c0e14;
  stroke: rgba(243, 239, 230, 0.22);
  stroke-width: 1.1;
  opacity: 0.35;
}

.mem-graph [data-mem-node].is-in circle {
  opacity: 1;
  stroke: rgba(185, 196, 209, 0.85);
  fill: rgba(185, 196, 209, 0.12);
  transition: opacity 0.4s var(--ease-soft), stroke 0.4s var(--ease-soft), fill 0.4s var(--ease-soft);
}

.mem-graph .mem-node-hub.is-in circle {
  fill: rgba(243, 239, 230, 0.14);
  stroke: rgba(243, 239, 230, 0.72);
  filter: drop-shadow(0 0 6px rgba(243, 239, 230, 0.28));
}

.mem-graph [data-mem-node] text {
  fill: rgba(243, 239, 230, 0.28);
  font-size: 6.5px;
  letter-spacing: 0.08em;
  text-anchor: middle;
  text-transform: uppercase;
  font-family: Outfit, system-ui, sans-serif;
}

.mem-graph [data-mem-node].is-in text {
  fill: rgba(243, 239, 230, 0.62);
  transition: fill 0.4s var(--ease-soft);
}

.mem-cites {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
  margin-top: 0.35rem;
}

.mem-cites em {
  font-style: normal;
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.12rem 0.34rem;
  border-radius: 99px;
  border: 1px solid rgba(125, 206, 120, 0.28);
  color: #9dba9a;
  opacity: 0;
}

.mem-cites em.is-in {
  opacity: 1;
  transition: opacity 0.35s var(--ease-soft);
}

.match-row.is-ok,
.match-row.is-flag {
  margin: 0 -0.2rem;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
  border-radius: 6px;
}

.match-row.is-ok {
  background: rgba(125, 206, 120, 0.08);
}

.match-row.is-flag {
  background: rgba(214, 168, 88, 0.1);
}

.match-row.is-ok .mail-dot { background: #7dce78; }
.match-row.is-flag .mail-dot { background: #d6a858; }

.match-tag {
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--metal);
  white-space: nowrap;
}

.match-row.is-ok .match-tag { color: #9dba9a; }
.match-row.is-flag .match-tag { color: #e2c48a; }


.scene-dots {
  position: absolute;
  left: 5vw;
  bottom: 1.5rem;
  z-index: 3;
  display: flex;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.scene-dots button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0.35rem 0.7rem 0.35rem 0;
  font-family: inherit;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243, 239, 230, 0.32);
  cursor: inherit;
}

.scene-dots button.is-on {
  color: var(--ivory);
}

html.is-home .hero-cinema,
html.is-home .studio-canvas,
html.is-home .studio-fallback { display: none !important; }

html.is-home .studio-preloader { z-index: 800; }

html:not(.is-intro-done) .home-lede,
html:not(.is-intro-done) .device-copy,
html:not(.is-intro-done) .device-viewport {
  opacity: 0;
}

html.is-intro-done .home-lede {
  animation: stageFade 1.05s var(--ease-cinema) both;
}

html.is-intro-done .device-copy {
  animation: stageFade 1.15s var(--ease-cinema) 0.06s both;
}

html.is-intro-done .device-viewport {
  animation: stageFade 1.25s var(--ease-cinema) 0.16s both;
}

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

@media (min-width: 1280px) {
  .device-sticky {
    grid-template-columns: minmax(320px, 38%) 1fr;
    padding: 6.2rem 4.5vw 2.5rem;
  }
  .device-copy,
  .device-copy-block.is-on,
  .device-copy-block {
    max-width: 36rem;
  }
}

@media (min-width: 1680px) {
  .device-viewport {
    height: min(78vh, 720px);
  }
  .device-rig {
    width: min(860px, 50vw);
  }
}

@media (max-width: 1100px) {
  .home-lede-systems {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-height: 780px) and (min-width: 961px) {
  .home-lede {
    padding: 6.4rem 4.5vw 2.2rem;
  }
  .home-lede-main { padding-top: 1.2vh; }
  .home-lede-title { font-size: clamp(2.7rem, 6.8vw, 5.4rem); }
  .home-lede-dek { margin-top: 1.1rem; font-size: 1.02rem; }
  .home-lede-systems { margin-top: 1.8rem; padding-top: 1.15rem; gap: 1rem 1.6rem; }
  .home-lede-systems li > span:last-child { font-size: 0.84rem; }
  .device-viewport { height: min(68vh, 500px); }
  .device-rig { width: min(640px, 48vw); }
}

@media (max-width: 960px) {
  .home-lede {
    min-height: 100svh;
    min-height: 100dvh;
    padding: calc(5.6rem + env(safe-area-inset-top, 0px)) 1.15rem calc(1.4rem + env(safe-area-inset-bottom, 0px));
    justify-content: flex-end;
    gap: 2.2rem;
  }
  .home-lede-title { font-size: clamp(2.55rem, 13vw, 3.6rem); max-width: 11ch; }
  .home-lede-dek { font-size: 1rem; margin-top: 1.05rem; max-width: none; }
  .home-lede-systems {
    grid-template-columns: 1fr 1fr;
    margin-top: 0;
    gap: 1rem 1.2rem;
  }
  .home-lede-systems strong { font-size: 0.95rem; }
  .home-lede-systems li > span:last-child { font-size: 0.78rem; }
  .device-sticky {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100svh;
    padding: calc(5.6rem + env(safe-area-inset-top, 0px)) 1rem calc(0.4rem + env(safe-area-inset-bottom, 0px));
    align-content: stretch;
    align-items: stretch;
    gap: 0.3rem;
    overflow: hidden;
  }
  .device-floor,
  .device-shadow,
  .device-glare,
  .device-side,
  .device-edge,
  .device-btn {
    display: none;
  }
  .device-atmosphere {
    background: #07080b;
  }
  .device-copy-block {
    transform: none;
    transition: opacity 0.28s var(--ease-soft), visibility 0.28s;
  }
  .device-copy {
    grid-row: 1;
    max-width: none;
    min-height: 0;
    padding: 0;
  }
  .device-copy-block,
  .device-copy-block.is-on { max-width: none; }
  .device-kicker { margin-bottom: 0.4rem; }
  .device-title { font-size: clamp(1.55rem, 7.2vw, 2.05rem); line-height: 1.1; }
  .device-dek {
    font-size: 0.88rem;
    line-height: 1.45;
    margin-top: 0.4rem;
    max-width: none;
    color: rgba(243, 239, 230, 0.82);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .device-cta { margin-top: 0.4rem; }
  .device-viewport {
    grid-row: 2;
    height: auto;
    min-height: 0;
    max-height: none;
    perspective: 920px;
    perspective-origin: 50% 42%;
    container-type: size;
  }
  .device,
  .device-rig {
    transform-style: preserve-3d;
  }
  .device-rig {
    width: min(92vw, 100%);
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 3 / 4;
    width: min(100cqw, calc(100cqh * 3 / 4));
    will-change: transform;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .device-front {
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.32);
  }
  .ui-app { grid-template-columns: 1fr; }
  .ui-rail { display: none; }
  .scene-dots {
    grid-row: 3;
    position: relative;
    left: auto;
    bottom: auto;
    padding: 0.1rem 0 0;
    flex-wrap: nowrap;
    gap: 0.15rem;
  }
  .scene-dots button {
    padding-right: 0.45rem;
    font-size: 0.52rem;
    letter-spacing: 0.12em;
    white-space: nowrap;
  }
  .scene-dots .dot-name { display: none; }
  .ui-msg { font-size: 0.64rem; }
  .ui-step { font-size: 0.52rem; min-height: 0; padding: 0.28rem 0.38rem; }
  .ui-bar { padding: 0.4rem 0.65rem; }
  .ui-body { padding: 0.5rem 0.65rem 0.4rem; gap: 0.4rem; }
  .mem-graph { height: 3.8rem; }
}

@media (max-width: 960px) and (max-height: 700px) {
  .device-sticky { gap: 0.2rem; }
  .device-title { font-size: clamp(1.2rem, 5.6vw, 1.55rem); }
  .device-dek { font-size: 0.76rem; margin-top: 0.28rem; }
  .device-cta { margin-top: 0.28rem; }
  .device-kicker { margin-bottom: 0.28rem; }
  .ui-status { display: none; }
  .ui-home { height: 6px; padding-bottom: 2px; }
  .device-screen { inset: 14px 8px 8px; }
  .ui-bar { padding: 0.32rem 0.55rem; }
  .ui-body { padding: 0.38rem 0.5rem 0.28rem; gap: 0.28rem; }
  .ui-msg { font-size: 0.58rem; padding: 0.32rem 0.42rem; }
  .ui-steps { gap: 0.22rem; }
  .ui-step { padding: 0.2rem 0.3rem; font-size: 0.48rem; }
  .ui-resolved { padding: 0.28rem 0.4rem; font-size: 0.56rem; }
  .mail-row, .match-row { padding: 0.32rem 0.12rem; }
  .mem-graph { height: 3.4rem; }
  .mem-chip { font-size: 0.46rem; padding: 0.12rem 0.32rem; }
  .mail-draft { padding: 0.38rem 0.48rem; font-size: 0.6rem; }
}

@media (max-width: 960px) and (orientation: landscape) {
  .device-sticky {
    grid-template-columns: minmax(10.25rem, 30%) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    padding: calc(3.35rem + env(safe-area-inset-top, 0px)) 0.7rem calc(0.2rem + env(safe-area-inset-bottom, 0px));
    gap: 0.15rem 0.7rem;
  }
  .device-copy { grid-column: 1; grid-row: 1; }
  .device-viewport { grid-column: 2; grid-row: 1 / span 2; }
  .scene-dots { grid-column: 1; grid-row: 2; }
  .device-kicker { margin-bottom: 0.18rem; }
  .device-cta { margin-top: 0.18rem; }
  .device-rig {
    aspect-ratio: 4 / 3;
    width: min(100cqw, calc(100cqh * 4 / 3));
  }
  .device-front { border-radius: 22px; }
  .device-bezel { inset: 8px; border-radius: 16px; }
  .device-cam { top: 5px; width: 6px; height: 6px; }
  .device-title { font-size: clamp(1.02rem, 4.2vh, 1.4rem); }
  .device-dek { -webkit-line-clamp: 2; font-size: 0.68rem; margin-top: 0.2rem; }
  .ui-status { display: none; }
  .ui-home { display: none; }
  .ui-bar-id span { display: none; }
  .device-screen { inset: 8px 6px 6px; border-radius: 8px; }
  .ui-bar { padding: 0.16rem 0.42rem; }
  .ui-bar-id strong { font-size: 0.62rem; }
  .ui-body { padding: 0.28rem 0.42rem 0.22rem; gap: 0.22rem; }
  .mail-row, .match-row { padding: 0.12rem 0.06rem; font-size: 0.58rem; }
  .mem-graph { height: 2.6rem; }
  .mem-chip { font-size: 0.42rem; }
  .mail-draft { padding: 0.2rem 0.32rem; font-size: 0.52rem; margin-top: 0.12rem; }
  .ui-msg { font-size: 0.54rem; padding: 0.28rem 0.38rem; max-width: 96%; }
  .ui-step { font-size: 0.48rem; padding: 0.16rem 0.28rem; gap: 0.28rem; }
  .ui-step img { width: 12px; height: 12px; }
  .ui-steps { gap: 0.2rem; }
  .ui-resolved { padding: 0.28rem 0.4rem; font-size: 0.56rem; }
  .mem-cites { margin-top: 0.2rem; }
  .match-tag { font-size: 0.48rem; letter-spacing: 0.08em; }
}

@media (max-width: 960px) and (orientation: landscape) and (max-height: 430px) {
  .device-dek { -webkit-line-clamp: 1; }
  .device-title { font-size: clamp(0.98rem, 4vh, 1.28rem); }
}

@media (prefers-reduced-motion: reduce) {
  .device-story { height: auto; }
  .device-sticky {
    position: relative;
    height: auto;
    min-height: 100svh;
    display: block;
    padding-bottom: 3rem;
  }
  .device-copy { min-height: 0; }
  .device-copy-block,
  .device-copy-block.is-on {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin-bottom: 1.6rem;
    pointer-events: auto;
  }
  .device-rig { transform: rotateX(8deg) rotateY(-16deg); transition: none; }
  .ui-msg,
  .ui-steps,
  .ui-resolved,
  .mail-row,
  .match-row,
  .mail-draft,
  .mem-chip,
  .mem-graph,
  .mem-cites em {
    opacity: 1;
    transform: none;
  }
  .mem-graph [data-mem-edge] {
    stroke-dashoffset: 0;
    stroke: rgba(185, 196, 209, 0.55);
  }
  .mem-graph [data-mem-node] circle,
  .mem-graph [data-mem-node] text { opacity: 1; }
  .ui-caret { display: none; }
  html:not(.is-intro-done) .home-lede,
  html:not(.is-intro-done) .device-copy,
  html:not(.is-intro-done) .device-viewport,
  html.is-intro-done .home-lede,
  html.is-intro-done .device-copy,
  html.is-intro-done .device-viewport {
    opacity: 1;
    animation: none;
  }
}

.memory-net {
  position: absolute;
  inset: -6% -2% -4% -8%;
  z-index: 4;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.55s var(--ease-soft), visibility 0.55s;
}

.memory-net::before {
  content: "";
  position: absolute;
  inset: 12% 8%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 48% 46%, rgba(185, 196, 209, 0.16) 0%, transparent 68%);
}

html[data-chapter="memory"] .memory-net[data-memory-net="home"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

html[data-chapter="memory"] .device-rig {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s var(--ease-soft), visibility 0.45s;
}

.memory-net canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.memory-net-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.memory-net-label {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  padding: 0.18rem 0.45rem;
  border: 1px solid rgba(185, 196, 209, 0.22);
  border-radius: 99px;
  background: rgba(7, 8, 11, 0.55);
  color: var(--ivory);
  font-family: var(--font-sans);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  will-change: transform, opacity;
}

.memory-net-hud {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 6%;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-width: 28rem;
  pointer-events: none;
}

.memory-net-q,
.memory-net-a {
  margin: 0;
  opacity: 0;
  transition: opacity 0.45s var(--ease-soft);
}

.memory-net-q {
  font-family: var(--font-sans);
  font-size: clamp(0.92rem, 1.4vw, 1.12rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ivory);
}

.memory-net-a {
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.5;
  color: rgba(243, 239, 230, 0.78);
}

.memory-net-cites {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin: 0;
  opacity: 0;
  transition: opacity 0.45s var(--ease-soft);
}

.memory-net-cites em {
  display: inline-flex;
  padding: 0.16rem 0.42rem;
  border: 1px solid rgba(185, 196, 209, 0.32);
  border-radius: 99px;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--metal);
}

@media (max-width: 960px) {
  .memory-net {
    inset: 0;
  }
  .memory-net-hud {
    left: 0.4rem;
    right: 0.4rem;
    bottom: 0.35rem;
    max-width: none;
  }
  .memory-net-q { font-size: 0.82rem; }
  .memory-net-a { font-size: 0.78rem; }
  .memory-net-label { font-size: 0.5rem; padding: 0.12rem 0.32rem; }
}
