.sph-section,
.sph-section * {
    box-sizing: border-box;
}

.sph-section {
    --sph-primary: #872844;
    --sph-primary-dark: #63172f;
    --sph-primary-soft: #f8edf1;
    --sph-primary-softer: #fff8fa;
    --sph-accent: #d7a24a;
    --sph-text: #28232a;
    --sph-muted: #746d73;
    --sph-border: #eadde2;
    position: relative;
    width: 100%;
    padding: clamp(28px, 4vw, 52px);
    border: 1px solid var(--sph-border);
    border-radius: 28px;
    background:
        radial-gradient(circle at 8% 6%, rgba(135, 40, 68, .08), transparent 24%),
        linear-gradient(145deg, #fff 0%, #fff 72%, #fcf7f9 100%);
    box-shadow: 0 18px 55px rgba(70, 25, 40, .08);
    overflow: hidden;
    font-family: inherit;
}

.sph-section::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 170px;
    height: 5px;
    border-radius: 0 0 0 10px;
    background: linear-gradient(90deg, var(--sph-primary), var(--sph-accent));
}

.sph-section__header {
    max-width: 820px;
    margin: 0 auto 32px;
    text-align: center;
}

.sph-section__eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 5px 14px;
    margin-bottom: 10px;
    border: 1px solid rgba(135, 40, 68, .14);
    border-radius: 999px;
    background: var(--sph-primary-soft);
    color: var(--sph-primary);
    font-size: 13px;
    font-weight: 700;
}

.sph-section__title {
    margin: 0;
    color: var(--sph-primary-dark);
    font-size: clamp(23px, 3vw, 34px);
    line-height: 1.55;
    font-weight: 900;
}

.sph-section__subtitle {
    margin: 9px 0 0;
    color: var(--sph-muted);
    font-size: 15px;
    line-height: 1.95;
}

/* Desktop: 2 columns × 4 rows for eight features. */
.sph-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.sph-card {
    position: relative;
    min-width: 0;
    min-height: 178px;
    padding: 20px 22px;
    border: 1px solid var(--sph-border);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,248,250,.92));
    box-shadow: 0 9px 28px rgba(59, 24, 37, .055);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    overflow: hidden;
}

.sph-card::after {
    content: "";
    position: absolute;
    left: -34px;
    bottom: -42px;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: rgba(135, 40, 68, .035);
}

.sph-card:hover {
    transform: translateY(-4px);
    border-color: rgba(135, 40, 68, .26);
    box-shadow: 0 15px 36px rgba(59, 24, 37, .105);
}

.sph-card__top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 17px;
}

.sph-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--sph-primary-soft);
    color: var(--sph-primary);
}

.sph-card__icon svg,
.sph-visual__icon svg {
    width: 23px;
    height: 23px;
    fill: currentColor;
}

.sph-card__title {
    margin: 0;
    color: var(--sph-text);
    font-size: 16px;
    line-height: 1.7;
    font-weight: 900;
}

.sph-card__body {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

/* Unified circular visual for both rated and text-based features. */
.sph-visual {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    color: var(--sph-primary-dark);
    isolation: isolate;
}

.sph-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        radial-gradient(circle at center, #fff 57%, transparent 59%),
        conic-gradient(var(--sph-primary) var(--sph-score, 100%), #eadfe3 0);
    box-shadow: inset 0 0 0 1px rgba(135, 40, 68, .06), 0 6px 18px rgba(99, 23, 47, .08);
    z-index: -1;
}

.sph-visual--text::before {
    background:
        radial-gradient(circle at center, #fff 57%, transparent 59%),
        repeating-conic-gradient(from -8deg, var(--sph-primary) 0 18deg, #eadfe3 18deg 28deg);
}

.sph-visual__score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    direction: ltr;
}

.sph-visual__number {
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
}

.sph-visual__max {
    font-size: 12px;
    font-weight: 900;
}

.sph-visual__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--sph-primary-soft);
    color: var(--sph-primary);
}

.sph-card__copy {
    min-width: 0;
}

.sph-card__main-value {
    display: block;
    margin: 0 0 7px;
    color: var(--sph-primary-dark);
    font-size: 18px;
    line-height: 1.75;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.sph-card__description {
    display: block;
    margin: 0;
    color: var(--sph-muted);
    font-size: 13px;
    line-height: 1.9;
}

.sph-empty-admin {
    padding: 16px 18px;
    border: 1px dashed #cfa8b5;
    border-radius: 14px;
    background: #fff7fa;
    color: #7c2944;
    text-align: center;
}

@media (max-width: 767px) {
    .sph-section {
        padding: 25px 14px;
        border-radius: 20px;
    }

    .sph-section__header {
        margin-bottom: 22px;
    }

    .sph-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .sph-card {
        min-height: 0;
        padding: 17px;
        border-radius: 18px;
    }

    .sph-card__top {
        margin-bottom: 14px;
    }

    .sph-card__body {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 14px;
    }

    .sph-visual {
        width: 76px;
        height: 76px;
    }

    .sph-card__main-value {
        font-size: 16px;
    }
}

@media (max-width: 380px) {
    .sph-card__body {
        grid-template-columns: 68px minmax(0, 1fr);
        gap: 11px;
    }

    .sph-visual {
        width: 66px;
        height: 66px;
    }
}

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