/* ---  CMS page body  --------------------------------------------------- */
.cms-body {
    margin: 0;
    padding: 1.5rem 2rem;
    line-height: 1.7;
}

.cms-notfound {
    text-align: center;
    padding: 4rem 1rem;
}

/* ---  #subscriptions# tag rendered output  ----------------------------- */
.cms-subscriptions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.cms-sub-card {
    background: var(--card, #fff);
    border: 1px solid #e5e9f0;
    border-radius: var(--radius-lg, 14px);
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(16,24,40,0.06));
    padding: 1.25rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cms-sub-card__name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
}

.cms-sub-card__desc {
    margin: 0;
    font-size: 0.875rem;
    color: var(--muted, #6b7280);
    line-height: 1.5;
}

.cms-sub-card__apps {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cms-sub-app {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cms-sub-app__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--accent, #0078d4);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

    .cms-sub-app__link:hover {
        text-decoration: underline;
    }

.cms-sub-app__icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.cms-sub-app__desc {
    font-size: 0.8rem;
    color: var(--muted, #6b7280);
    line-height: 1.4;
}

/* ---  Global app tile  ----------------------------------------------- */
/* Used by My Apps page, Welcome page, and the footer My Apps section.    */
.app-tile {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 140px;
    height: 110px;
    padding: 0.9rem 0.75rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, #f8f9fb 0%, #e8ecf2 40%, #d4dae5 70%, #e8ecf2 100%);
    border: 1px solid rgba(180,188,204,0.55);
    box-shadow: 0 2px 6px rgba(16,24,40,0.07), inset 0 1px 0 rgba(255,255,255,0.85);
    text-decoration: none;
    text-align: center;
    color: #1a2236;
    transition: transform 200ms cubic-bezier(.2,.9,.3,1), box-shadow 200ms ease, background 200ms ease;
}

    .app-tile:hover {
        transform: translateY(-5px) scale(1.02);
        box-shadow: 0 10px 28px rgba(16,24,40,0.13), inset 0 1px 0 rgba(255,255,255,0.9);
        background: linear-gradient(160deg, #ffffff 0%, #edf0f6 40%, #dce1ec 70%, #edf0f6 100%);
    }

    .app-tile:focus {
        outline: none;
        box-shadow: 0 0 0 4px rgba(0,120,212,0.15), var(--shadow-md);
    }

.app-tile__icon {
    font-size: 2rem;
    color: var(--primary);
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.12));
}

.app-tile__name {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
    color: #1a2236;
}

/* Footer tiles are slightly smaller */
.app-tile--sm {
    width: 110px;
    height: 90px;
}

    .app-tile--sm .app-tile__icon {
        font-size: 1.6rem;
    }

    .app-tile--sm .app-tile__name {
        font-size: 0.75rem;
    }

/* Welcome-page tiles are larger */
.app-tile--lg {
    width: 180px;
    height: 150px;
    border-radius: 16px;
}

    .app-tile--lg .app-tile__icon {
        font-size: 2.75rem;
    }

    .app-tile--lg .app-tile__name {
        font-size: 1rem;
        font-weight: 700;
    }

/* ---  Utility classes  --- */
.card {
    background: var(--card);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    box-shadow: var(--shadow-md);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: transform 120ms ease, box-shadow 120ms ease;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 24px rgba(0,120,212,0.18);
    }

.container {
    width: 100%;
    max-width: 128rem;
    margin: 0 auto;
    display: grid;
    padding-right: 5rem;
    padding-left: 5rem;
}

/* App tile visual override */
.app-tile {
    display: inline-grid;
    grid-template-rows: auto 1fr;
    align-items: stretch;
    gap: 0.65rem;
    width: 220px;
    min-height: 176px;
    padding: 0.55rem;
    border-radius: 14px;
    background: #efe8dc;
    border: 1px solid #e4dfd4;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
    text-decoration: none;
    text-align: left;
    color: #161616;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.app-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.12);
    background: #c0c0c0;
    border-color: #b0b0b0;
}

.app-tile:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(180, 150, 90, 0.18), 0 6px 16px rgba(16, 24, 40, 0.12);
    background: #c0c0c0;
    border-color: #b0b0b0;
}

.app-tile__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 84px;
    border-radius: 10px;
    background: transparent;
    overflow: hidden;
}

.app-tile__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.app-tile__icon {
    font-size: 1.9rem;
    color: #806447;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.app-tile__meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0 0.2rem 0.2rem;
}

.app-tile__name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    color: #111111;
    text-align: center;
}

.app-tile__desc {
    font-size: 0.84rem;
    line-height: 1.35;
    color: #5a5a5a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-tile--sm {
    width: 132px;
    min-height: 112px;
    padding: 0.4rem;
}

.app-tile--sm .app-tile__media {
    height: 56px;
    border-radius: 8px;
}

.app-tile--sm .app-tile__name {
    font-size: 0.78rem;
}

.app-tile--sm .app-tile__desc {
    display: none;
}

.app-tile--lg {
    width: 240px;
    min-height: 192px;
}

.app-tile--lg .app-tile__media {
    height: 100px;
}

.app-tile--lg .app-tile__name {
    font-size: 1.05rem;
    font-weight: 700;
}

/* Shared app section heading style */
.my-apps-wrapper .app-section-title,
.wpibg_footer_apps .app-section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    width: 100%;
    box-sizing: border-box;
    margin: 2.5rem 0 1.25rem;
    padding: 0;
    color: #806447;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
}
.app-section-title::before,
.app-section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #d2c8b7;
}

.my-apps-wrapper > section,
.my-apps-wrapper > .app-section-title {
    width: 100%;
    max-width: 1280px;
}

.my-apps-wrapper > .app-section-title:first-child,
.my-apps-wrapper > section:first-child > .app-section-title,
.wpibg_footer_apps > .app-section-title:first-child {
    margin-top: 0;

}

.my-apps-wrapper {
    box-sizing: border-box;
}

.my-apps-wrapper .my-apps-list {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
}

.my-apps-wrapper .app-tiles,
.wpibg_footer_section.wpibg_footer_apps .app-tiles {
    width: 100%;
    max-width: 1280px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

.my-apps-wrapper .app-tile,
.wpibg_footer_apps .app-tile {
    width: 100%;
    box-sizing: border-box;
}

.wpibg_footer_apps .app-section-title {
    max-width: 1280px;
}