/* Quotation rail (spec p.16): a white card on cream (cream secondary on white), with counter, dots and arrows. */

.ss-quotes {
    --ss-quotes-ground: var(--ss-white);

    position: relative;
    padding: var(--ss-space-4) var(--ss-space-4) var(--ss-space-3);
    border: 1px solid var(--ss-hairline);
    border-radius: var(--ss-radius-card);
    background: var(--ss-quotes-ground);
}

.ss-sheet--white .ss-quotes {
    --ss-quotes-ground: var(--ss-cream-secondary);
}

.ss-quotes__mark {
    display: block;
    height: 0.6em;
    color: var(--ss-gold);
    font-size: 3rem;
    font-weight: var(--ss-weight-light);
    line-height: 1;
}

/* Native horizontal scrolling with snap points, so phones swipe without a script. */
.ss-quotes__track {
    display: grid;
    grid-auto-columns: 100%;
    grid-auto-flow: column;
    margin-top: var(--ss-space-2);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.ss-quotes__track::-webkit-scrollbar {
    display: none;
}

.ss-quotes__track:focus-visible {
    outline-offset: 8px;
}

.ss-quotes__slide {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.ss-quotes__slide .ss-quote {
    margin: 0;
}

.ss-quotes__slide .ss-quote p {
    font-size: var(--ss-quote-size);
    font-weight: var(--ss-weight-light);
    line-height: var(--ss-quote-leading);
    letter-spacing: var(--ss-quote-tracking);
}

.ss-quotes__citation {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: var(--ss-space-3);
    color: var(--ss-caption);
    font-size: 0.8125rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.ss-quotes__citation::before {
    content: "";
    width: 24px;
    height: 1px;
    background: var(--ss-gold);
}

.ss-quotes__controls {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-top: var(--ss-space-3);
    padding-top: var(--ss-space-2);
    border-top: 1px solid var(--ss-hairline);
}

.ss-quotes__counter {
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
}

.ss-quotes__counter span {
    font-weight: var(--ss-weight-medium);
}

.ss-quotes__dots {
    display: flex;
    gap: 4px;
}

.ss-quotes__dot {
    width: 16px;
    height: 24px;
    padding: 0;
    border: 0;
    background: linear-gradient(var(--ss-gold), var(--ss-gold)) center / 100% 2px no-repeat;
    cursor: pointer;
    transition: background-size var(--ss-duration-hover) var(--ss-ease);
}

.ss-quotes__dot[aria-current="true"] {
    background-image: linear-gradient(var(--ss-maroon), var(--ss-maroon));
}

.ss-quotes__arrows {
    display: flex;
    justify-content: flex-end;
    gap: var(--ss-space-1);
}

/* Timeline rail (spec p.36): a gold axis with a rosewood dot per point, over square cards, four per view. */
.ss-timeline__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--ss-space-3);
}

.ss-timeline__head .ss-section-head {
    margin-bottom: 0;
}

.ss-timeline__controls:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ss-timeline__counter {
    margin: 0 8px 0 0;
    color: var(--ss-caption);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
}

.ss-timeline__current {
    color: var(--ss-text);
    font-weight: var(--ss-weight-medium);
}

.ss-timeline__rail {
    --ss-timeline-gap: var(--ss-space-3);
    --ss-timeline-card: calc((100% - 3 * var(--ss-timeline-gap)) / 4);

    position: relative;
    display: flex;
    gap: var(--ss-timeline-gap);
    margin: var(--ss-space-5) 0 calc(-1 * var(--ss-space-5));
    padding: 0 0 var(--ss-space-5);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    list-style: none;
}

.ss-timeline__rail::-webkit-scrollbar {
    display: none;
}

.ss-timeline__point {
    position: relative;
    flex: 0 0 var(--ss-timeline-card);
    padding-top: 28px;
    scroll-snap-align: start;
    transition: flex-basis 0.5s var(--ss-ease);
}

.ss-timeline__point:has(> [open]) {
    flex-basis: calc(2 * var(--ss-timeline-card) + var(--ss-timeline-gap));
}

.ss-timeline__point::before {
    content: "";
    position: absolute;
    top: 4px;
    right: calc(-1 * var(--ss-timeline-gap));
    left: 0;
    height: 1px;
    background: var(--ss-hairline);
}

.ss-timeline__point:last-child::before {
    right: 0;
}

.ss-timeline__point::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 9px;
    height: 9px;
    border: 1.5px solid var(--ss-maroon);
    border-radius: 50%;
    background: var(--ss-white);
    transition: background-color var(--ss-duration-hover) var(--ss-ease);
}

.ss-timeline__point.is-reached::after {
    background: var(--ss-maroon);
}

@media (max-width: 900px) {
    .ss-timeline__rail {
        --ss-timeline-card: calc((100% - var(--ss-timeline-gap)) / 2.3);
    }
}

@media (max-width: 767px) {
    .ss-timeline__rail {
        --ss-timeline-gap: var(--ss-space-2);
        --ss-timeline-card: 74%;
    }

    .ss-timeline__point:has(> [open]) {
        flex-basis: 86%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ss-timeline__point {
        transition: none;
    }
}

