.story-grid[data-astro-cid-n2lz65zz] {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.story-steps[data-astro-cid-n2lz65zz] {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.story-step[data-astro-cid-n2lz65zz] {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass);
}

.step-num[data-astro-cid-n2lz65zz] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--gold-tint);
  color: var(--gold-ink);
  font-weight: 800;
  margin-bottom: 10px;
}

.step-text[data-astro-cid-n2lz65zz] h3[data-astro-cid-n2lz65zz] {
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  margin-bottom: 6px;
}

.step-text[data-astro-cid-n2lz65zz] p[data-astro-cid-n2lz65zz] {
  margin: 0;
  font-size: 1.05rem;
}

.story-phone[data-astro-cid-n2lz65zz] {
  display: none;
}

.mini[data-astro-cid-n2lz65zz], .story-phone[data-astro-cid-n2lz65zz] {
  border-radius: 34px;
  background: linear-gradient(#14295e, #0b1940);
  border: 7px solid #0b1020;
  box-shadow: 0 0 0 1px #a9d3fe40,
      0 30px 70px -30px var(--shadow-ink);
}

.mini[data-astro-cid-n2lz65zz] {
  justify-self: center;
  width: min(100%, 320px);
  min-height: 340px;
  padding: 12px 12px 18px;
}

.notch[data-astro-cid-n2lz65zz] {
  width: 84px;
  height: 6px;
  margin: 0 auto 12px;
  border-radius: 6px;
  background: #ffffff26;
}

@media (width >= 640px) and (width <= 959px) {
  .story-step[data-astro-cid-n2lz65zz] {
    grid-template-columns: 1fr 300px;
    align-items: center;
    gap: 24px;
  }
}

@media (width >= 960px) {
  .story-grid[data-astro-cid-n2lz65zz] {
    grid-template-columns: 1fr minmax(300px, 360px);
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
  }

  .story-step[data-astro-cid-n2lz65zz] {
    min-height: 62vh;
    align-content: center;
    padding: 0 0 0 28px;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
    background: none;
  }

  .mini[data-astro-cid-n2lz65zz] {
    display: none;
  }

  .story-phone[data-astro-cid-n2lz65zz] {
    display: block;
    position: sticky;
    top: calc(50vh - 260px);
    height: 520px;
    padding: 14px;
    border-radius: 38px;
  }

  .screens[data-astro-cid-n2lz65zz] {
    position: relative;
    height: calc(100% - 18px);
  }

  .scr[data-astro-cid-n2lz65zz] {
    position: absolute;
    inset: 0;
    padding: 0 2px;
    transition: opacity .4s, translate .4s;
  }

  .scr[data-astro-cid-n2lz65zz]:not(:first-child) {
    opacity: 0;
  }

  .story-phone[data-astro-cid-n2lz65zz][data-active] .scr[data-astro-cid-n2lz65zz] {
    opacity: 0;
  }

  .story-phone[data-astro-cid-n2lz65zz][data-active="0"] .scr[data-astro-cid-n2lz65zz]:first-child, .story-phone[data-astro-cid-n2lz65zz][data-active="1"] .scr[data-astro-cid-n2lz65zz]:nth-child(2), .story-phone[data-astro-cid-n2lz65zz][data-active="2"] .scr[data-astro-cid-n2lz65zz]:nth-child(3), .story-phone[data-astro-cid-n2lz65zz][data-active="3"] .scr[data-astro-cid-n2lz65zz]:nth-child(4), .story-phone[data-astro-cid-n2lz65zz][data-active="4"] .scr[data-astro-cid-n2lz65zz]:nth-child(5) {
    opacity: 1;
  }
}

@media (width >= 960px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) and (animation-range: entry) {
    .story[data-astro-cid-n2lz65zz] {
      timeline-scope: --st0, --st1, --st2, --st3, --st4;
    }

    .story-step[data-astro-cid-n2lz65zz]:first-child {
      view-timeline: --st0 block;
    }

    .story-step[data-astro-cid-n2lz65zz]:nth-child(2) {
      view-timeline: --st1 block;
    }

    .story-step[data-astro-cid-n2lz65zz]:nth-child(3) {
      view-timeline: --st2 block;
    }

    .story-step[data-astro-cid-n2lz65zz]:nth-child(4) {
      view-timeline: --st3 block;
    }

    .story-step[data-astro-cid-n2lz65zz]:nth-child(5) {
      view-timeline: --st4 block;
    }

    @keyframes screen-swap {
      0% {
        opacity: 0;
        translate: 0 28px;
        scale: .96;
      }

      25%, 75% {
        opacity: 1;
        translate: 0;
        scale: 1;
      }

      100% {
        opacity: 0;
        translate: 0 -28px;
        scale: .96;
      }
    }

    .scr[data-astro-cid-n2lz65zz] {
      transition: none;
      animation: linear both screen-swap;
      animation-range: cover 20% cover 80%;
    }

    .scr[data-astro-cid-n2lz65zz]:first-child {
      animation-range: cover cover 80%;
    }

    .scr[data-astro-cid-n2lz65zz]:first-child {
      animation-timeline: --st0;
    }

    .scr[data-astro-cid-n2lz65zz]:nth-child(2) {
      animation-timeline: --st1;
    }

    .scr[data-astro-cid-n2lz65zz]:nth-child(3) {
      animation-timeline: --st2;
    }

    .scr[data-astro-cid-n2lz65zz]:nth-child(4) {
      animation-timeline: --st3;
    }

    .scr[data-astro-cid-n2lz65zz]:nth-child(5) {
      animation-timeline: --st4;
    }

    @keyframes step-focus {
      0%, 100% {
        opacity: .35;
      }

      35%, 65% {
        opacity: 1;
      }
    }

    .step-text[data-astro-cid-n2lz65zz] {
      animation: linear both step-focus;
      animation-timeline: view();
      animation-range: cover 10% cover 90%;
    }

    @keyframes line-fill {
      from {
        scale: 1 0;
      }
    }

    .story-step[data-astro-cid-n2lz65zz] {
      position: relative;
    }

    .story-step[data-astro-cid-n2lz65zz]:before {
      content: "";
      position: absolute;
      left: -2px;
      top: 0;
      bottom: 0;
      width: 2px;
      background: var(--gold);
      transform-origin: top;
      animation: linear both line-fill;
      animation-timeline: view();
      animation-range: cover 30% cover 60%;
    }
  }
}
/* Chat screen content (StoryScreen.astro), ADR 0081. */
  .story .chat-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 4px 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(169, 211, 254, 0.14);
    color: #eef3ff;
  }
  .story .ava {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fde047, #f5b301);
    color: #0b1b3f;
    font-weight: 800;
  }
  .story .who {
    display: grid;
    line-height: 1.25;
  }
  .story .who small {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: #a9d3fe;
  }
  .story .on {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
  }
  .story .chat {
    display: grid;
    gap: 8px;
    align-content: start;
    color: #eef3ff;
  }
  .story .bubble {
    margin: 0;
    max-width: 86%;
    padding: 9px 12px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.45;
  }
  .story .bubble.tara {
    background: rgba(169, 211, 254, 0.12);
    border-bottom-left-radius: 4px;
  }
  .story .bubble.me {
    justify-self: end;
    background: #2563eb;
    color: #fff;
    border-bottom-right-radius: 4px;
  }
  .story .bubble.said {
    background: rgba(255, 138, 107, 0.18);
    color: #ffc2b2;
    text-decoration: line-through;
    text-decoration-color: rgba(255, 138, 107, 0.7);
  }
  .story .bubble.card {
    display: grid;
    gap: 6px;
  }
  .story .bubble.wide {
    max-width: 100%;
    width: 100%;
  }
  .story .bubble.ok {
    color: #34d399;
    font-weight: 800;
  }
  .story .mic-pill {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #facc15;
    color: #0b1b3f;
    font-weight: 800;
    font-size: 0.85rem;
  }
  .story .better {
    margin: 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(52, 211, 153, 0.14);
    color: #a7f3d0;
    font-weight: 700;
    font-size: 0.9rem;
  }
  .story .explain {
    margin: 0;
    font-size: 0.86rem;
    color: #d4def3;
    line-height: 1.5;
  }
  .story .heard {
    margin: 0;
    font-size: 0.8rem;
    color: #a9d3fe;
    justify-self: end;
  }
  .story .tag {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a9d3fe;
  }
  .story .due {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fde68a;
    font-weight: 700;
    font-size: 0.88rem;
  }
  .story .bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 84px;
  }
  .story .bars i {
    flex: 1;
    height: var(--h);
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, #facc15, rgba(59, 130, 246, 0.6));
  }
  .story .cmp {
    margin: 0;
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 0.88rem;
    color: #d4def3;
  }
  .story .cmp .up {
    color: #34d399;
  }
  /* "Tara is typing": only while a screen plays. */
  .story .typing {
    display: none;
    gap: 5px;
    width: max-content;
    padding: 11px 13px;
    border-radius: 16px 16px 16px 4px;
    background: rgba(169, 211, 254, 0.12);
  }
  .story .typing i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a9d3fe;
  }

  /* Playback: lines arrive one after another, like a real chat. */
  @media (prefers-reduced-motion: no-preference) {
    .story[data-chat='on'] [data-chat-screen] .chat > * {
      opacity: 0;
      translate: 0 10px;
    }
    .story[data-chat='on'] [data-chat-screen].play .chat > * {
      animation: chat-in 0.38s cubic-bezier(0.2, 0.8, 0.2, 1) both;
      animation-delay: calc(var(--i) * 0.9s + 0.15s);
    }
    .story[data-chat='on'] [data-chat-screen].play .typing {
      display: flex;
      /* Shows for a moment, then makes room for Tara's answer (overlaps it: nothing jumps). */
      animation: typing-life 0.9s ease both;
      animation-delay: calc(var(--i) * 0.9s + 0.15s);
      margin-bottom: -37px;
    }
    .story[data-chat='on'] [data-chat-screen].play .typing i {
      animation: typing-dot 0.8s ease-in-out infinite;
    }
    .story .typing i:nth-child(2) {
      animation-delay: 0.15s !important;
    }
    .story .typing i:nth-child(3) {
      animation-delay: 0.3s !important;
    }
    .story[data-chat='on'] [data-chat-screen].play .bars i {
      animation: bar-grow 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
      animation-delay: calc(var(--i, 1) * 0.9s + 0.4s);
    }
    @keyframes chat-in {
      to {
        opacity: 1;
        translate: 0 0;
      }
    }
    @keyframes typing-life {
      0% {
        opacity: 0;
        translate: 0 10px;
      }
      20%,
      80% {
        opacity: 1;
        translate: 0 0;
      }
      100% {
        opacity: 0;
        translate: 0 0;
      }
    }
    @keyframes typing-dot {
      0%,
      100% {
        opacity: 0.35;
        translate: 0 0;
      }
      50% {
        opacity: 1;
        translate: 0 -3px;
      }
    }
    @keyframes bar-grow {
      from {
        height: 6%;
      }
    }
  }.try-grid[data-astro-cid-hhstcp4h] {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(20px, 4vw, 48px);
  align-items: start;
  padding: clamp(22px, 4vw, 44px);
  background: radial-gradient(600px 260px at 100% 0%, #facc151f, transparent 70%),
      var(--glass);
}

@media (width <= 860px) {
  .try-grid[data-astro-cid-hhstcp4h] {
    grid-template-columns: 1fr;
  }
}

.try-copy[data-astro-cid-hhstcp4h] h2[data-astro-cid-hhstcp4h] {
  margin-top: 10px;
}

.try-input[data-astro-cid-hhstcp4h] {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: stretch;
}

@media (width <= 520px) {
  .try-input[data-astro-cid-hhstcp4h] {
    grid-template-columns: 1fr;
  }
}

textarea[data-astro-cid-hhstcp4h] {
  resize: none;
  min-height: 56px;
  font: inherit;
  font-size: 1.05rem;
}

.ex-label[data-astro-cid-hhstcp4h] {
  margin: 14px 0 8px;
  color: var(--mist);
  font-size: .9rem;
}

.examples[data-astro-cid-hhstcp4h] {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ex[data-astro-cid-hhstcp4h] {
  font: inherit;
  font-size: .9rem;
  color: var(--sky);
  background: #a9d3fe14;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 40px;
  cursor: pointer;
  text-align: left;
  transition: background .2s, border-color .2s;
}

.ex[data-astro-cid-hhstcp4h]:hover {
  background: #a9d3fe29;
  border-color: var(--sky);
}

.out[data-astro-cid-hhstcp4h]:not(:empty) {
  margin-top: 16px;
}

.out[data-astro-cid-hhstcp4h] .err {
  color: var(--gold-soft);
}

.after[data-astro-cid-hhstcp4h] {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 16px;
}

.after-text[data-astro-cid-hhstcp4h] {
  color: var(--mist);
  font-weight: 700;
}

.note[data-astro-cid-hhstcp4h] {
  margin: 14px 0 0;
  font-size: .8rem;
  color: var(--mist);
  opacity: .8;
}

.sr[data-astro-cid-hhstcp4h] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) and (animation-range: entry) {
    @keyframes try-tilt {
      from {
        opacity: 0;
        transform: perspective(1400px) rotateX(22deg) translateY(70px) scale(.94);
      }
    }

    html.sda .try-grid[data-astro-cid-hhstcp4h][data-reveal] {
      animation: try-tilt var(--sd-ease) both;
      animation-timeline: view();
      animation-range: entry cover 35%;
    }
  }
}
