/* Isolated Figma 3511:403 case study; no homepage or standalone-case overrides. */
html.has-lianshan-modal,
html.has-lianshan-modal body {
  overflow: hidden;
}

html.has-lianshan-modal body {
  padding-right: var(--ls-modal-scrollbar-gap, 0px);
}

.ls-project {
  --ls-background: #131315;
  --ls-bar-height: clamp(56px, 4.6875cqw, 60px);
  --ls-media-radius: 20px;
  position: fixed;
  inset: 0;
  width: min(1280px, calc(100% - 64px));
  height: calc(100vh - 64px);
  height: calc(100dvh - 64px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: var(--ls-background);
  color: #fff;
  color-scheme: dark;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 200;
  text-align: left;
  box-shadow: 0 32px 120px #0009;
  container-type: inline-size;
}

.ls-project[open] {
  display: flex;
  flex-direction: column;
  animation: ls-project-enter 180ms ease-out;
}

.ls-project::backdrop {
  background: rgb(0 0 0 / 76%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ls-project :is(h2, h3, p, figure, dl, dd, ul) {
  margin: 0;
  padding: 0;
}

.ls-project :is(h2, h3) {
  color: #fff;
  font-weight: 200;
  letter-spacing: 0;
}

.ls-project :is(button, a):focus-visible {
  outline: 2px solid #b8c3d8;
  outline-offset: 3px;
}

.ls-project.is-pointer-open .ls-project__close:focus {
  outline: none;
}

.ls-project__topbar {
  position: relative;
  z-index: 3;
  display: flex;
  flex: 0 0 var(--ls-bar-height);
  align-items: center;
  justify-content: space-between;
  padding: 0 3.90625cqw;
  border-bottom: 1px solid #1d1e1e;
  background: var(--ls-background);
}

.ls-project__close {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  margin-right: -12px;
  padding: 12px;
  border: 0;
  border-radius: 4px;
  background: var(--ls-background);
  color: #898e98;
  font: 400 .9375cqw/1.4167 "PingFang SC", sans-serif;
  letter-spacing: .24em;
  cursor: pointer;
}

.ls-project__close:hover {
  color: #fff;
}

.ls-project__scroll {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.ls-project__scroll::-webkit-scrollbar {
  display: none;
}

/* Coordinates scale together from the updated 1280 × 6160 artboard. */
.ls-project__content {
  --ls-unit: calc(100cqw / 1280);
  position: relative;
  width: 100%;
  height: calc(6160 * var(--ls-unit));
  /* The fixed bar occupies the artboard's empty top band, not extra height. */
  margin-top: calc(-1 * var(--ls-bar-height));
  /* Focus on the cropped fault-tree image must not pan the whole artboard. */
  overflow: clip;
}

.ls-project__content > section {
  display: contents;
}

.ls-project__content > section > * {
  position: absolute;
}

.ls-project__figure-label {
  color: #898e98;
  font: 400 .9375cqw/1.25 "Inter About", Inter, sans-serif;
  letter-spacing: .24em;
}

.ls-project .ls-project__title {
  top: calc(110 * var(--ls-unit));
  left: calc(50 * var(--ls-unit));
  width: calc(712 * var(--ls-unit));
  font-size: calc(50 * var(--ls-unit));
  line-height: 1.4;
}

.ls-project__lead {
  top: calc(210 * var(--ls-unit));
  left: calc(50 * var(--ls-unit));
  width: calc(712 * var(--ls-unit));
  color: #898e98;
  font: 300 calc(14 * var(--ls-unit))/calc(17 * var(--ls-unit)) "Inter About", "PingFang SC", sans-serif;
}

.ls-project__website {
  top: calc(110 * var(--ls-unit));
  left: calc(1011 * var(--ls-unit));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(4 * var(--ls-unit));
  width: calc(219 * var(--ls-unit));
  height: calc(47 * var(--ls-unit));
  border: 1px solid transparent;
  border-radius: calc(12 * var(--ls-unit));
  background: linear-gradient(#101112, #101112) padding-box,
    linear-gradient(120deg, #ffffff08, #ffffff2b, #ffffff08) border-box;
  color: #898e98;
  font: 400 14px/1.25 "Inter About", Inter, sans-serif;
  text-decoration: none;
}

.ls-project__website svg {
  width: calc(14 * var(--ls-unit));
  height: calc(14 * var(--ls-unit));
}

.ls-project__website:hover {
  color: #fff;
}

.ls-project__screen {
  isolation: isolate;
  overflow: hidden;
  border: 0;
  border-radius: var(--ls-media-radius);
  /* A white backing shows through antialiased image/video corners. */
  background: transparent;
  clip-path: inset(0 round var(--ls-media-radius));
}

.ls-project__image-open {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  overflow: hidden;
  background: transparent;
  cursor: zoom-in;
}

.ls-project__image-open:focus-visible {
  outline-offset: -4px;
}

.ls-project__image-hint {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 7px 10px;
  border: 1px solid #ffffff30;
  border-radius: 6px;
  background: #08090ae8;
  color: #eee;
  font: 400 12px/1.4 "PingFang SC", sans-serif;
  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: none;
}

.ls-project__image-open:is(:hover, :focus-visible) .ls-project__image-hint {
  opacity: 1;
}

.ls-project__screen img,
.ls-project__video,
.ls-project__context-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ls-project__screen img,
.ls-project__video {
  border: 0;
  border-radius: inherit;
  background: transparent;
}

.ls-project__video {
  /* The recording contains a dashed capture outline after its opening frames.
     Overscan only the video so that outline sits beyond the rounded crop. */
  transform: scale(1.014);
  transform-origin: center;
}

.ls-project__video-controls {
  position: absolute;
  right: calc(51 * var(--ls-unit));
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ls-project__video-controls button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #ffffff30;
  border-radius: 6px;
  background: #08090aed;
  color: #eee;
  font: 400 12px/1.4 "PingFang SC", sans-serif;
  cursor: pointer;
}

.ls-project__video-controls button:hover {
  background: #292c30;
  color: #fff;
}

.ls-project .ls-project__video-error {
  position: absolute;
  inset: 16px 48px auto 16px;
  padding: 12px;
  border-radius: 6px;
  background: #08090aed;
  color: #eee;
  font: 400 12px/1.5 "PingFang SC", sans-serif;
}

.ls-project [hidden],
.ls-image-viewer [hidden] {
  display: none !important;
}

.ls-project__cover {
  top: calc(311 * var(--ls-unit));
  left: calc(50 * var(--ls-unit));
  width: calc(1180 * var(--ls-unit));
  height: calc(737 * var(--ls-unit));
}

.ls-project .ls-project__context-title {
  top: calc(1228 * var(--ls-unit));
  left: calc(50 * var(--ls-unit));
  font-size: calc(40 * var(--ls-unit));
  line-height: 1.4;
}

.ls-project__context-copy {
  top: calc(1314 * var(--ls-unit));
  left: calc(50 * var(--ls-unit));
  width: calc(551 * var(--ls-unit));
}

.ls-project__context-copy,
.ls-project__workflow-copy {
  color: #ccc;
  font-size: calc(14 * var(--ls-unit));
  font-weight: 200;
  line-height: calc(20 * var(--ls-unit));
}

.ls-project strong {
  color: #fff;
  font-weight: 500;
}

.ls-project__meta {
  top: calc(1457 * var(--ls-unit));
  left: calc(50 * var(--ls-unit));
  display: grid;
  grid-template-columns: repeat(3, calc(125 * var(--ls-unit)));
  gap: calc(60 * var(--ls-unit));
}

.ls-project__meta dt {
  margin: 0 0 calc(7 * var(--ls-unit));
  color: #fff;
  font: 400 calc(12 * var(--ls-unit))/calc(15 * var(--ls-unit)) "Inter About", "PingFang SC", sans-serif;
}

.ls-project__meta dd {
  color: #898e98;
  font-size: calc(10 * var(--ls-unit));
  font-weight: 400;
  line-height: calc(18 * var(--ls-unit));
}

.ls-project__context-visual {
  top: calc(1168 * var(--ls-unit));
  left: calc(601 * var(--ls-unit));
  width: calc(679 * var(--ls-unit));
  height: calc(410 * var(--ls-unit));
}

.ls-project .ls-project__diagnosis-title {
  top: calc(1741 * var(--ls-unit));
  left: calc(50 * var(--ls-unit));
  width: calc(358 * var(--ls-unit));
  font-size: calc(30 * var(--ls-unit));
  line-height: 1.4;
}

.ls-project__diagnosis-copy,
.ls-project__diagnosis-notes {
  left: calc(50 * var(--ls-unit));
  width: calc(358 * var(--ls-unit));
  color: #ccc;
  font-size: calc(12 * var(--ls-unit));
  font-weight: 200;
  line-height: calc(17 * var(--ls-unit));
}

.ls-project__diagnosis-copy {
  top: calc(1855 * var(--ls-unit));
}

.ls-project__diagnosis-notes {
  top: calc(1981 * var(--ls-unit));
  display: grid;
  gap: calc(20 * var(--ls-unit));
  list-style: none;
}

.ls-project__diagnosis-notes li {
  position: relative;
  padding-left: 1.15em;
}

.ls-project__diagnosis-notes li::before {
  content: "";
  position: absolute;
  top: .56em;
  left: 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.ls-project__tree {
  top: calc(1691 * var(--ls-unit));
  left: calc(458 * var(--ls-unit));
  width: calc(857 * var(--ls-unit));
  height: calc(482 * var(--ls-unit));
}

.ls-project .ls-project__workflow-title {
  top: calc(2303 * var(--ls-unit));
  left: calc(334 * var(--ls-unit));
  width: calc(611 * var(--ls-unit));
  font-size: calc(40 * var(--ls-unit));
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

.ls-project__workflow-copy {
  top: calc(2379 * var(--ls-unit));
  left: calc(177 * var(--ls-unit));
  width: calc(926 * var(--ls-unit));
  text-align: center;
}

.ls-project__workspace {
  top: calc(2469 * var(--ls-unit));
  left: calc(55 * var(--ls-unit));
  width: calc(1180 * var(--ls-unit));
  height: calc(666 * var(--ls-unit));
}

/* Figma's alternating lower rows deliberately crop 178px at the outer edge. */
.ls-project__feature {
  --ls-feature-y: 3325;
  --ls-feature-text-x: 55;
  --ls-feature-image-x: 458;
}

.ls-project__feature--reverse {
  --ls-feature-text-x: 867;
  --ls-feature-image-x: -178;
}

.ls-project__feature--library {
  --ls-feature-y: 4029;
}

.ls-project__feature--configuration {
  --ls-feature-y: 4733;
}

.ls-project__feature--batch {
  --ls-feature-y: 5437;
}

.ls-project .ls-project__feature-title {
  top: calc((var(--ls-feature-y) + 191) * var(--ls-unit));
  left: calc(var(--ls-feature-text-x) * var(--ls-unit));
  width: calc(358 * var(--ls-unit));
  font-size: calc(30 * var(--ls-unit));
  line-height: 1.4;
}

.ls-project__feature-copy {
  top: calc((var(--ls-feature-y) + 305) * var(--ls-unit));
  left: calc(var(--ls-feature-text-x) * var(--ls-unit));
  width: calc(358 * var(--ls-unit));
  color: #ccc;
  font-size: calc(12 * var(--ls-unit));
  font-weight: 200;
  line-height: calc(17 * var(--ls-unit));
}

.ls-project__feature-screen {
  top: calc(var(--ls-feature-y) * var(--ls-unit));
  left: calc(var(--ls-feature-image-x) * var(--ls-unit));
  width: calc(1000 * var(--ls-unit));
  height: calc(564 * var(--ls-unit));
}

/* Keep the image hint visible even when the right side bleeds off the artboard. */
.ls-project__feature:not(.ls-project__feature--reverse) .ls-project__image-hint {
  right: calc(178 * var(--ls-unit) + 16px);
}

/* The supplied artboard is desktop-only; keep small-screen reading comfortable. */
@media (max-width: 700px) {
  .ls-project {
    --ls-bar-height: 64px;
    width: calc(100% - 16px);
    height: calc(100vh - 16px);
    height: calc(100dvh - 16px);
  }

  .ls-project__topbar {
    padding: 0 22px;
  }

  .ls-project__close {
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
    font-size: 12px;
  }

  .ls-project__content {
    height: auto;
    margin-top: 0;
    padding: 28px 22px 100px;
  }

  .ls-project__content > section {
    display: block;
  }

  .ls-project__content > section > * {
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
  }

  .ls-project :is(.ls-project__title, .ls-project__context-title, .ls-project__diagnosis-title, .ls-project__workflow-title, .ls-project__feature-title) {
    inset: auto;
    width: auto;
  }

  .ls-project__figure-label {
    font-size: 10px;
    line-height: 16px;
  }

  .ls-project .ls-project__title {
    margin-top: 16px;
    font-size: clamp(24px, 6vw, 36px);
    line-height: 1.4;
  }

  .ls-project .ls-project__lead {
    margin-top: 24px;
    font-size: 12px;
    line-height: 1.8;
  }

  .ls-project .ls-project__website {
    width: 154px;
    height: 44px;
    margin-top: 28px;
    gap: 4px;
    border-radius: 12px;
    font-size: 14px;
  }

  .ls-project__website svg {
    width: 14px;
    height: 14px;
  }

  .ls-project__image-hint {
    right: 10px;
    bottom: 10px;
    font-size: 10px;
  }

  .ls-project .ls-project__cover {
    margin-top: 40px;
    aspect-ratio: 1180 / 737;
  }

  .ls-project__context,
  .ls-project__diagnosis,
  .ls-project__workflow,
  .ls-project__feature {
    padding-top: 80px;
  }

  .ls-project :is(.ls-project__context-title, .ls-project__diagnosis-title, .ls-project__workflow-title, .ls-project__feature-title) {
    font-size: 28px;
    line-height: 1.5;
    text-align: left;
    white-space: normal;
  }

  .ls-project :is(.ls-project__context-copy, .ls-project__diagnosis-copy, .ls-project__workflow-copy, .ls-project__feature-copy) {
    margin-top: 24px;
    font-size: 13px;
    line-height: 1.8;
    text-align: left;
  }

  .ls-project .ls-project__meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 34px;
  }

  .ls-project__meta dt {
    margin-bottom: 7px;
    font-size: 12px;
    line-height: 1.4;
  }

  .ls-project__meta dd {
    font-size: 10px;
    line-height: 1.8;
  }

  .ls-project .ls-project__context-visual {
    margin-top: 32px;
    aspect-ratio: 679 / 410;
  }

  .ls-project .ls-project__diagnosis-notes {
    margin-top: 32px;
    gap: 20px;
    font-size: 12px;
    line-height: 1.7;
  }

  .ls-project .ls-project__tree,
  .ls-project .ls-project__workspace,
  .ls-project .ls-project__feature-screen {
    margin-top: 32px;
    aspect-ratio: 1180 / 666;
  }

  .ls-project .ls-project__feature-screen {
    aspect-ratio: 1000 / 564;
  }

  .ls-project__feature:not(.ls-project__feature--reverse) .ls-project__image-hint {
    right: 10px;
  }

  .ls-project__video-controls {
    right: 10px;
    bottom: 10px;
    gap: 6px;
  }

  .ls-project__video-controls button {
    min-height: 44px;
    padding: 8px 10px;
    font-size: 11px;
  }
}

/* A second native dialog preserves focus and the detail page's scroll position. */
.ls-image-viewer {
  position: fixed;
  inset: 0;
  width: calc(100% - 32px);
  height: calc(100vh - 32px);
  height: calc(100dvh - 32px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #ffffff20;
  border-radius: 10px;
  background: #08090a;
  color: #fff;
  font: 400 13px/1.5 "PingFang SC", sans-serif;
  color-scheme: dark;
}

.ls-image-viewer[open] {
  display: flex;
  flex-direction: column;
}

.ls-image-viewer::backdrop {
  background: #000d;
}

.ls-image-viewer__topbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 20px;
  border-bottom: 1px solid #ffffff18;
}

.ls-image-viewer__caption {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #a9adb5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ls-image-viewer__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
}

.ls-image-viewer button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #ffffff28;
  border-radius: 6px;
  background: #151719;
  color: #ddd;
  font: inherit;
  cursor: pointer;
}

.ls-image-viewer button:hover {
  color: #fff;
  background: #25282c;
}

.ls-image-viewer :focus-visible {
  outline: 2px solid #b8c3d8;
  outline-offset: -3px;
}

.ls-image-viewer__scroll {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: 16px;
  overflow: auto;
  overscroll-behavior: contain;
}

.ls-image-viewer__image,
.ls-image-viewer__video {
  display: block;
  align-self: center;
  justify-self: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}

.ls-image-viewer.is-original .ls-image-viewer__scroll {
  display: block;
}

.ls-image-viewer.is-original .ls-image-viewer__image {
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: auto;
}

@media (max-width: 700px) {
  .ls-image-viewer {
    width: calc(100% - 16px);
    height: calc(100dvh - 16px);
  }

  .ls-image-viewer__topbar {
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
  }

  .ls-image-viewer__caption {
    flex-basis: 100%;
    font-size: 12px;
  }

  .ls-image-viewer__actions {
    width: 100%;
    justify-content: space-between;
  }

  .ls-image-viewer__scroll {
    padding: 8px;
  }

  .ls-project__image-hint { opacity: 1; }
}

@keyframes ls-project-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .ls-project[open] { animation: none; }
}
