/* ───────── Core 30 service pages (handler/servicepage) ─────────
   Only what the shared blocks lack: breadcrumbs, the hero, prose, the cost
   card and spacing. Cards, FAQs and case studies reuse service-cards,
   faq-accordion and portfolio. */

/* Breadcrumbs, with the eyebrow beside them after a hairline. The eyebrow is
   a sibling of the breadcrumb nav, not a crumb. */
.sp-hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin: 0 0 24px;
    font-size: 13px;
}

.sp-hero-meta .sp-crumbs ol {
    margin: 0;
}

.sp-hero-kicker {
    margin: 0 0 0 12px;
    padding-left: 12px;
    border-left: 1px solid var(--border);
    color: var(--text-secondary);
    line-height: 1.2;
}

/* Phones: the eyebrow drops under the crumbs and loses the hairline */
@media (max-width: 599px) {
    .sp-hero-meta {
        flex-direction: column;
        gap: 6px;
    }

    .sp-hero-kicker {
        margin: 0;
        padding: 0;
        border: 0;
    }

    .sp-hero--split .sp-hero-meta {
        align-items: flex-start;
    }
}

.sp-crumbs ol {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: var(--text-muted);
}

.sp-crumbs li + li::before {
    content: "›";
    margin-right: 6px;
    color: var(--text-muted);
}

.sp-crumbs a {
    color: var(--text-secondary);
    text-decoration: none;
}

.sp-crumbs a:hover {
    color: var(--accent-purple);
}

.sp-crumbs [aria-current="page"] {
    color: var(--text-primary);
}

/* Hero CTAs + trust strip */
.sp-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
}

.sp-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: var(--text-secondary);
}

.sp-trust strong {
    color: var(--text-primary);
    font-weight: 600;
}

.sp-trust a {
    color: inherit;
    text-decoration: none;
}

.sp-trust a:hover {
    color: var(--text-primary);
}

.sp-stars {
    color: var(--star-gold);
    letter-spacing: 1px;
}

/* Split hero (Page.HeroGrid): copy left, a real geo-grid scan right */
.sp-hero--split {
    text-align: left;
}

/* The copy leads; the proof column is capped so the page isn't right-heavy */
.sp-hero-split {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 460px);
    gap: 64px;
    align-items: center;
}

.sp-hero--split .sp-crumbs ol,
.sp-hero--split .sp-hero-meta,
.sp-hero--split .sp-hero-actions,
.sp-hero--split .sp-trust {
    justify-content: flex-start;
}

.sp-hero--split h1.page-title {
    margin-left: 0;
}

/* Side by side the copy column is narrower, so the H1 steps down */
@media (min-width: 961px) {
    .sp-hero--split h1.page-title {
        font-size: clamp(2.4rem, 5vw, 4.25rem);
        line-height: 1.02;
    }
}

.sp-hero--split .page-lead {
    margin-left: 0;
}

.sp-underline {
    text-decoration: underline;
    text-decoration-color: var(--accent-purple);
    text-decoration-thickness: 0.075em;
    text-underline-offset: 0.14em;
    text-decoration-skip-ink: none;
}

.sp-grid-panel {
    margin: 0;
    padding: 20px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow:
        0 1px 1px rgba(5, 0, 12, 0.4),
        0 8px 24px rgba(5, 0, 12, 0.45),
        0 24px 48px rgba(5, 0, 12, 0.35);
}

.sp-grid-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px 16px;
    margin: 0 0 16px;
}

.sp-grid-head strong {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.sp-grid-head span {
    font-size: 13px;
    color: var(--text-muted);
}

/* The map screenshot (Page.HeroGrid.Image), framed like a panel inset.
   The hairline sits on top of the image via box-shadow inset on ::after. */
.sp-grid-map {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: var(--raised);
}

.sp-grid-map img {
    display: block;
    width: 100%;
    height: auto;
}

.sp-grid-map::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px var(--border);
    pointer-events: none;
}

/* Flip card (js/flip-card.js). Without JS (.is-ready unset) the back
   follows the front and the open/close buttons and the "tap" hint are
   hidden. */
.sp-proof:not(:has(.sp-flip.is-ready)) .sp-proof-tap {
    display: none;
}

.sp-proof-tap {
    color: var(--text-primary);
}

.sp-flip:not(.is-ready) .sp-flip-open,
.sp-flip:not(.is-ready) [data-flip-close] {
    display: none;
}

.sp-flip:not(.is-ready) .sp-flip-back {
    margin-top: 16px;
}

.sp-flip.is-ready {
    display: grid;
    perspective: 1600px;
}

/* backface-visibility alone leaks children with their own layers (the
   button showed through mirrored), so each face also swaps visibility at
   the half-way point of the turn. */
.sp-flip.is-ready > .sp-flip-front,
.sp-flip.is-ready > .sp-flip-back {
    grid-area: 1 / 1;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition:
        transform 500ms cubic-bezier(0.2, 0, 0, 1),
        visibility 0s linear 200ms;
}

.sp-flip.is-ready > .sp-flip-back {
    transform: rotateY(180deg);
    visibility: hidden;
}

.sp-flip.is-flipped > .sp-flip-front {
    transform: rotateY(-180deg);
    visibility: hidden;
}

.sp-flip.is-flipped > .sp-flip-back {
    transform: rotateY(0deg);
    visibility: visible;
}

/* Reduced motion: a quick cross-fade instead of the turn */
@media (prefers-reduced-motion: reduce) {
    .sp-flip.is-ready > .sp-flip-front,
    .sp-flip.is-ready > .sp-flip-back {
        transform: none;
        transition: opacity 150ms linear, visibility 0s linear 150ms;
    }

    .sp-flip.is-flipped > .sp-flip-back {
        transition: opacity 150ms linear, visibility 0s;
    }

    .sp-flip.is-ready > .sp-flip-back,
    .sp-flip.is-flipped > .sp-flip-front {
        opacity: 0;
    }

    .sp-flip.is-flipped > .sp-flip-back {
        opacity: 1;
    }
}

/* The whole map is the open button. */
.sp-flip-open {
    position: absolute;
    inset: 0;
    padding: 0;
    border: 0;
    border-radius: inherit;
    background: transparent;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.sp-flip-open:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: -2px;
}

/* The "tap here" hint: every 6s a hand glides in, taps the business's own
   marker (the grid is centred on it), a ring pulses out and the hand fades
   away. Opacity and transform only. Stops once the card has been turned;
   with reduced motion the hand just rests beside the marker. */
.sp-flip-hand {
    --hand: 36px;
    position: absolute;
    /* fingertip (47%, 25% of the icon) just off the marker's lower right */
    left: calc(52.5% - var(--hand) * 0.47);
    top: calc(52.5% - var(--hand) * 0.25);
    width: var(--hand);
    height: var(--hand);
    pointer-events: none;
    opacity: 0;
}

.sp-flip-hand svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: #fff;
    stroke: #1A0530;
    stroke-width: 1.4;
    paint-order: stroke;
    filter: drop-shadow(0 2px 3px rgba(5, 0, 12, 0.55));
    transform-origin: 47% 25%;
}

.sp-flip-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 9%;
    aspect-ratio: 1;
    border: 2px solid #fff;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
    .sp-flip:not(.has-flipped) .sp-flip-hand {
        animation: sp-hand-glide 6s cubic-bezier(0.3, 0, 0.2, 1) infinite;
    }
    .sp-flip:not(.has-flipped) .sp-flip-hand svg {
        animation: sp-hand-press 6s infinite;
    }
    .sp-flip:not(.has-flipped) .sp-flip-ring {
        animation: sp-hand-ring 6s ease-out infinite;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sp-flip:not(.has-flipped) .sp-flip-hand {
        opacity: 1;
    }
}

@keyframes sp-hand-glide {
    0% { transform: translate(120px, 110px); opacity: 0; }
    8% { opacity: 1; }
    28% { transform: translate(0, 0); opacity: 1; }
    55% { transform: translate(0, 0); opacity: 1; }
    68%, 100% { transform: translate(30px, 40px); opacity: 0; }
}

@keyframes sp-hand-press {
    0%, 32%, 44%, 100% { transform: scale(1); }
    38% { transform: scale(0.9); }
}

@keyframes sp-hand-ring {
    0%, 36% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
    40% { opacity: 0.9; }
    62%, 100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}

/* Smaller maps on phones: a smaller hand still fits beside the marker */
@media (max-width: 600px) {
    .sp-flip-hand {
        --hand: 28px;
    }
}

.sp-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Back of the card */
.sp-flip-back {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: 28px;
}

.sp-flip-back h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 1.2;
    color: var(--text-primary);
}

.sp-flip-back h3:focus {
    outline: none;
}

.sp-flip-back p {
    margin: 0;
    max-width: 44ch;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.sp-flip-back strong {
    color: var(--text-primary);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.sp-flip-key {
    display: grid;
    gap: 8px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14.5px;
    color: var(--text-secondary);
}

.sp-flip-key i {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 10px;
    border-radius: 50%;
    vertical-align: -1px;
}

.sp-flip-key strong {
    margin-right: 4px;
}

.sp-flip.is-ready > .sp-flip-back {
    cursor: pointer;
}

/* The back turns over on a click anywhere (js/flip-card.js); this button
   is the keyboard way back and says so for pointers. */
.sp-flip-back-cue {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin: -4px 0 -12px;
    padding: 0;
    border: 0;
    background: none;
    font: 500 14px var(--font-heading);
    color: var(--text-muted);
    cursor: pointer;
}

.sp-flip-back-cue svg {
    flex: none;
}

.sp-flip-back:hover .sp-flip-back-cue,
.sp-flip-back-cue:focus-visible {
    color: var(--text-primary);
}

.sp-flip-back-cue:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 3px;
    border-radius: 6px;
}

/* Legend swatches: the admin geo-grid's rank bands (admin-geogrid.css) */
.sp-lg-top3 { background: var(--rank-top3); }
.sp-lg-top10 { background: var(--rank-top10); }
.sp-lg-top20 { background: var(--rank-top20); }
.sp-lg-none { background: var(--rank-none); }

.sp-grid-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: var(--text-secondary);
}

.sp-grid-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border-radius: 50%;
    vertical-align: -1px;
}

.sp-grid-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 14px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}

.sp-grid-foot strong {
    color: var(--text-primary);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* The padding grows the hit area to 44px without moving the layout */
.sp-grid-foot a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 0;
    margin: -12px 0;
    color: var(--accent-purple);
    text-decoration: none;
}

.sp-grid-foot a svg {
    flex: none;
}

.sp-grid-foot a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 960px) {
    .sp-hero-split {
        grid-template-columns: minmax(0, 1fr);
        gap: 48px;
    }

    /* Stacked, the card keeps a readable width instead of a wide empty map */
    .sp-flip {
        max-width: 480px;
    }
}

@media (max-width: 480px) {
    .sp-grid-panel {
        padding: 16px;
    }
}

/* Body copy */
.sp-section {
    padding: 72px 0;
}

.sp-section .section-head {
    margin-bottom: 28px;
}

.sp-prose {
    max-width: 72ch;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.75;
}

.sp-prose p {
    margin: 0 0 18px;
    max-width: none;
}

.sp-prose h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.2rem;
    margin: 28px 0 10px;
}

.sp-prose a {
    color: var(--accent-purple);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.sp-prose a:hover {
    color: var(--accent-pink);
}

.sp-prose strong {
    color: var(--text-primary);
    font-weight: 500;
}

.sp-prose ul,
.sp-prose ol {
    padding-left: 1.4em;
    margin: 0 0 18px;
}

.sp-prose ul li {
    list-style: disc;
    margin-bottom: 8px;
}

.sp-prose ol li {
    list-style: decimal;
    margin-bottom: 6px;
}

.sp-prose > :last-child {
    margin-bottom: 0;
}

/* Copy sections (section templ) stack: heading and short intro on top,
   then the copy. Its lists, and the "why" points, run in two columns on
   desktop so the width is used and the section stays short. */
.sp-stack > * + * {
    margin-top: 32px;
}

.sp-stack-head .section-head,
.sp-stack-head .section-head .left > :last-child {
    margin-bottom: 0;
}

/* Stacked headings may use the full width (the site-wide cap is 640px),
   so "What SEO problems are you facing?" doesn't strand its last word */
.sp-stack-head .section-head .left {
    max-width: 960px;
}

.sp-stack-head .section-title {
    text-wrap: balance;
}

.sp-intro {
    margin: 16px 0 0;
    max-width: 64ch;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    text-wrap: pretty;
}

.sp-stack .sp-prose {
    max-width: none;
}

.sp-stack .sp-prose p {
    max-width: 72ch;
}

.sp-stack .catalog-next {
    max-width: 760px;
}

@media (min-width: 961px) {
    .sp-stack .sp-prose ul,
    .sp-stack .sp-prose ol {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 64px;
        margin-bottom: 28px;
    }

    .sp-stack .sp-prose li {
        margin-bottom: 0;
    }

    .sp-stack .point-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 64px;
    }

    .sp-stack .point-list li {
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
    }
}

/* Phone showcase (showcaseSection): one tinted card with the first point
   on the left and a tilted components.SearchPhone with its notes on the
   right, then the other points as plain cards. Under 1100px the card
   stacks; under 960px the phone goes flat and the notes list below it. */
.sp-showcase {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 48px;
    align-items: center;
    padding: 56px;
    overflow: hidden;
    border: 1px solid var(--accent-line);
    border-radius: 28px;
    background: linear-gradient(160deg, rgba(180, 124, 253, 0.16), rgba(255, 127, 194, 0.05) 55%, rgba(255, 255, 255, 0.02));
}

.sp-showcase-lead h3 {
    margin: 0 0 20px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: clamp(1.8rem, 2.8vw, 2.4rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    text-wrap: balance;
}

.sp-showcase-label {
    margin: 0 0 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: var(--accent-purple);
}

.sp-showcase-fix {
    margin: 0;
    max-width: 40ch;
    font-size: 1.125rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

.sp-phone-stage {
    position: relative;
    width: 100%;
    max-width: 660px;
    height: 860px;
    margin: 0 auto;
}

/* Soft glow behind the phone */
.sp-phone-stage::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 520px;
    height: 520px;
    max-width: 100%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(180, 124, 253, 0.35), rgba(255, 127, 194, 0.12) 45%, transparent 70%);
    filter: blur(10px);
    pointer-events: none;
}

.sp-phone-tilt {
    position: absolute;
    top: 30px;
    left: calc(50% - 180px);
    transform: perspective(1800px) rotateY(-20deg) rotateX(8deg) rotate(4deg);
}

.sp-phone-notes {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sp-phone-note {
    position: absolute;
    z-index: 2;
    width: 230px;
    padding: 16px 18px;
    border: 1px solid var(--accent-line);
    border-radius: 18px;
    background: rgba(21, 10, 42, 0.88);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.sp-phone-note strong {
    display: block;
    margin-bottom: 4px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.sp-phone-note-1 { left: 0; top: 230px; }
.sp-phone-note-2 { right: 0; top: 420px; }
.sp-phone-note-3 { left: 0; bottom: 60px; width: 250px; }

.sp-showcase-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sp-stack > .sp-showcase + .sp-showcase-cards {
    margin-top: 20px;
}

.sp-showcase-cards li {
    padding: 28px 30px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
}

.sp-showcase-cards h3 {
    margin: 0 0 10px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1.3;
    color: var(--text-primary);
}

.sp-showcase-cards p {
    margin: 0;
    font-size: 0.97rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

@media (max-width: 1100px) {
    .sp-showcase {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 960px) {
    .sp-showcase {
        gap: 32px;
        padding: 32px 20px;
        border-radius: 22px;
    }

    .sp-phone-stage {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        height: auto;
    }

    .sp-phone-stage::before {
        top: 280px;
        width: 360px;
        height: 360px;
    }

    /* Flat phone at 80%: the wrapper takes the scaled size */
    .sp-phone-tilt {
        position: relative;
        top: auto;
        left: auto;
        width: 288px;
        height: 624px;
        transform: none;
    }

    .sp-phone-tilt .sph {
        transform: scale(0.8);
        transform-origin: top left;
    }

    .sp-phone-notes {
        display: grid;
        gap: 12px;
        width: 100%;
        max-width: 420px;
    }

    .sp-phone-note {
        position: relative;
        inset: auto;
        width: auto;
    }

    .sp-phone-note-3 {
        width: auto;
    }

    .sp-showcase-cards {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Card grids and the next-step row after the copy. (.sp-cards was never
   rendered: CatalogCards outputs .services or .catalog-next.) */
.sp-prose + .services,
.sp-prose + .catalog-next {
    margin-top: 32px;
}

/* Service-page FAQs sit in the split's right column, not centred
   (/faq and /pricing keep the centred list) */
.sp-faq .faq-list {
    max-width: none;
    margin: 0;
}

/* Hub child cards after a heading-and-points split */
.split + .services,
.split + .catalog-next {
    margin-top: 56px;
}

.sp-related .services,
.sp-related .catalog-next {
    margin-top: 0;
}

/* Cost card (costSection): one full-width card, copy and buttons left,
   plan rows (or the plain "from" price) right. A faint purple tint and
   border, no gradient wash or glow. */
.cost-card {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 64px;
    align-items: start;
    padding: 56px;
    border-radius: 16px;
    background: var(--accent-tint-subtle);
    border: 1px solid var(--accent-line);
}

.cost-lead .section-head {
    margin-bottom: 20px;
}

.cost-lead .section-head .left > :last-child {
    margin-bottom: 0;
}

.cost-lead .sp-prose {
    font-size: 1rem;
}

.cost-terms {
    margin: 20px 0 0;
    max-width: 60ch;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

.cost-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.cost-plans {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cost-plans li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 24px;
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
}

.cost-plans li:first-child {
    padding-top: 0;
}

.cost-plans li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.cost-plans h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.3;
    color: var(--text-primary);
}

.cost-pick {
    margin-left: 10px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 13px;
    color: var(--accent-text);
    vertical-align: 2px;
}

.cost-price {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.375rem;
    line-height: 1.2;
    color: var(--text-primary);
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.cost-price small {
    margin-left: 2px;
    font-family: inherit;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-muted);
}

.cost-plans p {
    grid-column: 1 / -1;
    margin: 0;
    max-width: 62ch;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* No tiers: the "from" price stated plainly, no inner box */
.cost-from-label {
    margin: 0 0 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
}

.cost-price--big {
    font-weight: 700;
    font-size: clamp(2.75rem, 5vw, 4rem);
    line-height: 1;
    letter-spacing: -0.03em;
    text-align: left;
}

.cost-price--big small {
    font-size: 18px;
    letter-spacing: 0;
}

.cost-facts {
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--border);
}

.cost-facts li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    color: var(--text-secondary);
}

.cost-facts strong {
    margin-right: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 960px) {
    .cost-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
        padding: 40px;
    }
}

/* Phones: the plans come before the buttons */
@media (max-width: 600px) {
    .cost-card {
        gap: 0;
        padding: 24px 20px;
    }

    .cost-lead {
        display: contents;
    }

    .cost-plans,
    .cost-from {
        order: 5;
        margin-top: 28px;
    }

    .cost-actions {
        order: 9;
    }

    .cost-plans li {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

    .cost-plans .cost-price {
        text-align: left;
    }

    .cost-pick {
        display: block;
        margin: 4px 0 0;
        line-height: 1.35;
    }
}

/* Case studies: one or two cards, equal width */
.sp-work .work-grid {
    grid-template-columns: repeat(2, 1fr);
}

.sp-work .work-grid > :only-child {
    max-width: 640px;
}

@media (max-width: 720px) {
    .sp-section {
        padding: 56px 0;
    }

    .sp-work .work-grid {
        grid-template-columns: 1fr;
    }
}
