.pricing-reference {
    --pricing-brand: #6737b0;
    --pricing-brand-soft: #f3eefb;
    --pricing-border: #e5e1eb;
    --pricing-ink: #201c27;
    --pricing-muted: #716b78;
    margin-top: -42px;
    padding: 12px 0 88px;
    /* No surface of its own: the app's grey ground shows through so the white that remains
       reads as the table card rather than the page. */
    color: var(--pricing-ink);
}

.pricing-shell {
    display: grid;
    grid-template-columns: 224px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

.pricing-sidebar {
    position: sticky;
    top: 92px;
    display: flex;
    flex-direction: column;
    padding-top: 14px;
}

.pricing-index {
    display: flex;
    flex-direction: column;
}

/* Compact index, matching the /terms-conditions "on this page" rail. */
.pricing-toc-title {
    margin: 0 0 8px;
    padding-left: 14px;
    color: var(--pricing-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.pricing-toc-link {
    width: 100%;
    padding: 6px 0 6px 14px;
    border: 0;
    border-left: 2px solid var(--pricing-border);
    border-radius: 0;
    background: transparent;
    color: var(--pricing-muted);
    font-size: 13px;
    line-height: 1.45;
    text-align: left;
}

.pricing-toc-link:hover {
    border-left-color: #d9cbf0;
    background: transparent;
    color: var(--pricing-ink);
}

.pricing-toc-link.is-active {
    border-left-color: var(--pricing-brand);
    background: transparent;
    color: var(--pricing-brand);
    font-weight: 600;
}

/* Artwork tracks are the phone/tablet index; desktop keeps the text index above. */
.pricing-track-rail {
    display: none;
}

.pricing-toc-group + .pricing-toc-group {
    margin-top: 20px;
}

.pricing-provider-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--pricing-border);
    border-radius: 8px;
    background: #fff;
    color: var(--pricing-ink);
    font-size: 13px;
    font-weight: 700;
}

.pricing-provider-toggle img,
.pricing-provider-option img {
    width: 44px;
    height: 18px;
    object-fit: contain;
    object-position: center;
}

/* The expanded company name stays on one line; a narrow phone ellipsises it. */
.pricing-provider-toggle > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pricing-provider-toggle::after {
    flex: 0 0 auto;
    margin-left: auto;
}

.pricing-provider-dropdown .dropdown-menu {
    min-width: 300px;
    padding: 6px;
}

.pricing-provider-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    border-radius: 5px;
    font-size: 13px;
    white-space: nowrap;
}

.pricing-provider-option.active,
.pricing-provider-option:active {
    background: var(--pricing-brand-soft);
    color: var(--pricing-brand);
}

.pricing-table-note {
    margin-left: auto;
    color: var(--pricing-muted);
    font-size: 12px;
}

.pricing-autograph-toggle {
    display: flex;
    gap: 6px;
    padding-bottom: 4px;
}

.pricing-autograph-toggle button {
    padding: 7px 14px;
    border: 1px solid var(--pricing-border);
    border-radius: 999px;
    background: #fff;
    color: #514a58;
    font-size: 13px;
}

.pricing-autograph-toggle button.is-active {
    border-color: var(--pricing-brand);
    background: var(--pricing-brand-soft);
    color: var(--pricing-brand);
    font-weight: 700;
}

.pricing-main {
    min-width: 0;
    padding-top: 10px;
}

.pricing-reference--enterprise {
    margin-top: 0;
    padding-top: 0;
}

.pricing-reference--enterprise .pricing-sidebar,
.pricing-reference--enterprise .pricing-main {
    padding-top: 0;
}

.pricing-header {
    padding-bottom: 4px;
}

.pricing-reference--enterprise .pricing-header {
    padding-bottom: 18px;
}

.pricing-eyebrow,
.pricing-table-kicker {
    margin: 0 0 8px;
    color: var(--pricing-brand);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.pricing-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Two-line primer on the selected family and service; capped so it never runs long. */
.pricing-lede {
    width: 100%;
    max-width: none;
    margin: 10px 0 0;
    color: var(--pricing-muted);
    font-size: 12.5px;
    line-height: 1.5;
}

/* Controls sit next to each other; only the autograph toggle is pushed to the far edge,
   so an absent filter cannot leave a hole between the remaining selects. */
.pricing-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 16px;
    padding: 24px 0;
}

.pricing-toolbar label {
    min-width: 220px;
}

.pricing-toolbar .pricing-autograph-toggle {
    margin-left: auto;
}

.pricing-toolbar label > span {
    display: block;
    margin-bottom: 6px;
    color: var(--pricing-muted);
    font-size: 12px;
    font-weight: 700;
}

.pricing-toolbar-context {
    padding-bottom: 10px;
    color: var(--pricing-muted);
    font-size: 13px;
    font-weight: 700;
}

.pricing-loading,
.pricing-empty {
    padding: 28px;
    color: var(--pricing-muted);
    text-align: center;
}

.pricing-table-card {
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid var(--pricing-border);
    border-radius: 12px;
    background: #fff;
}

.pricing-table-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 14px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--pricing-border);
}

.pricing-table-heading .pricing-table-kicker {
    flex: 0 0 100%;
}

.pricing-table-heading h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.pricing-family-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pricing-family-filter button {
    padding: 5px 12px;
    border: 1px solid var(--pricing-border);
    border-radius: 999px;
    background: #fff;
    color: var(--pricing-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.pricing-family-filter button:hover {
    border-color: #b9a2dc;
    color: var(--pricing-brand);
}

.pricing-family-filter button.is-active {
    border-color: var(--pricing-brand);
    background: var(--pricing-brand-soft);
    color: var(--pricing-brand);
}

/* Sizing only — the light-grey flag outline is the app-wide `.fi` standard in main.css. */
.pricing-table-heading .fi {
    flex: 0 0 auto;
    font-size: 15px;
}

.pricing-table th {
    padding: 13px 18px;
    border-bottom-color: var(--pricing-border);
    color: var(--pricing-muted);
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.pricing-table td {
    padding: 14px 18px;
    border-bottom-color: #f0edf3;
    font-size: 14px;
}

/* Give the service name room; the numeric columns never need to wrap, so on a narrow
   viewport the table scrolls sideways instead of stacking a name over four lines. */
.pricing-table th:first-child,
.pricing-table td:first-child {
    width: 46%;
    min-width: 300px;
}

.pricing-table th:not(:first-child),
.pricing-table td:not(:first-child) {
    white-space: nowrap;
}

.pricing-service-link,
.pricing-service-link:hover,
.pricing-service-link:focus {
    color: var(--pricing-brand);
    font-weight: 700;
    text-decoration: none;
}

.pricing-table tbody tr:last-child td {
    border-bottom: 0;
}

.pricing-row-meta {
    margin-top: 3px;
    color: var(--pricing-muted);
    font-size: 11px;
}

.pricing-footnote {
    margin: 28px 0 0;
    color: var(--pricing-muted);
    font-size: 12px;
    line-height: 1.6;
}

@media (max-width: 1199.98px) {
    .pricing-shell {
        grid-template-columns: 200px minmax(0, 1fr);
        column-gap: 28px;
    }
}

/* The index stays on-screen here, but as two artwork/chip tracks above the tables:
   a stacked text index pushed the prices themselves off a phone screen. */
@media (max-width: 991.98px) {
    .pricing-reference {
        padding-top: 8px;
    }

    .pricing-shell {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .pricing-sidebar {
        position: static;
        padding: 0 0 16px;
        border-bottom: 1px solid var(--pricing-border);
    }

    .pricing-index {
        display: none;
    }

    .pricing-track-rail {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    /* Each track scrolls sideways on its own, so a long catalog never wraps into
       a wall of chips between the customer and the prices. */
    .pricing-track {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }

    .pricing-track-item,
    .pricing-track-chip {
        flex: 0 0 auto;
        border: 1px solid var(--pricing-border);
        background: #fff;
        scroll-snap-align: start;
        cursor: pointer;
    }

    .pricing-track-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        width: 96px;
        padding: 10px 8px;
        border-radius: 12px;
        color: var(--pricing-ink);
        font-size: 11px;
        font-weight: 700;
        line-height: 1.3;
        text-align: center;
    }

    .pricing-track-item.is-active {
        border-color: var(--pricing-brand);
        background: var(--pricing-brand-soft);
        color: var(--pricing-brand);
    }

    .pricing-track-art {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 100%;
        min-height: 64px;
    }

    .pricing-track-art img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 64px;
        object-fit: contain;
    }

    .pricing-track-art.is-pair img {
        max-width: calc(50% - 3px);
    }

    .pricing-track-chip {
        padding: 7px 14px;
        border-radius: 999px;
        color: var(--pricing-muted);
        font-size: 12.5px;
        font-weight: 700;
        white-space: nowrap;
    }

    .pricing-track-chip.is-active {
        border-color: var(--pricing-brand);
        background: var(--pricing-brand-soft);
        color: var(--pricing-brand);
    }

    .pricing-main {
        padding-top: 16px;
    }

    /* The enterprise modifier removes desktop top padding, but on a stacked layout
       the divider between the tracks and heading needs equal breathing room below. */
    .pricing-reference--enterprise .pricing-main {
        padding-top: 16px;
    }
}

@media (max-width: 575.98px) {
    .pricing-reference {
        padding-bottom: 56px;
    }

    .pricing-shell {
        padding: 0 14px;
    }

    .pricing-provider-dropdown .dropdown-menu {
        min-width: min(300px, calc(100vw - 28px));
    }

    .pricing-toolbar {
        align-items: stretch;
    }

    .pricing-toolbar label {
        width: 100%;
    }

    /* Stacked controls read as a single left-aligned column, so nothing gets pushed away. */
    .pricing-toolbar .pricing-autograph-toggle {
        margin-left: 0;
    }

    .pricing-table-heading {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .pricing-table th,
    .pricing-table td {
        padding: 12px 14px;
    }
}
