/* Use the official blog's button silhouette with each component's own palette. */
html body :where(
    a[data-fw-diagonal-action],
    a.fw-home-contact__primary, a.fw-cta-lite__primary, a.fw-body-palette-link__button,
    .site-header .utility > a:last-child,
    .visual-form > a, .form-destination a, #our-support > nav > a,
    .faq-categories > a, #fw-company-health-link > a, .fw-blog-topic-nav > a,
    a.fw-real-hero__button, a.c-button, a.cta__contact-tel, a.cta-btn, a.trainer-card__button,
    .header__nav > a.header__button, a.button, a.j-cta, a.j-back, .j-thanks-inner a,
    .description > a.btn, .location-info > a.btn, a.hero-btn, .p-thanks__button > a,
    a.o-btn:not(.o-btn__skew), a.o-btn__arrow__square, a.o-btn__arrow__round,
    button.o-btn, input.j-submit, input.p-form__button
) {
    --fw-button-slant: min(20px, 28%);
    --fw-button-edge: 1px;
    clip-path: polygon(var(--fw-button-slant) 0, 100% 0, calc(100% - var(--fw-button-slant)) 100%, 0 100%);
    border-radius: 0 !important;
}

html body :where(
    a[data-fw-diagonal-action], a.fw-home-contact__primary, a.fw-cta-lite__primary,
    a.fw-body-palette-link__button, .visual-form > a, .form-destination a, #our-support > nav > a,
    .faq-categories > a, #fw-company-health-link > a, .fw-blog-topic-nav > a, a.fw-real-hero__button
) {
    position: relative;
}

html body :where(
    a[data-fw-diagonal-action], a.fw-home-contact__primary, a.fw-cta-lite__primary,
    a.fw-body-palette-link__button, .visual-form > a, .form-destination a, #our-support > nav > a,
    .faq-categories > a, #fw-company-health-link > a, .fw-blog-topic-nav > a,
    a.fw-real-hero__button, a.c-button, a.trainer-card__button, a.button
)::before {
    content: "";
    position: absolute;
    inset: calc(-1 * var(--fw-button-edge));
    pointer-events: none;
    background: var(--fw-button-edge-color, #b7a27c);
    clip-path: polygon(evenodd,
        var(--fw-button-slant) 0, 100% 0, calc(100% - var(--fw-button-slant)) 100%, 0 100%, var(--fw-button-slant) 0,
        calc(var(--fw-button-slant) + var(--fw-button-edge)) var(--fw-button-edge),
        calc(100% - var(--fw-button-edge)) var(--fw-button-edge),
        calc(100% - var(--fw-button-slant) - var(--fw-button-edge)) calc(100% - var(--fw-button-edge)),
        var(--fw-button-edge) calc(100% - var(--fw-button-edge)),
        calc(var(--fw-button-slant) + var(--fw-button-edge)) var(--fw-button-edge)
    );
}

body :where(a[data-fw-diagonal-action], .visual-form > a):hover { --fw-button-edge-color: #aa9266; }
body :where(a.fw-home-contact__primary, a.fw-cta-lite__primary) { --fw-button-edge-color: #ae986d; }
body a.fw-body-palette-link__button { --fw-button-edge-color: #b8a37d; }
body a.fw-body-palette-link__button:hover { --fw-button-edge-color: #7d6848; }
body :where(#our-support > nav > a, .faq-categories > a) { --fw-button-edge-color: rgb(121 104 75 / 30%); }
body #fw-company-health-link > a { --fw-button-edge-color: #111; }
body .fw-blog-topic-nav > a { --fw-button-edge-color: #c7b89e; }
body .fw-blog-topic-nav > a[aria-current="page"] { --fw-button-edge-color: #9b8256; }
body a.fw-real-hero__button { --fw-button-edge-color: #bea67c; }
body a.trainer-card__button { --fw-button-edge-color: #ddc989; }
body :where(a.c-button,a.button) { --fw-button-edge: 2px; --fw-button-edge-color: #ddc989; }
body:has(.mf-pricing__button) a.c-button { --fw-button-edge-color: #d9edf0; }
body a.button--dark { --fw-button-edge-color: #314145; }
body a.button:not(.button--dark) { --fw-button-edge-color: rgb(221 201 137 / 90%); }

/* Keep labels, arrow icons and image marks clear of the diagonal edges. */
html body :where(a.fw-home-contact__primary,a.fw-cta-lite__primary,a.fw-body-palette-link__button,
    .fw-blog-topic-nav > a,.site-header .utility > a:last-child,.faq-categories > a) {
    padding-inline: 24px;
}
html body :where(a.o-btn__long,button.o-btn,input.j-submit,input.p-form__button) {
    padding-inline: 20px;
}

html body :where(
    a[data-fw-diagonal-action], a.fw-home-contact__primary, a.fw-cta-lite__primary,
    a.fw-body-palette-link__button, .site-header .utility > a:last-child, .visual-form > a,
    .form-destination a, #our-support > nav > a, .faq-categories > a, #fw-company-health-link > a,
    .fw-blog-topic-nav > a, a.fw-real-hero__button, a.c-button, a.cta__contact-tel, a.cta-btn,
    a.trainer-card__button, .header__nav > a.header__button, a.button, a.j-cta, a.j-back,
    .j-thanks-inner a, .description > a.btn, .location-info > a.btn, a.hero-btn, .p-thanks__button > a,
    a.o-btn:not(.o-btn__skew), a.o-btn__arrow__square, a.o-btn__arrow__round, button.o-btn,
    input.j-submit, input.p-form__button
):focus-visible {
    outline: 2px solid currentColor !important;
    outline-offset: -5px !important;
}

/* The legacy header sets its utility-button radius with high specificity. */
html body .l-header__gnav__head a.o-btn.o-btn__short { border-radius: 0 !important; }
