/* Product pages: the feature ladder (build-pages.py → .pdp-ladder, assets/ladder/ladder.js).
   Every selector is .ldr-* / .pdp-ladder scoped. The replicas themselves live in
   shadow roots and carry their own CSS. */
.pdp-ladder { background: var(--bg-soft); overflow: hidden; }
.ldr { list-style: none; margin: 60px auto 0; padding: 0; position: relative; max-width: 1300px; --ldr-p: 0; }
.ldr::before, .ldr::after { content: ""; position: absolute; left: 50%; top: 40px; width: 2px; margin-left: -1px; border-radius: 2px; }
.ldr::before { bottom: 40px; background: repeating-linear-gradient(180deg, var(--line-strong, #cfdad6) 0 6px, transparent 6px 12px); }
.ldr::after { height: calc((100% - 80px) * var(--ldr-p)); background: linear-gradient(180deg, var(--green-300), var(--green)); }

.ldr-rung { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 100px; align-items: center; padding: 40px 0; }
.ldr-rung:nth-child(even) .ldr-copy { grid-column: 2; }
.ldr-rung:nth-child(even) .ldr-fig { grid-column: 1; grid-row: 1; }
/* the rung: a short bar across the rail, joining the copy to its replica */
.ldr-rung::before { content: ""; position: absolute; top: 50%; height: 2px; margin-top: -1px; width: 100px; left: calc(50% - 50px); background: var(--line); transition: background .5s; }
.ldr-node { position: absolute; top: 50%; left: 50%; z-index: 1; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: var(--surface, #fff); border: 2px solid var(--line-strong, #cfdad6); display: grid; place-items: center; font: 600 .8rem/1 var(--ff-mono); color: var(--muted); transition: background .45s, border-color .45s, color .45s, box-shadow .45s, transform .45s; }
.ldr-rung.is-seen::before { background: #9fd8c6; }
.ldr-rung.is-seen .ldr-node { border-color: var(--green); color: var(--green-700); }
.ldr-rung.is-on .ldr-node { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 0 0 7px var(--green-soft); transform: scale(1.06); }

.ldr-copy { max-width: 440px; justify-self: end; }
.ldr-rung:nth-child(even) .ldr-copy { justify-self: start; }
.ldr-kicker { display: inline-block; font: 600 .72rem/1 var(--ff-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--green-700); margin-bottom: 12px; }
.ldr-copy h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); margin-bottom: 12px; line-height: 1.15; }
.ldr-copy p { color: var(--ink-2); font-size: 1rem; line-height: 1.6; }
.ldr-copy p + p { margin-top: 10px; }
.ldr-fig { margin: 0; min-width: 0; }
.ldr-rep { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 24px 50px -24px rgba(13,23,20,.28), 0 4px 14px rgba(13,23,20,.06);
  background: linear-gradient(180deg, #eef1f0 0, #eef1f0 8%, #f4f7f6 8%); }
.ldr-cap { margin-top: 10px; font-size: .8rem; color: var(--muted); }
.ldr-rung:nth-child(odd) .ldr-cap { text-align: right; }

/* the rest of the feature list, compact */
.ldr-more { max-width: 1300px; margin: 50px auto 0; padding-top: 34px; border-top: 1px solid var(--line); }
.ldr-more-h { font-family: var(--ff-mono); font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); text-align: center; margin-bottom: 22px; }
.ldr-more ul { list-style: none; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 16px; max-width: calc(var(--n, 4) * 320px); margin: 0 auto; }
.ldr-more li { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 18px 46px; position: relative; }
.ldr-more li::before { content: ""; position: absolute; left: 18px; top: 21px; width: 16px; height: 16px; border-radius: 50%; background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23138a69' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat; }
.ldr-more h3 { font-size: .98rem; margin-bottom: 6px; }
.ldr-more p { color: var(--muted); font-size: .88rem; line-height: 1.5; }

@media (max-width: 1100px) { .ldr-rung { gap: 0 80px; } .ldr-rung::before { width: 80px; left: calc(50% - 40px); } .ldr-more ul { grid-template-columns: repeat(min(var(--n, 4), 2), minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .ldr { margin-top: 40px; }
  .ldr::before, .ldr::after { left: 17px; top: 30px; }
  .ldr::before { bottom: 30px; }
  .ldr::after { height: calc((100% - 60px) * var(--ldr-p)); }
  .ldr-rung { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 26px 0 26px 50px; }
  .ldr-rung:nth-child(even) .ldr-copy, .ldr-rung:nth-child(even) .ldr-fig { grid-column: 1; grid-row: auto; }
  .ldr-rung::before { display: none; }
  .ldr-node { left: 17px; top: 26px; margin: 0 0 0 -17px; width: 34px; height: 34px; font-size: .72rem; }
  .ldr-copy, .ldr-rung:nth-child(even) .ldr-copy { max-width: none; justify-self: stretch; }
  .ldr-kicker { margin: 9px 0 10px; }
  .ldr-fig { margin-left: -50px; position: relative; z-index: 2; }
  .ldr-rep { border-radius: 10px; }
  .ldr-rung:nth-child(odd) .ldr-cap { text-align: left; }
}
@media (max-width: 560px) { .ldr-more ul { grid-template-columns: minmax(0, 1fr); } .ldr-copy p { font-size: .96rem; } }
@media (prefers-reduced-motion: reduce) { .ldr-node, .ldr-rung::before { transition: none; } }
