.pt {
    position: relative;
    padding-block: clamp(56px, 8vw, 104px);
    background:
        radial-gradient(60% 50% at 85% 20%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 70%),
        var(--bg);
    --pt-head: 68px;
}

.pt-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'head' 'view' 'steps';
    gap: 22px;
}

.pt-head {
    grid-area: head;
    max-width: 34rem;
}

.pt-head h2 {
    font-size: clamp(1.75rem, 3vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.pt-head p {
    margin-top: 12px;
    color: var(--muted);
    font-size: 1.05rem;
}

.pt-view {
    grid-area: view;
    min-width: 0;
}

.pt-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.pt-track::-webkit-scrollbar {
    display: none;
}

.pt-track:focus-visible {
    outline-offset: -3px;
}

.pt-item {
    min-width: 0;
    scroll-snap-align: start;
}

.pt-shot {
    margin: 0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.pt-shot .ps-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    user-select: none;
}

.pt-dots {
    display: flex;
    justify-content: center;
    gap: 2px;
    min-height: 24px;
    margin-top: 10px;
}

.pt-dots button {
    position: relative;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.pt-dots button::before {
    content: '';
    position: absolute;
    inset: 9px;
    border-radius: 999px;
    background: var(--line-2);
    transition: transform 0.3s var(--ease), background-color 0.3s var(--ease);
}

.pt-dots button.on::before {
    background: var(--brand);
    transform: scaleX(2.2);
}

.pt-steps {
    grid-area: steps;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pt-step h3 {
    font-family: var(--display);
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.pt-tab {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.pt-tick {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
}

.pt-desc p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 1rem;
}

.pt-desc strong {
    color: var(--ink);
    font-weight: 600;
}

.pt-step + .pt-step {
    margin-top: 18px;
}

.pt.is-js .pt-steps {
    display: grid;
}

.pt.is-js .pt-step {
    grid-area: 1 / 1;
    margin: 0;
    visibility: hidden;
}

.pt.is-js .pt-step.is-on {
    visibility: visible;
}

.pt.is-js .pt-tick {
    display: none;
}

@media (min-width: 961px) {
    .pt-grid {
        grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.6fr);
        grid-template-areas: 'head view' 'steps view';
        grid-template-rows: auto 1fr;
        column-gap: clamp(36px, 4.5vw, 72px);
        row-gap: 26px;
        align-items: start;
    }

    .pt-view {
        align-self: center;
    }

    .pt.is-pinned {
        display: flex;
        align-items: center;
        min-height: calc(100vh - var(--pt-head));
        padding-block: 28px;
    }

    .pt.is-pinned .pt-grid {
        align-items: center;
    }

    .pt.is-pinned .pt-view {
        width: min(100%, calc((100vh - var(--pt-head) - 120px) * 1.6));
        justify-self: end;
    }

    .pt.is-pinned .pt-track {
        overflow: hidden;
        scroll-snap-type: none;
        grid-auto-flow: row;
    }

    .pt.is-pinned .pt-item {
        grid-area: 1 / 1;
        visibility: hidden;
        will-change: transform, opacity;
    }

    .pt.is-pinned .pt-item.is-on {
        visibility: visible;
    }

    .pt.is-pinned .pt-dots {
        display: none;
    }

    .pt.is-pinned .pt-steps {
        display: block;
        position: relative;
        padding-left: 22px;
    }

    .pt.is-pinned .pt-steps::before {
        content: '';
        position: absolute;
        top: 6px;
        bottom: 6px;
        left: 3px;
        width: 2px;
        border-radius: 2px;
        background: var(--line);
    }

    .pt.is-pinned .pt-step {
        position: relative;
        margin: 0;
        visibility: visible;
    }

    .pt.is-pinned .pt-step + .pt-step {
        margin-top: 4px;
    }

    .pt.is-pinned .pt-tab {
        min-height: 40px;
        padding: 6px 0;
        color: var(--muted);
        transition: color 0.3s var(--ease);
    }

    .pt.is-pinned .pt-step.is-on .pt-tab {
        color: var(--ink);
    }

    .pt.is-pinned .pt-tick {
        display: block;
        position: absolute;
        top: 16px;
        left: -23px;
        width: 10px;
        height: 10px;
        border: 2px solid var(--line-2);
        background: var(--bg);
        transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease), transform 0.3s var(--ease);
    }

    .pt.is-pinned .pt-step.is-on .pt-tick {
        border-color: var(--brand);
        background: var(--brand);
        transform: scale(1.25);
    }

    .pt.is-pinned .pt-desc {
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 0.4s var(--ease);
    }

    .pt.is-pinned .pt-desc > p {
        min-height: 0;
        margin: 0;
        overflow: hidden;
        visibility: hidden;
        transition: visibility 0s linear 0.4s;
    }

    .pt.is-pinned .pt-step.is-on .pt-desc {
        grid-template-rows: 1fr;
    }

    .pt.is-pinned .pt-step.is-on .pt-desc > p {
        padding-bottom: 8px;
        visibility: visible;
        transition-delay: 0s;
    }

    .pt.is-pinned .pt-head h2 {
        font-size: clamp(1.7rem, 2.6vw, 2.4rem);
    }

    .pt.is-pinned .pt-head p {
        font-size: 1rem;
    }

    @media (hover: hover) and (pointer: fine) {
        .pt.is-pinned .pt-tab:hover {
            color: var(--ink);
        }
    }
}

@media (max-width: 960px) {
    .pt-shot {
        aspect-ratio: 4 / 3;
    }

    .pt-shot .ps-img {
        object-position: 100% 0;
    }

    .pt-dots {
        margin-top: 8px;
    }

    .pt.is-js .pt-steps {
        margin-top: -4px;
    }

    .pt-step h3 {
        font-size: 1.05rem;
    }

    .pt-desc p {
        font-size: 0.95rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pt-dots button::before,
    .pt-tab,
    .pt-tick,
    .pt-desc {
        transition: none;
    }
}

.pt:has(+ .pt-incl) {
    padding-bottom: clamp(28px, 4vw, 44px);
}

.pt-incl {
    padding-block: 0 clamp(44px, 6vw, 72px);
    background: var(--bg);
}

.pt-incl-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 28px;
    margin-bottom: 14px;
}

.pt-incl-head h2 {
    max-width: 44ch;
    font-size: clamp(1.1rem, 1.7vw, 1.3rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

.pt-incl-head .link-more {
    flex: none;
    font-size: 0.95rem;
}

.pt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pt-chip {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px 0 10px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-2);
    font: 500 0.9rem/1 var(--body);
    white-space: nowrap;
}

.pt-chip-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 18px;
    height: 18px;
    color: var(--brand);
}

.pt-chip-icon svg {
    width: 18px;
    height: 18px;
}

.pt-chips:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 4px;
    border-radius: 8px;
}

@media (max-width: 760px) {
    .pt-chips {
        flex-wrap: nowrap;
        margin-inline: calc(var(--gutter) * -1);
        padding: 2px var(--gutter);
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
        scroll-padding-inline: var(--gutter);
        scrollbar-width: none;
    }

    .pt-chips::-webkit-scrollbar {
        display: none;
    }

    .pt-chip {
        scroll-snap-align: start;
    }
}
