:root {
    --lm-ink: #251f35;
    --lm-muted: #70687e;
    --lm-line: #e5e0eb;
    --lm-soft: #f6f3fb;
    --lm-purple: #7957d5;
    --lm-purple-dark: #5e3fba;
    --lm-coral: #ff7a59;
    --lm-green: #2c9b74;
    --lm-shadow: 0 18px 55px rgba(44, 31, 66, .11);
    --bs-primary: #7957d5;
    --bs-primary-rgb: 121, 87, 213;
    --bs-link-color: #6848c6;
    --bs-link-hover-color: #5035a4;
}

body.lm-template {
    min-height: 100vh;
    color: var(--lm-ink);
    background: #fff;
    font-family: "DM Sans", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.lm-template h1, .lm-template h2, .lm-template h3, .lm-template h4, .lm-template h5,
.lm-template .h1, .lm-template .h2, .lm-template .h3, .lm-template .h4, .lm-template .h5 {
    color: var(--lm-ink);
    font-family: "Manrope", sans-serif;
    font-weight: 750;
    letter-spacing: -.035em;
}

.lm-template a { text-underline-offset: .15em; }
.lm-template .container-xl { max-width: 1180px; }
.lm-main { min-height: 62vh; }
.lm-content-shell { padding-top: 2.5rem; padding-bottom: 4rem; }
.lm-module-content.is-places { margin: -2.5rem calc((100vw - 100%) / -2) -4rem; }
.lm-region--top > .cms-block, .lm-region--header > .cms-block, .lm-region--footer > .cms-block, .lm-module-content.is-places > .cms-block { margin-bottom: 0 !important; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.lm-region--top .cms-block__header, .lm-region--header .cms-block__header, .lm-region--footer .cms-block__header { display: none; }
.lm-region--header { position: relative; z-index: 50; }
.lm-region--header-inner, .lm-region--footer-inner { padding: 1.5rem 0; }
.lm-template .cms-cookie-notice { width: min(20rem, calc(100vw - 2rem)); padding: .8rem; border-radius: 1rem; }
.lm-template .cms-cookie-notice__eyebrow { margin-bottom: .45rem; padding: .25rem .55rem; font-size: .62rem; }
.lm-template .cms-cookie-notice__text { font-size: .76rem; line-height: 1.45; }
.lm-template .cms-cookie-notice__actions { margin-top: .65rem; }
.lm-template .cms-cookie-notice__button { min-height: 2.45rem; padding: .58rem 1rem; font-size: .76rem; }
.lm-adminbar { padding: .45rem 0; color: #fff; background: #2f2642; font-size: .78rem; }
.lm-adminbar .container-xl { display: flex; justify-content: space-between; gap: 1rem; }
.lm-adminbar a { color: #fff; font-weight: 700; }
.lm-back-top { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 30; width: 2.75rem; height: 2.75rem; display: none; place-items: center; color: #fff; background: var(--lm-purple); border: 0; border-radius: 50%; box-shadow: var(--lm-shadow); }
.lm-back-top.is-visible { display: grid; }
.lm-template .btn-primary { --bs-btn-bg: var(--lm-purple); --bs-btn-border-color: var(--lm-purple); --bs-btn-hover-bg: var(--lm-purple-dark); --bs-btn-hover-border-color: var(--lm-purple-dark); }
.lm-template .card { border-color: var(--lm-line); border-radius: 1.1rem; }

/* Forum */
.cms-forumhome {
    --forum-accent-default: var(--lm-purple);
}

.cms-forumhome__intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 1.5rem;
    background:
        radial-gradient(circle at 92% 0, rgba(255, 122, 89, .14), transparent 13rem),
        linear-gradient(135deg, #f8f5ff 0%, #fff 72%);
    border: 1px solid var(--lm-line);
    border-radius: 1.25rem;
}

.cms-forumhome__title {
    margin: 0;
    font-size: clamp(1.75rem, 2.6vw, 2.35rem);
}

.cms-forumhome__intro p {
    margin-top: .35rem !important;
    color: var(--lm-muted) !important;
    font-size: .95rem;
}

.cms-forumhome__categories {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

.cms-forumhome__category {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--lm-line);
    border-radius: 1.25rem;
    box-shadow: 0 10px 35px rgba(44, 31, 66, .07);
}

.cms-forumhome__category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.2rem 1.3rem;
    background: linear-gradient(115deg, rgba(121, 87, 213, .075), rgba(255, 255, 255, 0) 72%);
    border-bottom: 1px solid rgba(229, 224, 235, .75);
}

.cms-forumhome > .cms-forumhome__category-head {
    border: 1px solid var(--lm-line);
    border-radius: 1.25rem;
    box-shadow: 0 10px 35px rgba(44, 31, 66, .06);
}

.cms-forumhome__category-brand {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-width: 0;
}

.cms-forumhome__category-icon {
    --forum-accent: var(--forum-accent-default);
    width: 3rem;
    height: 3rem;
    flex: 0 0 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: color-mix(in srgb, var(--forum-accent) 82%, #251f35 18%);
    background: color-mix(in srgb, var(--forum-accent) 13%, #fff 87%);
    border: 1px solid color-mix(in srgb, var(--forum-accent) 26%, #fff 74%);
    border-radius: .95rem;
    font-size: 1.15rem;
}

.cms-forumhome__category-title {
    margin: 0 0 .2rem;
    color: var(--lm-ink);
    font-size: 1.2rem;
    line-height: 1.25;
}

.cms-forumhome__category-title a {
    color: inherit;
}

.cms-forumhome__category-title a:hover {
    color: var(--lm-purple);
}

.cms-forumhome__category-description {
    color: var(--lm-muted);
    font-size: .88rem;
    line-height: 1.55;
}

.cms-forumhome__category-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .7rem;
    flex-wrap: wrap;
}

.cms-forumhome__category-count {
    display: inline-flex;
    align-items: center;
    min-height: 2.05rem;
    padding: .35rem .75rem;
    color: var(--lm-muted);
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--lm-line);
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 700;
    white-space: nowrap;
}

.cms-forumhome__new-thread {
    min-height: 2.05rem;
    padding-right: .8rem;
    padding-left: .8rem;
    border-radius: .65rem;
    font-weight: 700;
}

.cms-forumhome__threads {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    padding: .8rem;
}

.cms-forumhome__thread {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 10.5rem;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.05rem;
    color: inherit;
    background: #fff;
    border: 1px solid transparent;
    border-radius: .95rem;
    text-decoration: none !important;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.cms-forumhome__thread:hover {
    color: inherit;
    background: #faf8ff;
    border-color: rgba(121, 87, 213, .18);
    box-shadow: 0 9px 24px rgba(44, 31, 66, .07);
    transform: translateY(-1px);
}

.cms-forumhome__thread.is-pinned {
    background: #fffaf3;
    border-color: rgba(255, 122, 89, .2);
}

.cms-forumhome__thread-main {
    min-width: 0;
}

.cms-forumhome__thread-title-row {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    margin-bottom: .35rem;
}

.cms-forumhome__thread-title {
    overflow: hidden;
    color: var(--lm-ink);
    font-family: "Manrope", sans-serif;
    font-size: .94rem;
    font-weight: 750;
    line-height: 1.4;
    text-overflow: ellipsis;
}

.cms-forumhome__thread:hover .cms-forumhome__thread-title {
    color: var(--lm-purple-dark);
}

.cms-forumhome__flag {
    display: inline-flex;
    align-items: center;
    min-height: 1.25rem;
    padding: .13rem .42rem;
    border-radius: .45rem;
    font-size: .61rem;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.cms-forumhome__flag--pinned { color: #a34822; background: #fff0e9; }
.cms-forumhome__flag--hot { color: #b73a26; background: #ffe9e4; }
.cms-forumhome__flag--new { color: #197253; background: #e8f7f1; }
.cms-forumhome__flag--closed { color: #655e70; background: #eeebf1; }

.cms-forumhome__thread-meta {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    color: var(--lm-muted);
    font-size: .72rem;
}

.cms-forumhome__author-avatar {
    width: 1.35rem;
    height: 1.35rem;
    flex: 0 0 1.35rem;
    border-radius: 50%;
    font-size: .55rem;
}

.cms-forumhome__dot {
    color: #bbb3c5;
}

.cms-forumhome__category-badge {
    --forum-accent: var(--forum-accent-default);
    display: inline-flex;
    align-items: center;
    min-height: 1.25rem;
    padding: .12rem .42rem;
    color: color-mix(in srgb, var(--forum-accent) 75%, #251f35 25%);
    background: color-mix(in srgb, var(--forum-accent) 10%, #fff 90%);
    border-radius: 999px;
    font-size: .66rem;
    font-weight: 700;
}

.cms-forumhome__thread-counts {
    display: flex;
    gap: .55rem;
}

.cms-forumhome__count {
    min-width: 3.2rem;
    padding: .35rem .45rem;
    background: var(--lm-soft);
    border-radius: .7rem;
    text-align: center;
}

.cms-forumhome__count strong {
    display: block;
    color: var(--lm-purple-dark);
    font-size: .9rem;
    line-height: 1.1;
}

.cms-forumhome__count small {
    color: var(--lm-muted);
    font-size: .61rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.cms-forumhome__thread-last {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 0;
    color: var(--lm-muted);
    font-size: .7rem;
    line-height: 1.45;
    text-align: right;
}

.cms-forumhome__thread-last-label {
    font-size: .59rem;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.cms-forumhome__thread-last strong {
    overflow: hidden;
    max-width: 100%;
    color: var(--lm-purple-dark);
    font-size: .73rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cms-forumhome__category > .alert {
    margin: .8rem;
    border-radius: .9rem;
}

.lm-template .cms-content {
    color: #453e4e;
    line-height: 1.75;
}

@media (max-width: 991.98px) {
    .cms-forumhome__category-head {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .cms-forumhome__category-tools {
        width: 100%;
        justify-content: space-between;
    }

    .cms-forumhome__thread {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .cms-forumhome__thread-last {
        grid-column: 1 / -1;
        align-items: flex-start;
        padding-top: .7rem;
        border-top: 1px solid var(--lm-line);
        text-align: left;
    }
}

@media (max-width: 767.98px) {
    .lm-content-shell { padding-top: 1.5rem; padding-bottom: 3rem; }
    .lm-module-content.is-places { margin-top: -1.5rem; margin-bottom: -3rem; }

    .cms-forumhome__intro,
    .cms-forumhome__category-head {
        padding: 1rem;
    }

    .cms-forumhome__category-brand {
        align-items: flex-start;
    }

    .cms-forumhome__category-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .cms-forumhome__category-count,
    .cms-forumhome__new-thread {
        justify-content: center;
        width: 100%;
    }

    .cms-forumhome__thread {
        grid-template-columns: 1fr;
        gap: .8rem;
        padding: .9rem;
    }

    .cms-forumhome__thread-counts {
        justify-content: flex-start;
    }

    .cms-forumhome__thread-last {
        grid-column: auto;
    }
}
