:root {
    --ink: #18130f;
    --muted: #766d66;
    --line: rgba(24, 19, 15, 0.1);
    --red: #f02525;
    --orange: #ff7a2f;
    --yellow: #ffd13d;
    --teal: #00a6a6;
    --blue: #355cff;
    --pink: #ff4f91;
    --green: #34a853;
    --surface: rgba(255, 255, 255, 0.86);
    --shadow: 0 22px 56px rgba(64, 35, 18, 0.15);
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    margin: 0;
    color: var(--ink);
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background:
        linear-gradient(120deg, rgba(240, 37, 37, 0.14), transparent 34%),
        linear-gradient(220deg, rgba(53, 92, 255, 0.14), transparent 36%),
        linear-gradient(135deg, #fff8ea 0%, #f4fff8 47%, #fff5fb 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(24, 19, 15, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 19, 15, 0.045) 1px, transparent 1px);
    background-size: 34px 34px;
}

a,
a:hover,
a:focus,
a:focus-visible {
    color: inherit;
    text-decoration: none;
}

.benefits-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 58px;
}

.benefits-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
    gap: 26px;
    align-items: stretch;
    min-height: 330px;
    margin: 16px 0 22px;
    padding: clamp(24px, 4vw, 44px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72)),
        linear-gradient(135deg, rgba(240, 37, 37, 0.18), rgba(255, 209, 61, 0.24), rgba(0, 166, 166, 0.18));
    box-shadow: var(--shadow);
}

.benefits-hero__copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.back-link {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 12px;
    border: 1px solid rgba(240, 37, 37, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    color: var(--red);
    font-size: 0.86rem;
    font-weight: 900;
}

.benefits-hero__kicker,
.benefits-section-kicker {
    margin: 0 0 10px;
    color: var(--red);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.benefits-hero h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 5rem);
    line-height: 0.98;
    font-weight: 950;
}

.benefits-hero__summary {
    max-width: 720px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.6vw, 1.14rem);
    line-height: 1.75;
}

.benefits-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.benefits-hero__stats span {
    padding: 8px 12px;
    border: 1px solid rgba(24, 19, 15, 0.08);
    border-radius: 999px;
    background: #fff;
    color: #3b312c;
    font-size: 0.86rem;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(64, 35, 18, 0.08);
}

.benefits-hero__showcase {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.benefits-hero__showcase span {
    display: grid;
    min-height: 86px;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    font-weight: 950;
    box-shadow: 0 14px 28px rgba(64, 35, 18, 0.14);
}

.benefits-hero__showcase span:nth-child(1) { background: linear-gradient(135deg, var(--red), var(--orange)); }
.benefits-hero__showcase span:nth-child(2) { background: linear-gradient(135deg, var(--blue), var(--teal)); }
.benefits-hero__showcase span:nth-child(3) { background: linear-gradient(135deg, var(--pink), var(--orange)); }
.benefits-hero__showcase span:nth-child(4) { background: linear-gradient(135deg, var(--green), var(--teal)); }
.benefits-hero__showcase span:nth-child(5) {
    grid-column: 1 / -1;
    min-height: 74px;
    background: linear-gradient(135deg, #18130f, var(--red));
}

.benefit-featured,
.benefits-board,
#friend-links {
    margin-top: 22px;
}

.benefit-featured,
.benefits-board {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: 0 12px 34px rgba(64, 35, 18, 0.08);
}

.benefit-featured h2,
.benefits-board h2,
#friend-links h3 {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    font-weight: 950;
}

.featured-benefits {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.featured-card {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 104px;
    padding: 12px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.66));
    box-shadow: 0 12px 26px rgba(64, 35, 18, 0.08);
}

.featured-card img {
    grid-row: 1 / 3;
    width: 70px;
    height: 70px;
    padding: 8px;
    object-fit: contain;
    border-radius: 16px;
    background: #fff;
}

.featured-card span {
    color: var(--red);
    font-size: 0.76rem;
    font-weight: 950;
}

.featured-card strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.94rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.benefits-board__head,
.benefit-group__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.benefit-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.benefit-filters button {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #3b312c;
    cursor: pointer;
    font-weight: 900;
}

.benefit-filters button.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: #fff;
}

.benefit-groups {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.benefit-group {
    padding-top: 18px;
    border-top: 1px dashed rgba(24, 19, 15, 0.16);
}

.benefit-group__head p {
    margin: 0 0 8px;
    color: var(--teal);
    font-size: 0.74rem;
    font-weight: 950;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.benefit-group__head h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 950;
}

.benefit-group__head span {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 850;
}

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.benefit-card a {
    display: grid;
    min-height: 310px;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 10px 26px rgba(64, 35, 18, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.benefit-card a:hover,
.benefit-card a:focus-visible {
    transform: translateY(-5px) rotate(-0.4deg);
    box-shadow: 0 18px 38px rgba(64, 35, 18, 0.16);
}

.benefit-card__media {
    position: relative;
    display: grid;
    min-height: 150px;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(240, 37, 37, 0.09), rgba(255, 209, 61, 0.18)),
        #fff;
}

.benefit-card__media img {
    width: min(108px, 58%);
    aspect-ratio: 1;
    object-fit: contain;
    padding: 10px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 22px rgba(64, 35, 18, 0.08);
}

.benefit-card__media span {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #18130f;
    color: #fff;
    font-size: 0.74rem;
    font-weight: 950;
}

.benefit-card__body {
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 15px;
}

.benefit-card h4 {
    display: -webkit-box;
    min-height: 2.7em;
    margin: 0 0 8px;
    overflow: hidden;
    font-size: 0.98rem;
    line-height: 1.35;
    font-weight: 950;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.benefit-card p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.benefit-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
}

.benefit-card__meta span,
.benefit-card__meta b {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 950;
}

.benefit-card__meta span {
    background: rgba(240, 37, 37, 0.09);
    color: var(--red);
}

.benefit-card__meta b {
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: #fff;
}

#friend-links {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.62);
}

@media (max-width: 980px) {
    .benefits-hero {
        grid-template-columns: 1fr;
    }

    .featured-benefits {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .benefits-shell {
        width: min(100% - 20px, 480px);
    }

    .benefits-hero {
        padding: 22px;
        border-radius: 22px;
    }

    .benefits-hero__showcase {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .featured-benefits,
    .benefit-grid {
        grid-template-columns: 1fr;
    }

    .benefits-board__head,
    .benefit-group__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .benefit-filters {
        justify-content: flex-start;
    }
}
