:root {
    --tl-display: "Barlow Condensed", sans-serif;
    --tl-body: "Manrope", sans-serif;
    --tl-mono: "IBM Plex Mono", monospace;

    --tl-black: #090806;
    --tl-bone: #efe8db;
    --tl-gold: #c99543;
    --tl-gold-light: #e0b45f;
}


/* ==========================================================
   BASE
   ========================================================== */

body {
    font-family: var(--tl-body);
    font-kerning: normal;
    text-rendering: optimizeLegibility;
}


/* ==========================================================
   HEADER
   ========================================================== */

.temple-header {
    min-height: 88px !important;

    background:
        linear-gradient(
            90deg,
            #090806,
            #0d0b08 55%,
            #090806
        ) !important;

    border-bottom:
        1px solid rgba(201,154,75,.20) !important;
}


.temple-header .topbar-inner {
    min-height: 88px !important;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 40px;
}


.temple-header .temple-brand {
    display: flex;
    align-items: center;

    gap: 14px !important;

    color: #f3ede2;

    text-decoration: none;
}


.temple-header .temple-brand-logo {
    width: 48px !important;
    height: 48px !important;

    flex: 0 0 48px !important;

    object-fit: contain;
}


.temple-header .temple-brand-copy {
    display: block;
}


.temple-header .temple-brand-copy strong {
    display: block;

    margin: 0 !important;

    color: #f3ede2 !important;

    font-family: var(--tl-body) !important;

    font-size: 17px !important;
    font-weight: 700 !important;

    line-height: 1.15 !important;

    letter-spacing: 0 !important;
    word-spacing: normal !important;
}


.temple-header .temple-brand-copy small {
    display: block;

    margin: 4px 0 0 !important;

    color: rgba(243,237,226,.54) !important;

    font-family: var(--tl-body) !important;

    font-size: 10px !important;
    font-weight: 500 !important;

    line-height: 1.3 !important;

    letter-spacing: 0 !important;
    word-spacing: normal !important;
}


.temple-header .temple-nav {
    display: flex;
    align-items: center;

    gap: 30px !important;
}


.temple-header .temple-nav .small-link {
    padding: 10px 0 !important;

    color: rgba(243,237,226,.68);

    font-family: var(--tl-body) !important;

    font-size: 12px !important;
    font-weight: 600 !important;

    line-height: 1.2 !important;

    letter-spacing: 0 !important;
    word-spacing: normal !important;

    text-decoration: none;
}


.temple-header .temple-project-link {
    color: #d7a94f !important;
}


/* ==========================================================
   FOOTER
   ========================================================== */

footer {
    background: #0b0a08 !important;

    color: rgba(243,237,226,.52);

    border-top:
        1px solid rgba(201,154,75,.15);

    font-family: var(--tl-body) !important;
}


footer .footer-inner {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    font-size: 12px !important;
}


footer,
footer *,
footer a {
    letter-spacing: 0 !important;
    word-spacing: normal !important;
}


footer .footer-powered {
    margin: 0 !important;
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 640px) {

    .temple-header,
    .temple-header .topbar-inner {
        min-height: 72px !important;
    }


    .temple-header .temple-brand {
        gap: 10px !important;
    }


    .temple-header .temple-brand-logo {
        width: 39px !important;
        height: 39px !important;

        flex-basis: 39px !important;
    }


    .temple-header .temple-brand-copy strong {
        font-size: 14px !important;
    }


    .temple-header .temple-brand-copy small {
        display: none !important;
    }


    .temple-header .temple-nav {
        gap: 15px !important;
    }


    .temple-header .temple-nav .small-link {
        font-size: 10px !important;
    }


    footer .footer-inner {
        flex-direction: column;
        align-items: flex-start;

        gap: 7px;
    }

}


/* ==========================================================
   SHARED MOBILE HEADER / FOOTER
   ========================================================== */

@media (max-width: 720px) {


    /* ------------------------------------------------------
       HEADER
       ------------------------------------------------------ */

    .temple-header .topbar-inner {
        width:
            calc(100% - 32px) !important;

        gap:
            14px !important;
    }


    .temple-header .temple-nav {
        margin-left:
            auto;

        gap:
            16px !important;
    }


    /* ------------------------------------------------------
       FOOTER
       Centre it and make it deliberate.
       ------------------------------------------------------ */

    footer {
        padding:
            28px 0 30px !important;
    }


    footer .footer-inner {
        width:
            calc(100% - 36px) !important;

        margin:
            0 auto !important;

        display:
            flex !important;

        flex-direction:
            column !important;

        justify-content:
            center !important;

        align-items:
            center !important;

        gap:
            9px !important;

        text-align:
            center !important;

        font-size:
            12px !important;

        line-height:
            1.45 !important;
    }


    footer .footer-inner > span {
        width:
            100%;

        text-align:
            center !important;
    }


    footer .footer-powered {
        color:
            #c99543 !important;
    }


    footer .footer-inner
    > span:last-child {
        color:
            rgba(243, 237, 226, .52)
            !important;
    }

}



/* ==========================================================
   TEMPLE NAVIGATION FINAL
   ========================================================== */

.temple-header .temple-nav {
    display: flex !important;

    align-items: center !important;

    justify-content: flex-end !important;

    gap: 28px !important;

    margin-left: auto;
}


.temple-header .temple-nav .small-link {
    position: relative;

    flex: 0 0 auto;

    padding: 10px 0 !important;

    color:
        rgba(243,237,226,.67);

    font-family:
        var(--tl-body) !important;

    font-size: 12px !important;
    font-weight: 600 !important;

    line-height: 1.2 !important;

    letter-spacing: 0 !important;
    word-spacing: normal !important;

    white-space: nowrap;

    text-decoration: none;

    transition:
        color .18s ease;
}


.temple-header
.temple-nav
.small-link::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 3px;

    height: 1px;

    transform: scaleX(0);

    transform-origin: left;

    background:
        #c99543;

    transition:
        transform .18s ease;
}


.temple-header
.temple-nav
.small-link:hover {
    color:
        #f3ede2;
}


.temple-header
.temple-nav
.small-link:hover::after {
    transform:
        scaleX(1);
}


.temple-header
.temple-project-link {
    color:
        #d7a94f !important;
}


/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 900px) {

    .temple-header
    .temple-nav {
        gap:
            19px !important;
    }


    .temple-header
    .temple-nav
    .small-link {
        font-size:
            11px !important;
    }

}


/* ==========================================================
   MOBILE
   Keep all 4 links usable without damaging desktop.
   ========================================================== */

@media (max-width: 720px) {

    .temple-header {
        min-height:
            78px !important;
    }


    .temple-header
    .topbar-inner {
        width:
            calc(100% - 28px) !important;

        min-height:
            78px !important;

        gap:
            10px !important;
    }


    .temple-header
    .temple-brand {
        gap:
            8px !important;

        flex:
            0 0 auto;
    }


    .temple-header
    .temple-brand-logo {
        width:
            37px !important;

        height:
            37px !important;

        flex-basis:
            37px !important;
    }


    .temple-header
    .temple-brand-copy strong {
        font-size:
            13px !important;
    }


    .temple-header
    .temple-brand-copy small {
        display:
            none !important;
    }


    .temple-header
    .temple-nav {
        min-width:
            0;

        gap:
            11px !important;
    }


    .temple-header
    .temple-nav
    .small-link {
        padding:
            9px 0 !important;

        font-size:
            9px !important;
    }

}


/* ==========================================================
   VERY NARROW PHONES

   Logo remains.
   Hide Home because clicking the brand already does Home.
   This avoids wrapping/overflow on narrow screens.
   ========================================================== */

@media (max-width: 480px) {

    .temple-header
    .temple-nav-home {
        display:
            none !important;
    }


    .temple-header
    .temple-nav {
        gap:
            12px !important;
    }


    .temple-header
    .temple-nav
    .small-link {
        font-size:
            9px !important;
    }

}


/* ==========================================================
   MOBILE FOOTER TRUE CENTRE
   ========================================================== */

@media (max-width: 720px) {

    footer .footer-inner {
        width: 100% !important;
        max-width: none !important;

        margin: 0 !important;

        padding-left: 18px !important;
        padding-right: 18px !important;

        box-sizing: border-box !important;

        align-items: center !important;
        text-align: center !important;
    }

    footer .footer-inner > span {
        width: 100% !important;
        text-align: center !important;
    }

}



/* ==========================================================
   HOW IT WORKS MODAL
   ========================================================== */

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


.temple-how-modal {
    position: fixed;
    inset: 0;

    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transition:
        opacity .18s ease,
        visibility .18s ease;
}


.temple-how-modal.is-open {
    opacity: 1;
    visibility: visible;

    pointer-events: auto;
}


.temple-how-backdrop {
    position: absolute;
    inset: 0;

    border: 0;

    background:
        rgba(5, 4, 3, .78);

    backdrop-filter:
        blur(8px);
}


.temple-how-panel {
    width: min(620px, 100%);
    max-height: calc(100vh - 48px);

    position: relative;
    z-index: 1;

    overflow-y: auto;

    padding: 32px;

    border:
        1px solid rgba(216,171,92,.26);

    border-radius: 8px;

    color: #f1eadf;

    background:
        linear-gradient(
            145deg,
            #15110c,
            #0a0806
        );

    box-shadow:
        0 24px 80px rgba(0,0,0,.48);
}


.temple-how-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 24px;

    margin-bottom: 26px;
}


.temple-how-label {
    display: block;

    margin-bottom: 8px;

    color: #c68b35;

    font-family:
        "IBM Plex Mono",
        monospace;

    font-size: 9px;
    font-weight: 600;

    letter-spacing: .14em;
}


.temple-how-head h2 {
    margin: 0;

    color: #f1eadf;

    font-family:
        "Barlow Condensed",
        sans-serif;

    font-size: 46px;
    font-weight: 700;

    line-height: .95;
}


.temple-how-close {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid rgba(216,171,92,.18);

    border-radius: 50%;

    color: #f1eadf;

    background:
        rgba(255,255,255,.025);

    font-family: Arial, sans-serif;
    font-size: 24px;

    cursor: pointer;
}


.temple-how-rules {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 1px;

    margin-bottom: 28px;

    background:
        rgba(216,171,92,.12);

    border:
        1px solid rgba(216,171,92,.12);
}


.temple-how-rules article {
    padding: 18px;

    background:
        #0d0b08;
}


.temple-how-rules strong {
    display: block;

    margin-bottom: 6px;

    color: #f1eadf;

    font-family:
        "Manrope",
        sans-serif;

    font-size: 13px;
    font-weight: 700;
}


.temple-how-rules span {
    display: block;

    color:
        rgba(241,234,223,.58);

    font-family:
        "Manrope",
        sans-serif;

    font-size: 11px;

    line-height: 1.55;
}


.temple-how-got-it {
    width: 100%;

    cursor: pointer;
}


/* ==========================================================
   MOBILE HOW IT WORKS
   ========================================================== */

@media (max-width: 720px) {

    .temple-how-modal {
        align-items: flex-end;

        padding:
            12px;
    }


    .temple-how-panel {
        width: 100%;

        max-height:
            calc(100dvh - 24px);

        padding:
            24px 20px 20px;

        border-radius:
            10px 10px 4px 4px;
    }


    .temple-how-head {
        margin-bottom:
            20px;
    }


    .temple-how-head h2 {
        font-size:
            40px;
    }


    .temple-how-rules {
        grid-template-columns:
            1fr;
    }


    .temple-how-rules article {
        padding:
            15px 16px;
    }


    .temple-how-rules strong {
        font-size:
            12px;
    }


    .temple-how-rules span {
        font-size:
            10px;
    }

}


/* ==========================================================
   SHAOLIN SAGA COMPACT HEADER BRAND
   Final override
   ========================================================== */

.temple-header .temple-brand {
    gap: 11px !important;
}

.temple-header .temple-brand-logo {
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;
}

.temple-header .temple-brand-copy {
    display: flex !important;
    align-items: center !important;
}

.temple-header .temple-brand-copy strong {
    margin: 0 !important;

    font-family:
        "Manrope",
        sans-serif !important;

    font-size: 15px !important;
    font-weight: 700 !important;

    line-height: 1 !important;

    letter-spacing: 0 !important;
    word-spacing: normal !important;

    color: #f3ede2 !important;
}

/* There is no subtitle on the compact brand */
.temple-header .temple-brand-copy small {
    display: none !important;
}


/* MOBILE */
@media (max-width: 640px) {

    .temple-header .temple-brand {
        gap: 9px !important;
    }

    .temple-header .temple-brand-logo {
        width: 32px !important;
        height: 32px !important;
        flex: 0 0 32px !important;
    }

    .temple-header .temple-brand-copy strong {
        font-size: 13px !important;
    }

}


/* ==========================================================
   SHAOLIN SAGA WORDMARK
   Match main shaolinsaga.com header treatment
   ========================================================== */

.temple-header .temple-brand-copy strong {
    font-family:
        "Cinzel",
        Georgia,
        serif !important;

    font-size:
        16px !important;

    font-weight:
        700 !important;

    line-height:
        1 !important;

    text-transform:
        uppercase !important;

    letter-spacing:
        .14em !important;

    word-spacing:
        normal !important;

    color:
        #f3ede2 !important;
}


@media (max-width: 640px) {

    .temple-header .temple-brand-copy strong {
        font-size:
            13px !important;

        letter-spacing:
            .12em !important;
    }

}


/* ==========================================================
   OFFICIAL SHAOLIN SAGA PNG WORDMARK
   ========================================================== */

.temple-header .temple-brand-wordmark-wrap {
    display: flex !important;
    align-items: center !important;
    height: 46px !important;
}

.temple-header .temple-brand-wordmark {
    display: block !important;

    width: auto !important;
    height: 42px !important;

    max-width: none !important;

    object-fit: contain !important;
}


/* MOBILE */
@media (max-width: 640px) {

    .temple-header .temple-brand-wordmark-wrap {
        height: 36px !important;
    }

    .temple-header .temple-brand-wordmark {
        height: 33px !important;
    }

}


/* ==========================================================
   SHAOLIN SAGA WORDMARK ONLY
   ========================================================== */

.temple-header .temple-brand {
    gap: 0 !important;
}

.temple-header .temple-brand-wordmark-wrap {
    height: 46px !important;
}

.temple-header .temple-brand-wordmark {
    width: auto !important;
    height: 43px !important;
    max-width: none !important;
    object-fit: contain !important;
}

@media (max-width: 640px) {

    .temple-header .temple-brand-wordmark-wrap {
        height: 37px !important;
    }

    .temple-header .temple-brand-wordmark {
        height: 35px !important;
    }

}


/* ==========================================================
   HEADER SHELL ALIGNMENT
   Match Loyalty page content width
   ========================================================== */

@media (min-width: 761px) {

    .temple-header .topbar-inner {
        width: calc(100% - 48px) !important;
        max-width: 1460px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

}

/* ===== REFERRALS HEADER MATCH ===== */

/*
   Temple Loyalty header now uses the exact visual baseline
   of referrals.shaolinsaga.com.
*/

.temple-header {
    min-height: 76px !important;
    background: rgba(23, 21, 16, .96) !important;
    border-bottom: 1px solid rgba(185, 148, 85, .24) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
}

.temple-header::after {
    content: none !important;
    display: none !important;
}

.temple-header .topbar-inner {
    width: calc(100% - 48px) !important;
    max-width: 1460px !important;
    height: 76px !important;
    min-height: 76px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.temple-header .temple-brand {
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.temple-header .temple-brand-wordmark-wrap {
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
}

.temple-header .temple-brand-wordmark {
    display: block !important;
    width: auto !important;
    height: 44px !important;
    max-width: none !important;
    object-fit: contain !important;
}

.temple-header .temple-nav {
    display: flex !important;
    align-items: center !important;
    gap: 24px !important;
    margin: 0 !important;
    color: #b9a789 !important;
    font-family: 'DM Sans', system-ui, sans-serif !important;
    font-size: .88rem !important;
    font-weight: 600 !important;
    line-height: 1.55 !important;
}

.temple-header .temple-nav .small-link,
.temple-header .temple-project-link {
    color: #b9a789 !important;
    font-family: 'DM Sans', system-ui, sans-serif !important;
    font-size: .88rem !important;
    font-weight: 600 !important;
    line-height: 1.55 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-decoration: none !important;
    opacity: 1 !important;
    padding: 0 !important;
    background: none !important;
    border: 0 !important;
}

.temple-header .temple-nav .small-link::after {
    content: none !important;
    display: none !important;
}

.temple-header .temple-nav .small-link:hover,
.temple-header .temple-project-link:hover {
    color: #d2ae6c !important;
}


/* Referrals mobile header dimensions */
@media (max-width: 620px) {

    .temple-header {
        min-height: 66px !important;
    }

    .temple-header .topbar-inner {
        width: calc(100% - 32px) !important;
        height: 66px !important;
        min-height: 66px !important;
    }

    .temple-header .temple-brand-wordmark-wrap {
        height: 35px !important;
    }

    .temple-header .temple-brand-wordmark {
        height: 35px !important;
    }

    .temple-header .temple-nav {
        gap: 10px !important;
        font-size: .76rem !important;
    }

    .temple-header .temple-nav .small-link,
    .temple-header .temple-project-link {
        font-size: .76rem !important;
    }
}

/* ===== TEMPLE STANDARD FOOTER ===== */

.temple-standard-footer {
    width: 100% !important;
    margin: 0 !important;
    padding: 30px 20px !important;

    background: rgba(23, 21, 16, .96) !important;

    border-top:
        1px solid
        rgba(185, 148, 85, .24)
        !important;

    color: #b9a789 !important;
}

.temple-standard-footer .footer-inner {
    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    text-align: center !important;

    color: #b9a789 !important;
    font-family: 'DM Sans', system-ui, sans-serif !important;
    font-size: .82rem !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
}

@media (max-width: 620px) {

    .temple-standard-footer {
        padding: 24px 18px !important;
    }

    .temple-standard-footer .footer-inner {
        display: block !important;
        width: 100% !important;
        font-size: .76rem !important;
        text-align: center !important;
    }

}

