.product-story .storynote {
  padding: 28px 56px 8px;
  font-size: 16px;
  color: var(--muted);
}
.product-story .story-walkthrough {
  margin-top: 24px;
}
.product-story .p-intro {
  padding-top: 40px;
}
@media (width<=700px) {
  .product-story .storynote,
  .product-story .p-intro,
  .product-story .day {
    padding-left: 20px;
    padding-right: 20px;
  }
}
.tl-hero {
  padding: 72px 56px 56px;
  border-bottom: 2px solid var(--ink);
}
.tl-hero .eyebrow {
  font: 600 16px var(--body);
  color: var(--forest);
  margin: 0 0 20px;
}
.tl-hero h1 {
  margin: 0 0 24px;
  max-width: 15em;
}
.tl-hero .lead {
  font: 400 20px/1.55 var(--body);
  max-width: 36em;
  margin: 0 0 32px;
}
.tl-hero figure {
  margin: 48px 0 0;
  max-width: 760px;
}
.tl-hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
.tl-hero figcaption {
  font: 400 15px var(--body);
  color: var(--muted);
  margin-top: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  background: var(--btn);
  color: #fff;
  border-radius: 4px;
  font: 600 17px var(--body);
  text-decoration: none;
}
.tl {
  padding: 72px 56px 24px;
  max-width: 872px;
}
.tl h2.tl-title {
  font-size: 40px;
  line-height: 1.2;
  margin: 0 0 48px;
  max-width: 16em;
}
.tl ol {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 760px;
}
.tl li {
  position: relative;
  padding: 0 0 56px 76px;
}
.tl li:before {
  content: '';
  position: absolute;
  left: 21px;
  top: 48px;
  bottom: 8px;
  width: 2px;
  background: #d9c9b0;
}
.tl li:last-child:before {
  display: none;
}
.tl .n {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 18px var(--body);
  background: var(--paper);
}
.tl h3 {
  font-size: 30px;
  line-height: 1.25;
  margin: 4px 0 14px;
}
.tl p {
  font: 400 19px/1.6 var(--body);
  margin: 0 0 12px;
  max-width: 36em;
}
.speclink {
  padding: 8px 56px 72px;
}
.speclink a {
  font: 600 20px var(--body);
  color: var(--ink);
  text-underline-offset: 5px;
}
.tl-trust {
  background: var(--sand);
  padding: 64px 56px;
  border-top: 2px solid var(--ink);
}
.tl-trust h2 {
  font-size: 34px;
  margin: 0 0 16px;
}
.tl-trust p {
  font: 400 19px/1.6 var(--body);
  max-width: 40em;
  margin: 0 0 28px;
}
.tl-trust h3 {
  font-size: 24px;
  margin: 0 0 10px;
}
.tl-video {
  padding: 48px 56px 40px;
  border-bottom: 2px solid var(--ink);
}
.tl-video h2 {
  font-size: 36px;
  line-height: 1.2;
  margin: 0 0 24px;
}
.tl-video video {
  display: block;
  width: 100%;
  max-width: 1120px;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #14221b;
  border: 2px solid var(--ink);
  border-radius: 6px;
}
.tl-video-cta {
  margin: 24px 0 0;
}
.tl-cta {
  background: var(--forest);
  color: var(--paper);
  padding: 64px 56px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.tl-cta h2 {
  font-size: 36px;
  line-height: 1.2;
  margin: 0;
  max-width: 16em;
  color: var(--paper);
}
.tl-cta .btn {
  background: var(--cream);
  color: var(--ink);
  margin-left: auto;
}
.tl-cta-close {
  border-top: 2px solid var(--ink);
}
.tl-spec {
  padding: 56px 56px 72px;
  max-width: 1100px;
}
.tl-spec .back {
  font: 600 17px var(--body);
  color: var(--ink);
  text-underline-offset: 4px;
}
.tl-spec h2 {
  font-size: 28px;
  margin: 56px 0 16px;
}
.tl-spec table {
  width: 100%;
  border-collapse: collapse;
  font: 400 17px/1.5 var(--body);
}
.tl-spec th {
  text-align: left;
  font: 600 15px var(--body);
  color: var(--muted);
  border-bottom: 2px solid var(--ink);
  padding: 8px 12px 8px 0;
}
.tl-spec td {
  border-bottom: 1px solid #e3d6c3;
  padding: 14px 16px 14px 0;
  vertical-align: top;
}
.tl-spec td.c {
  width: 84px;
  font: 600 15px var(--body);
  color: var(--forest);
  white-space: nowrap;
}
@media (width<=700px) {
  .tl-video,
  .tl-hero,
  .tl,
  .speclink,
  .tl-trust,
  .tl-cta,
  .tl-spec {
    padding-left: 20px;
    padding-right: 20px;
  }
  .tl-hero {
    padding-top: 44px;
    padding-bottom: 40px;
  }
  .tl-hero .lead {
    font-size: 18px;
  }
  .tl {
    padding-top: 48px;
  }
  .tl h2.tl-title {
    font-size: 30px;
    margin-bottom: 36px;
  }
  .tl li {
    padding-left: 60px;
    padding-bottom: 44px;
  }
  .tl li:before {
    left: 17px;
    top: 40px;
  }
  .tl .n {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .tl h3 {
    font-size: 24px;
    margin-top: 2px;
  }
  .tl p {
    font-size: 17px;
  }
  .tl-trust h2 {
    font-size: 28px;
  }
  .tl-trust p {
    font-size: 17px;
  }
  .tl-cta h2,
  .tl-video h2 {
    font-size: 28px;
  }
  .tl-cta .btn {
    margin-left: 0;
  }
  .tl-spec table,
  .tl-spec td {
    font-size: 16px;
  }
  .tl-spec td.c {
    width: 64px;
  }
}

/* Story page bands as sheets (pick 7): the trust section (sand) over the band
   above, the first call to action (forest) over it, the closing one (ink) over
   that. The classes come from ProductStory.astro only, so the spec pages that
   share this file are unchanged. */
.speclink.sheet-under,
.tl-trust.sheet,
.tl-cta.sheet-under {
  padding-bottom: calc(var(--sheet-overlap) + 64px);
}
.tl-cta.sheet {
  border-top: 0;
}
.tl-cta-close.sheet {
  background: var(--ink);
}

/* Pick 3 on the story pages: the story intro leads the page as its hero, with
   the portrait on a warm stage. Then the day starts on a rounded paper sheet
   under a Plex Mono label, and the walkthrough follows the spec link, in a
   warm panel. Scoped to the story pages' own classes, and the walkthrough
   rules under main. */
.product-story .p-intro,
.product-story .p-intro.has-art {
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 64px;
  padding: 72px 56px 96px;
  align-items: center;
}
.product-story .p-intro h1 {
  font-size: var(--t-h1);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  max-width: 11.5em;
}
.product-story .p-intro p {
  font-size: var(--t-lede);
  line-height: 1.55;
  margin-top: 28px;
}
.product-story .p-intro .eyebrow {
  margin: 0 0 22px;
  font: 500 var(--t-label) / 1.4 var(--mono);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--btn);
}
.product-story .p-intro .story-walkthrough {
  margin-top: 36px;
}
.product-story .story-walkthrough .btn {
  min-height: 56px;
  padding: 0 28px;
  border-radius: var(--r-chip);
  font: 700 19px var(--body);
}
.product-story .stage {
  position: relative;
  isolation: isolate;
  margin: 0;
  padding: 36px;
  border-radius: var(--r-stage);
  background: var(--wash);
}
.product-story .stage::before {
  content: '';
  position: absolute;
  inset: 18% 14% 10% 22%;
  z-index: -1;
  border-radius: 50%;
  background: var(--glow);
  opacity: 0.9;
  filter: blur(24px);
}
.product-story .stage .portrait {
  width: auto;
  max-width: 100%;
  max-height: 600px;
  margin: 0 auto;
  border-radius: var(--r-art);
}
.product-story > .storynote {
  margin: 0;
  padding: 72px 56px 0 312px;
  background: var(--paper);
  border-top: 2px solid var(--ink);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  font: 500 var(--t-label) / 1.4 var(--mono);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--muted);
}
main .tl-video {
  padding: 0 56px 152px;
  border-bottom: 0;
}
main .tl-video h2 {
  font-size: var(--t-h2);
  line-height: 1.08;
  margin: 0 0 32px;
  text-align: center;
}
main .wpanel {
  position: relative;
  isolation: isolate;
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 64px;
  border: 2px solid var(--ink);
  border-radius: var(--r-panel);
  background: var(--wash);
}
main .wpanel::before {
  content: '';
  position: absolute;
  inset: 16% 18% 22%;
  z-index: -1;
  border-radius: 50%;
  background: var(--glow);
  filter: blur(var(--glow-blur));
}
main .tl-video .wpanel video {
  max-width: none;
  border: 10px solid var(--device);
  border-radius: var(--r-device);
  box-shadow: var(--shadow-device);
  object-fit: contain;
}
main .tl-video-cta {
  margin: 32px 0 0;
  text-align: center;
}
@media (width<=700px) {
  .product-story .p-intro,
  .product-story .p-intro.has-art {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 36px 20px 72px;
  }
  .product-story .p-intro h1 {
    line-height: 1.06;
  }
  .product-story .story-walkthrough .btn {
    width: 100%;
    justify-content: center;
    min-height: 54px;
  }
  .product-story .stage {
    padding: 16px;
  }
  .product-story .stage .portrait {
    width: 100%;
    max-height: none;
  }
  .product-story > .storynote {
    padding: 44px 20px 0;
  }
  main .tl-video {
    padding: 0 20px 96px;
  }
  main .tl-video h2 {
    margin-bottom: 20px;
    text-align: left;
  }
  main .wpanel {
    padding: 20px 14px;
  }
  main .tl-video .wpanel video {
    border-width: 6px;
  }
  main .tl-video-cta {
    text-align: left;
  }
}

/* Pick 1: the clock rail, 1100 px and wider. It sits beside the day in a
   232 px column, sticky under the header, with a dashed progress fill (--p,
   set by rail.ts) and a dot per step. Below 1100 px the same nav is the time
   strip (further down). */
@media (min-width: 1100px) {
  .story-day {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 40px;
    padding: 0 56px 0 40px;
  }
  .story-day > * {
    min-width: 0;
  }
  .story-day .day {
    padding: 40px 0 60px;
  }
  .rail {
    display: block;
    position: sticky;
    top: calc(var(--head-offset, var(--head-h)) + 24px);
    align-self: start;
    padding-top: 56px;
    transition: top var(--dur-rail) var(--ease-out);
  }
  .rail ol {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .rail ol::before,
  .rail ol::after {
    content: '';
    position: absolute;
    top: 14px;
  }
  .rail ol::before {
    left: 11px;
    bottom: 14px;
    width: 2px;
    background: var(--line);
  }
  .rail ol::after {
    left: 10px;
    width: 4px;
    height: calc((100% - 28px) * var(--p, 0));
    background: repeating-linear-gradient(var(--mothy) 0 10px, transparent 10px 18px);
    transition: height var(--dur-rail) var(--ease-out);
  }
  .rail li {
    position: relative;
    margin-bottom: 6px;
  }
  .rail li::before {
    content: '';
    position: absolute;
    z-index: 1;
    left: 4px;
    top: 15px;
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    border: 2px solid var(--line-strong);
    border-radius: 50%;
    background: var(--paper);
  }
  .rail li.done::before {
    border-color: var(--mothy);
    background: var(--mothy);
  }
  .rail li.now::before {
    left: 3px;
    top: 14px;
    width: 18px;
    height: 18px;
    border: 4px solid var(--mothy);
  }
  .rail a {
    display: block;
    padding: 8px 10px 8px 34px;
    border-radius: var(--r-item);
    color: var(--muted);
    text-decoration: none;
  }
  .rail a[aria-current='step'] {
    background: var(--sand);
    color: var(--ink);
  }
  .rail .t {
    display: block;
    font: 500 17px/1.3 var(--mono);
    font-variant-numeric: tabular-nums;
  }
  .rail .w {
    display: block;
    font: 600 14px/1.35 var(--body);
  }
}

/* Pick 1, phones and tablets (1099 px and below): the rail becomes a sticky
   time strip under the header. Each chip shows the time only; the person stays
   in the link for screen readers. Done chips get a mothy border and the
   current one is filled in ink. */
@media (max-width: 1099px) {
  /* Anchors and focused controls land below the header and the strip. */
  html:has(.rail) {
    scroll-padding-top: calc(var(--head-h) + 68px);
  }
  .rail {
    position: sticky;
    z-index: 40;
    top: var(--head-offset, var(--head-h));
    padding: 10px 56px;
    background: rgba(250, 246, 240, 0.94);
    border-bottom: 1px solid var(--hairline);
    transition: top var(--dur-rail) var(--ease-out);
  }
  .rail ol {
    display: flex;
    justify-content: space-between;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .rail a {
    display: block;
    padding: 8px;
    border: 1.5px solid var(--line-strong);
    border-radius: var(--r-pill);
    color: var(--ink);
    text-decoration: none;
    font: 500 14px/1 var(--mono);
    font-variant-numeric: tabular-nums;
    position: relative;
  }
  /* The chips stay small to fit five across 320 px; the tap target reaches
     about 9 px above and below each chip's border, into the strip's 10 px padding,
     so it is at least 44 px high at every width. */
  .rail a::after {
    content: '';
    position: absolute;
    inset: -10px 0;
  }
  .rail li.done a {
    border-color: var(--mothy);
  }
  .rail a[aria-current='step'] {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
  }
  .rail .w {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
@media (max-width: 700px) {
  .rail {
    padding: 10px 20px;
  }
}
@media (max-width: 374px) {
  .rail {
    padding: 10px 12px;
  }
  .rail a {
    padding: 6px;
  }
}
