.led-story {
  position: relative;
  isolation: isolate;
  color: #f6f7f9;
  background: #090e17;
  font-family: "DM Sans", Arial, sans-serif;
}
.led-story [hidden] { display: none !important; }
.led-story__pin {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
}
.led-story[data-mode="scroll"] .led-story__pin { position: sticky; top: 0; }
.led-story[data-mode="scroll"]::after { content: ""; display: block; height: 240vh; height: 240svh; }
.led-story__layout {
  --story-side: clamp(22px, 4.2vw, 76px);
  --story-top: clamp(18px, 4.2vh, 48px);
  --story-bottom: clamp(8px, 2vh, 26px);
  position: relative;
  isolation: isolate;
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(24px, 1fr) auto 2px auto;
  row-gap: clamp(6px, 1.3vh, 13px);
  padding: var(--story-top) var(--story-side) var(--story-bottom);
  padding-top: max(var(--story-top), calc(env(safe-area-inset-top) + 10px));
  padding-right: max(var(--story-side), calc(env(safe-area-inset-right) + 12px));
  padding-bottom: max(var(--story-bottom), calc(env(safe-area-inset-bottom) + 6px));
  padding-left: max(var(--story-side), calc(env(safe-area-inset-left) + 12px));
}
.led-story__copy, .led-story__visual { display: contents; }
.led-story__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: #090e17;
}
.led-story__media > img, .led-story__media > canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.led-story__media > img { object-fit: cover; object-position: center; }
@media (max-aspect-ratio: 3/4), (min-aspect-ratio: 2/1) {
  .led-story__media > img { object-fit: contain; }
}
.led-story__media > canvas { opacity: 0; pointer-events: none; }
.led-story__media > .led-story__canvas-ready { opacity: 1; }
.led-story__layout::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgb(3 7 12 / .79), rgb(3 7 12 / .37) 8%, transparent 23%),
    linear-gradient(to top, rgb(3 7 12 / .93), rgb(3 7 12 / .72) 9%, rgb(3 7 12 / .30) 20%, transparent 34%);
}
.led-story__intro {
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: start;
  gap: 3px 18px;
}
.led-story__intro h2, .led-story__readout h3 {
  margin: 0;
  color: #fff;
  line-height: 1.1;
  font-weight: 585;
  letter-spacing: -.043em;
  text-shadow: 0 1px 8px rgb(0 0 0 / .4);
}
.led-story__intro h2 { font-size: clamp(23px, 2.2vw, 38px); }
.led-story__intro > p {
  grid-column: 1;
  margin: 0;
  color: #e0e6ed;
  font-size: clamp(12px, .98vw, 15px);
  line-height: 1.5;
  text-shadow: 0 1px 4px #090e17;
}
.led-story__skip, .led-story__project {
  display: inline-flex;
  align-items: center;
  min-height: 33px;
  width: fit-content;
  gap: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 570;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-color: #abb3bc;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-shadow: 0 1px 4px #090e17;
}
.led-story__skip { grid-column: 2; grid-row: 1 / span 2; align-self: start; justify-self: end; }
.led-story__project { color: #ffb18f; text-decoration-color: #d99b83; }
.led-story__skip:hover, .led-story__project:hover { text-decoration-color: currentColor; }
.led-story :focus-visible { outline: 2px solid #ff9f7a; outline-offset: 3px; }
.led-story__readout {
  grid-row: 3;
  justify-self: start;
  width: min(100%, 52ch);
  text-shadow: 0 1px 5px #060a10;
}
.led-story__readout h3 { font-size: clamp(20px, 1.7vw, 29px); }
.led-story__readout p {
  margin: 5px 0 0;
  color: #f2f3f7;
  font-size: clamp(14px, 1.07vw, 17px);
  line-height: 1.4;
  text-wrap: pretty;
}
.led-story__progress {
  grid-row: 4;
  display: block;
  width: 100%;
  height: 2px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 1px;
  appearance: none;
  background: #67707b;
  color: #ff8c64;
  accent-color: #ff8c64;
}
.led-story__progress::-webkit-progress-bar { background: #67707b; }
.led-story__progress::-webkit-progress-value { background: #ff8c64; }
.led-story__progress::-moz-progress-bar { background: #ff8c64; }
.led-story__steps {
  grid-row: 5;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: clamp(3px, 1.5vw, 24px);
  align-items: stretch;
}
.led-story__steps button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 36px;
  padding: 2px 0;
  border: none;
  border-radius: 2px;
  background: transparent;
  color: #d1d6dc;
  font: 550 clamp(12px, 1vw, 16px)/1.25 "DM Sans", Arial, sans-serif;
  text-align: left;
  text-shadow: 0 1px 4px #090e17;
}
.led-story__steps button:hover, .led-story__steps button[aria-pressed="true"] { color: #fff; }
.led-story__number { color: #c0c6d0; font: 11px/1.2 "Courier New", monospace; }
.led-story__steps button[aria-pressed="true"] .led-story__number { color: #ffab87; font-weight: 700; }

@media (max-width: 649px) {
  .led-story__layout { --story-side: clamp(15px, 4.3vw, 26px); --story-top: clamp(15px, 3.2vh, 26px); row-gap: 7px; }
  .led-story__intro { gap: 4px 12px; }
  .led-story__intro h2 { font-size: clamp(21px, 5.5vw, 28px); }
  .led-story__intro > p { font-size: 12px; }
  .led-story__skip, .led-story__project { min-height: 31px; font-size: 12px; }
  .led-story__readout { max-width: 43ch; }
  .led-story__readout h3 { font-size: 20px; }
  .led-story__readout p { margin-top: 4px; font-size: 14px; }
  .led-story__steps { gap: 6px; }
  .led-story__steps button {
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 3px;
    min-height: 44px;
    font-size: clamp(11px, 2.8vw, 14px);
  }
  .led-story__number { font-size: 10px; }
}
@media (max-height: 450px) {
  .led-story__layout { --story-top: 10px; --story-bottom: 4px; row-gap: 4px; }
  .led-story__intro h2 { font-size: 20px; }
  .led-story__intro > p { font-size: 12px; }
  .led-story__readout h3 { font-size: 18px; }
  .led-story__readout p, .led-story__project { font-size: 13px; }
  .led-story__project { min-height: 26px; }
  .led-story__steps button { min-height: 33px; }
}
@media (prefers-reduced-motion: reduce) {
  .led-story[data-mode="scroll"] .led-story__pin { position: relative; }
  .led-story[data-mode="scroll"]::after { display: none; }
}
