/* CMS-safe additions for the supplied template. */
.cms-empty {
    box-sizing: border-box;
    float: none !important;
    width: 100% !important;
    padding: 28px 0;
    color: #999;
    text-align: center;
}

.cms-post-summary {
    max-width: 1100px;
    margin: -10px auto 24px;
    color: #888;
    font-size: 15px;
    line-height: 1.8;
    text-align: center;
}

.cms-subsection-title {
    margin-top: 24px;
    color: rgba(255, 255, 255, .72);
    font-size: 18px;
    line-height: 36px;
}

.cms-search-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.cms-search-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(46, 46, 61, .84);
    color: rgba(255, 255, 255, .72);
    line-height: 34px;
}

.cms-search-tabs a:hover,
.cms-search-tabs a.is-active {
    background: #ffbf00;
    color: hsla(0, 0%, 0%, .86);
}

.cms-search-tabs em {
    font-style: normal;
    font-size: 12px;
    opacity: .8;
}

.cms-lazy-image {
    opacity: .15;
    transition: opacity .45s ease, transform .3s linear, filter .3s linear;
}

.cms-lazy-image.cms-image-loaded {
    opacity: 1;
}

.main .content video {
    display: block;
}

.main .cms-content-description {
    clear: both;
    margin-top: 32px;
}

.post-link h2 {
    overflow: hidden;
    color: rgba(255, 255, 255, .85);
    font-size: 14px;
    font-weight: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-icon li svg {
    width: 32px;
    color: currentColor;
}

.cms-member-auth {
    position: fixed;
    z-index: 1000;
    /* Align the control center with the template logo (60px header row). */
    top: 25px;
    right: max(12px, calc((100vw - 1440px) / 2 + 12px));
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-height: 30px;
    color: rgba(255, 255, 255, .7);
    font-size: 13px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .65);
}

.cms-member-auth button,
.cms-member-favorite,
.cms-member-submit,
.cms-member-switch {
    border: 0;
    border-radius: 3px;
    cursor: pointer;
    font: inherit;
}

.cms-member-auth button {
    padding: 4px 10px;
    background: transparent;
    color: #ffcf4d;
}

.cms-member-favorite {
    padding: 4px 10px;
    background: rgba(255, 191, 0, .14);
    color: #ffcf4d;
}

.cms-member-auth button:hover,
.cms-member-favorite:hover,
.cms-member-favorite.is-active {
    background: #ffbf00;
    color: #171717;
}

.cms-member-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0 !important;
    border-radius: 50% !important;
    background: #ffbf00 !important;
    color: #171717 !important;
    font-size: 14px;
    font-weight: 700;
    text-shadow: none;
}

.cms-member-avatar[hidden] {
    display: none !important;
}

.cms-member-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    display: grid;
    min-width: 104px;
    gap: 2px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 4px;
    background: #292833;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
    text-shadow: none;
}

.cms-member-menu[hidden] { display: none; }
.cms-member-menu button {
    width: 100%;
    padding: 6px 9px;
    background: transparent;
    color: rgba(255, 255, 255, .85);
    text-align: left;
}
.cms-member-menu button:hover,
.cms-member-menu button:focus-visible {
    background: rgba(255, 191, 0, .18);
    color: #ffcf4d;
}

.cms-member-favorite {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
}

.cms-member-favorite svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.cms-content-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cms-content-heading h1 {
    min-width: 0;
    margin-bottom: 0;
}

.cms-member-dialog {
    width: min(420px, calc(100vw - 32px));
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #292833;
    color: rgba(255, 255, 255, .9);
    box-shadow: 0 20px 56px rgba(0, 0, 0, .5);
}

.cms-member-dialog::backdrop { background: rgba(8, 8, 12, .78); }
.cms-member-dialog-panel { position: relative; display: grid; gap: 12px; padding: 24px; }
.cms-member-dialog-panel h2 { margin: 0 0 4px; font-size: 20px; font-weight: normal; }
.cms-member-dialog-panel label { display: grid; gap: 5px; color: rgba(255, 255, 255, .7); font-size: 13px; }
.cms-member-dialog-panel input { box-sizing: border-box; width: 100%; padding: 9px 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 3px; background: rgba(0,0,0,.18); color: #fff; font: inherit; }
.cms-member-dialog-close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; color: rgba(255,255,255,.7); font-size: 24px; cursor: pointer; }
.cms-member-submit { padding: 10px; background: #ffbf00; color: #171717; }
.cms-member-switch { padding: 4px; background: transparent; color: #ffcf4d; }
.cms-member-error { margin: 0; color: #ff8e8e; font-size: 13px; white-space: pre-line; }

.cms-modal-open {
    overflow: hidden;
}

.cms-announcement {
    width: min(560px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100vh - 48px);
    margin: auto;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .9);
}

.cms-announcement::backdrop {
    background: rgba(8, 8, 12, .78);
}

.cms-announcement-panel {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: #272633;
    box-shadow: 0 20px 56px rgba(0, 0, 0, .48);
}

.cms-announcement-header {
    display: flex;
    align-items: center;
    min-height: 64px;
    padding: 0 12px 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.cms-announcement-header h2 {
    flex: 1;
    margin: 0;
    overflow-wrap: anywhere;
    color: #fff;
    font-size: 22px;
    font-weight: normal;
    line-height: 1.4;
}

.cms-announcement-close {
    display: flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, .68);
    cursor: pointer;
}

.cms-announcement-close:hover,
.cms-announcement-close:focus-visible {
    background: rgba(255, 255, 255, .08);
    color: #ffbf00;
}

.cms-announcement-close:focus-visible {
    outline: 2px solid #ffbf00;
    outline-offset: 1px;
}

.cms-announcement-close svg {
    width: 22px;
    height: 22px;
}

.cms-announcement-content {
    box-sizing: border-box;
    max-height: min(52vh, 420px);
    padding: 24px;
    overflow: auto;
    color: rgba(255, 255, 255, .76);
    font-size: 16px;
    line-height: 1.9;
    overflow-wrap: anywhere;
    text-align: left;
    white-space: pre-wrap;
}

.cms-announcement-actions {
    display: flex;
    justify-content: flex-end;
    padding: 12px 24px 20px;
}

.cms-announcement-actions button {
    min-width: 96px;
    min-height: 40px;
    padding: 8px 18px;
    border: 0;
    border-radius: 3px;
    background: #ffbf00;
    color: rgba(0, 0, 0, .82);
    font: inherit;
    cursor: pointer;
}

.cms-announcement-actions button:hover,
.cms-announcement-actions button:focus-visible {
    background: #ffd24c;
}

.cms-announcement-actions button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

@media screen and (max-width: 760px) {
    .cms-member-auth {
        top: 25px;
        right: 8px;
        gap: 4px;
        font-size: 12px;
    }

    .cms-member-auth button {
        padding: 3px 7px;
    }

    .cms-member-avatar {
        padding: 0 !important;
    }

    .cms-post-summary {
        width: 92%;
        font-size: 14px;
    }

    .cms-subsection-title {
        margin-top: 18px;
        font-size: 16px;
    }

    .cms-announcement {
        width: calc(100vw - 24px);
        max-height: calc(100svh - 24px);
    }

    .cms-announcement-header {
        min-height: 58px;
        padding-left: 18px;
    }

    .cms-announcement-header h2 {
        font-size: 19px;
    }

    .cms-announcement-content {
        max-height: 55svh;
        padding: 20px 18px;
        font-size: 15px;
    }

    .cms-announcement-actions {
        padding: 10px 18px 18px;
    }

    .cms-announcement-actions button {
        width: 100%;
    }
}
