article.sync-card:not(.data-frame-card):not(.simplicity-frame-card) {
    cursor: default;
}

body.sync-card-expand-enabled article.sync-card:not(.data-frame-card):not(.simplicity-frame-card) {
    cursor: pointer;
}

article.sync-card:not(.data-frame-card):not(.simplicity-frame-card).sync-card--morphing .sync-card__image {
    filter: blur(10px);
}

.sync-card-expand-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2005;
    background: rgba(18, 18, 18, 0.48);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity var(--sync-card-morph-duration, 0.5s) var(--easing),
        visibility 0s linear var(--sync-card-morph-duration, 0.5s);
}

.sync-card-expand-backdrop--visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
        opacity var(--sync-card-morph-duration, 0.5s) var(--easing),
        visibility 0s linear 0s;
}

.sync-card-expand-panel {
    --sync-card-morph-duration: 0.5s;
    --sync-card-panel-padding: 10px;

    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 2010;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    grid-template-rows: minmax(0, 1fr);
    box-sizing: border-box;
    width: min(860px, calc(100vw - 48px));
    height: min(480px, calc(100vh - 48px));
    max-height: 85vh;
    padding: var(--sync-card-panel-padding);
    transform: translate(-50%, -50%);
    border-radius: 24px;
    overflow: hidden;
    background-color: var(--colorWhite);
    box-shadow: 0 28px 90px rgba(18, 18, 18, 0.22);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sync-card-expand-panel--measuring {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.sync-card-expand-panel--visible {
    visibility: visible;
    pointer-events: auto;
}

.sync-card-expand-panel--settled {
    opacity: 1;
}

.sync-card-expand-panel--morphing:not(.sync-card-expand-panel--animating):not(.sync-card-expand-panel--settled) {
    opacity: 0;
}

.sync-card-expand-panel--morphing.sync-card-expand-panel--animating:not(.sync-card-expand-panel--closing) {
    opacity: 1;
}

.sync-card-expand-panel--layout-driven {
    top: var(--panel-top);
    left: var(--panel-left);
    width: var(--panel-width);
    height: var(--panel-height);
    max-height: none;
    transform: none;
}

.sync-card-expand-panel--layout-driven.sync-card-expand-panel--animating {
    transition:
        top var(--sync-card-morph-duration) var(--easing),
        left var(--sync-card-morph-duration) var(--easing),
        width var(--sync-card-morph-duration) var(--easing),
        height var(--sync-card-morph-duration) var(--easing),
        border-radius var(--sync-card-morph-duration) var(--easing),
        opacity var(--sync-card-morph-duration) var(--easing);
}

.sync-card-expand-panel--layout-driven.sync-card-expand-panel--animating.sync-card-expand-panel--closing {
    opacity: 0;
}

.sync-card-expand-panel--closing {
    opacity: 0;
    pointer-events: none;
}

.sync-card-expand-panel__close {
    position: absolute;
    top: calc(var(--sync-card-panel-padding) + 2px);
    right: calc(var(--sync-card-panel-padding) + 2px);
    z-index: 4;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 999px;
    background: var(--colorLightGrey);
    color: rgba(18, 18, 18, 0.72);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
}

.sync-card-expand-panel__media {
    position: sticky;
    top: 0;
    align-self: start;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.sync-card-expand-panel__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: calc(24px - var(--sync-card-panel-padding));
}

.sync-card-expand-panel--morphing:not(.sync-card-expand-panel--settled) .sync-card-expand-panel__image {
    opacity: 0;
}

.sync-card-expand-panel--settled .sync-card-expand-panel__image {
    opacity: 1;
}

.sync-card-expand-panel__body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 10px;
    min-height: 0;
    max-height: 100%;
    padding: 22px 26px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    color: var(--colorBlack);
}

.sync-card-expand-panel--morphing:not(.sync-card-expand-panel--settled) .sync-card-expand-panel__body {
    opacity: 0;
}

.sync-card-expand-panel--settled .sync-card-expand-panel__body {
    opacity: 1;
    transition: opacity 0.25s var(--easing);
}

.sync-card-expand-panel__pill {
    margin: 0 0 0 -10px;
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: 999px;
    background-color: var(--colorLightGrey);
    color: var(--colorBlack);
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.2;
}

.sync-card-expand-panel__title {
    margin: 0;
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    font-weight: 400;
    line-height: 1.25;
}

.sync-card-expand-panel__subtitle {
    margin: 0;
    font-size: clamp(0.95rem, 1.6vw, 1.05rem);
    font-weight: 400;
    line-height: 1.5;
    color: rgba(18, 18, 18, 0.72);
}

.sync-card-expand-panel__detail {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
    font-size: clamp(0.9375rem, 1.55vw, 1rem);
    font-weight: 400;
    line-height: 1.55;
    color: rgba(18, 18, 18, 0.72);
}

.sync-card-expand-panel__detail[hidden] {
    display: none;
}

.sync-card-expand-panel__detail p {
    margin: 0;
}

.sync-card-expand-morph {
    --sync-card-close-fade-duration: 0.25s;

    position: fixed;
    top: var(--morph-top);
    left: var(--morph-left);
    width: var(--morph-width);
    height: var(--morph-height);
    object-fit: cover;
    object-position: center center;
    z-index: 2015;
    pointer-events: none;
    opacity: 1;
    visibility: hidden;
}

.sync-card-expand-morph:not([hidden]) {
    visibility: visible;
}

.sync-card-expand-morph--animating {
    transition:
        top var(--sync-card-morph-duration, 0.5s) var(--easing),
        left var(--sync-card-morph-duration, 0.5s) var(--easing),
        width var(--sync-card-morph-duration, 0.5s) var(--easing),
        height var(--sync-card-morph-duration, 0.5s) var(--easing),
        border-radius var(--sync-card-morph-duration, 0.5s) var(--easing);
}

.sync-card-expand-morph--closing {
    opacity: 0;
    transition: opacity var(--sync-card-close-fade-duration, 0.25s) var(--easing);
}

body.sync-card-expand-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .sync-card-expand-panel {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 42%) minmax(0, 1fr);
        width: calc(100vw - 40px);
        height: min(680px, calc(100vh - 40px));
    }

    .sync-card-expand-panel__media {
        position: relative;
        height: 100%;
        max-height: none;
    }

    .sync-card-expand-panel__body {
        padding: 18px 12px 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sync-card-expand-backdrop,
    .sync-card-expand-panel,
    .sync-card-expand-panel--layout-driven.sync-card-expand-panel--animating,
    .sync-card-expand-morph--animating,
    .sync-card-expand-panel--settled .sync-card-expand-panel__body,
    .sync-card-expand-panel--settled .sync-card-expand-panel__image {
        transition: none !important;
    }
}
