.public-qg {
    --qg-green-950: #183f38;
    --qg-green-800: #235f54;
    --qg-green-100: #e8f2ed;
    --qg-gold: #a98753;
    --qg-gold-soft: #f5ead9;
    --qg-text: #52625b;
    --qg-border: #e5ded2;
    --qg-bg: #fbf8f2;
    color: var(--qg-green-950);
}

.public-qg-hero,
.public-qg-detail-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 15%, rgb(169 135 83 / 15%), transparent 17rem),
        linear-gradient(125deg, #f7efe3 0%, #f0e4d2 52%, #fbf8f2 100%);
    border-bottom: 1px solid rgb(96 82 62 / 10%);
}

.public-qg-hero__inner {
    min-height: 25rem;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(17rem, .75fr);
    align-items: center;
    gap: 2rem;
    padding-block: clamp(3.5rem, 7vw, 6rem);
}

.public-qg-hero__copy {
    max-width: 45rem;
}

.public-qg-hero h1,
.public-qg-detail-hero h1 {
    margin: .4rem 0 .7rem;
    font-size: clamp(2rem, 4vw, 3.15rem);
    font-weight: 900;
    line-height: 1.45;
    letter-spacing: -.025em;
}

.public-qg-hero p,
.public-qg-detail-hero p {
    max-width: 43rem;
    margin: 0;
    color: var(--qg-text);
    font-size: .9rem;
    line-height: 2.15;
}

.public-qg-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1.4rem;
}

.public-qg-hero__ornament {
    position: relative;
    min-height: 16rem;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 1.15rem;
    overflow: hidden;
    padding: 2rem 2.25rem;
    color: var(--qg-gold);
    background:
        linear-gradient(145deg, rgb(255 253 249 / 92%), rgb(248 241 230 / 84%));
    border: 1px solid rgb(169 135 83 / 14%);
    border-radius: 1.75rem;
    box-shadow:
        0 1.25rem 3.5rem rgb(64 53 38 / 7%),
        inset 0 1px 0 rgb(255 255 255 / 88%);
}

.public-qg-hero__ornament::before {
    content: "";
    position: absolute;
    inset: 1rem;
    pointer-events: none;
    border: 1px solid rgb(169 135 83 / 8%);
    border-radius: 1.25rem;
}

.public-qg-hero__arch {
    position: absolute;
    top: 1.1rem;
    left: 50%;
    width: 10.5rem;
    height: 12.2rem;
    opacity: .62;
    pointer-events: none;
    transform: translateX(-50%);
}

.public-qg-hero__arch::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgb(169 135 83 / 16%);
    border-bottom: 0;
    border-radius: 5.25rem 5.25rem 1.3rem 1.3rem / 6.5rem 6.5rem 1.3rem 1.3rem;
    clip-path: polygon(0 18%, 50% 0, 100% 18%, 100% 100%, 0 100%);
}

.public-qg-hero__arch::after {
    content: "";
    position: absolute;
    top: 1.15rem;
    left: 50%;
    width: 6.8rem;
    height: 8.2rem;
    border: 1px solid rgb(169 135 83 / 9%);
    border-bottom: 0;
    border-radius: 3.4rem 3.4rem 1rem 1rem / 4.5rem 4.5rem 1rem 1rem;
    clip-path: polygon(0 18%, 50% 0, 100% 18%, 100% 100%, 0 100%);
    transform: translateX(-50%);
}

.public-qg-hero__emblem {
    position: relative;
    z-index: 1;
    width: 7.6rem;
    display: block;
    line-height: 0;
}

.public-qg-hero-emblem {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
    filter: drop-shadow(0 .45rem .65rem rgb(66 52 34 / 8%));
}

.public-qg-hero__verse {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: .25rem;
    padding-top: .9rem;
    color: #7b6647;
}

.public-qg-hero__verse::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 3.75rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgb(169 135 83 / 48%), transparent);
    transform: translateX(-50%);
}

.public-qg-hero__verse span {
    font-size: .78rem;
    font-weight: 650;
    line-height: 1.9;
    letter-spacing: .01em;
}

.public-qg-hero__verse small {
    color: #9a8a70;
    font-size: .58rem;
    font-weight: 500;
}

.public-qg-listing,
.public-qg-detail {
    padding-block: clamp(3rem, 6vw, 5rem);
}

.public-qg-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.public-qg-section-head h2 {
    margin: .18rem 0 .2rem;
    font-size: clamp(1.35rem, 2.2vw, 1.8rem);
    line-height: 1.6;
}

.public-qg-section-head p {
    margin: 0;
    color: #7b8580;
    font-size: .72rem;
}

.public-qg-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.public-qg-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--qg-border);
    border-radius: 1rem;
    box-shadow: 0 .7rem 2rem rgb(63 55 44 / 5%);
    transition: transform .16s ease, box-shadow .16s ease;
}

.public-qg-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 1rem 2.6rem rgb(63 55 44 / 9%);
}

.public-qg-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.public-qg-card__mark {
    width: 2.6rem;
    height: 2.6rem;
    display: grid;
    place-items: center;
    color: var(--qg-gold);
    background: var(--qg-gold-soft);
    border-radius: .75rem;
}

.public-qg-card__visibility {
    padding: .22rem .48rem;
    color: var(--qg-green-800);
    background: var(--qg-green-100);
    border-radius: 999px;
    font-size: .64rem;
    font-weight: 800;
}

.public-qg-card h2 {
    margin: .75rem 0 .35rem;
    font-size: .95rem;
    line-height: 1.7;
}

.public-qg-card h2 a {
    color: inherit;
    text-decoration: none;
}

.public-qg-card > p {
    min-height: 4.6rem;
    margin: 0;
    color: var(--qg-text);
    font-size: .72rem;
    line-height: 1.85;
}

.public-qg-card__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .3rem;
    margin-top: .8rem;
}

.public-qg-card__stats span {
    padding: .48rem .25rem;
    color: #7a817d;
    background: var(--qg-bg);
    border-radius: .65rem;
    font-size: .59rem;
    text-align: center;
}

.public-qg-card__stats strong {
    display: block;
    margin-bottom: .1rem;
    color: var(--qg-green-950);
    font-size: .78rem;
}

.public-qg-card footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: .8rem;
    padding-top: .7rem;
    border-top: 1px solid var(--qg-border);
    color: #858c88;
    font-size: .63rem;
}

.public-qg-card footer a {
    color: var(--qg-green-800);
    font-weight: 850;
    text-decoration: none;
}

.public-qg-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    margin-top: 1.4rem;
}

.public-qg-pagination a,
.public-qg-pagination span {
    padding: .45rem .7rem;
    border-radius: .6rem;
    font-size: .68rem;
}

.public-qg-pagination a {
    color: var(--qg-green-800);
    background: #fff;
    border: 1px solid var(--qg-border);
    text-decoration: none;
}

.public-qg-empty {
    padding: 3rem 1rem;
    text-align: center;
    background: #fff;
    border: 1px dashed var(--qg-border);
    border-radius: 1rem;
}

.public-qg-empty > span {
    color: var(--qg-gold);
    font-size: 2.5rem;
}

.public-qg-empty h2 {
    margin: .4rem 0 .25rem;
    font-size: 1rem;
}

.public-qg-empty p {
    margin: 0;
    color: #7c8581;
    font-size: .72rem;
}

.public-qg-empty.is-compact {
    padding: 1.5rem 1rem;
}

/* Detail ------------------------------------------------------------- */

.public-qg-detail-hero {
    padding-block: 2rem 3rem;
}

.public-qg-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 1.2rem;
    color: #898e8a;
    font-size: .67rem;
}

.public-qg-breadcrumb a {
    color: var(--qg-green-800);
    text-decoration: none;
}

.public-qg-detail-hero__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 1.5rem;
}

.public-qg-detail-hero__badges {
    display: flex;
    gap: .35rem;
}

.public-qg-detail-hero__badges span {
    padding: .24rem .5rem;
    color: #6e766f;
    background: rgb(255 255 255 / 55%);
    border: 1px solid rgb(98 83 61 / 10%);
    border-radius: 999px;
    font-size: .64rem;
    font-weight: 800;
}

.public-qg-detail-hero__badges .is-public {
    color: var(--qg-green-800);
}

.public-qg-detail-hero__badges .is-private {
    color: #765d37;
}

.public-qg-detail-hero__stats {
    min-width: 22rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .4rem;
}

.public-qg-detail-hero__stats span {
    padding: .7rem .5rem;
    color: #707b75;
    background: rgb(255 255 255 / 60%);
    border: 1px solid rgb(98 83 61 / 10%);
    border-radius: .75rem;
    font-size: .64rem;
    text-align: center;
}

.public-qg-detail-hero__stats strong {
    display: block;
    color: var(--qg-green-950);
    font-size: 1rem;
}

.public-qg-alert {
    margin-bottom: .8rem;
    padding: .65rem .8rem;
    border-radius: .7rem;
    font-size: .72rem;
}

.public-qg-alert.is-error {
    color: #8a423c;
    background: #fff0ee;
    border: 1px solid #f2cbc6;
}

.public-qg-alert.is-success {
    color: #286650;
    background: #eef8f3;
    border: 1px solid #cae7db;
}

.public-qg-khatm-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

.public-qg-khatm-card {
    padding: .85rem;
    background: #fff;
    border: 1px solid var(--qg-border);
    border-radius: .9rem;
    box-shadow: 0 .5rem 1.5rem rgb(63 55 44 / 4%);
}

.public-qg-khatm-card header {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.public-qg-khatm-card__mark {
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    color: var(--qg-gold);
    background: var(--qg-gold-soft);
    border-radius: .68rem;
}

.public-qg-khatm-card header small {
    color: #89908c;
    font-size: .58rem;
}

.public-qg-khatm-card h3 {
    margin: .05rem 0 0;
    font-size: .84rem;
}

.public-qg-khatm-card__progress {
    margin-top: .75rem;
}

.public-qg-khatm-card__progress > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #7b8580;
    font-size: .62rem;
}

.public-qg-khatm-card__progress strong {
    color: var(--qg-green-800);
}

.public-qg-progress {
    height: .38rem;
    margin: .38rem 0;
    overflow: hidden;
    background: #edf0ed;
    border-radius: 999px;
}

.public-qg-progress i {
    height: 100%;
    display: block;
    background: linear-gradient(90deg, var(--qg-green-800), #7ba095);
    border-radius: inherit;
}

.public-qg-khatm-card__progress small {
    color: #929793;
    font-size: .57rem;
}

.public-qg-khatm-card__next {
    margin-top: .7rem;
    padding: .55rem;
    background: var(--qg-bg);
    border-radius: .65rem;
}

.public-qg-khatm-card__next span,
.public-qg-khatm-card__next strong {
    display: block;
}

.public-qg-khatm-card__next span {
    color: #898f8c;
    font-size: .58rem;
}

.public-qg-khatm-card__next strong {
    margin-top: .08rem;
    font-size: .76rem;
}

.public-qg-khatm-card form {
    margin-top: .65rem;
}

.public-qg-khatm-card button,
.public-qg-salawat button {
    width: 100%;
    min-height: 2.45rem;
    color: #fff;
    background: var(--qg-green-800);
    border: 0;
    border-radius: .65rem;
    font-family: inherit;
    font-size: .68rem;
    font-weight: 850;
    cursor: pointer;
}

.public-qg-detail__lower {
    display: grid;
    grid-template-columns: minmax(17rem, .65fr) minmax(0, 1.35fr);
    gap: .85rem;
    margin-top: 2.5rem;
}

.public-qg-salawat,
.public-qg-activity {
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--qg-border);
    border-radius: 1rem;
    box-shadow: 0 .6rem 1.8rem rgb(63 55 44 / 4%);
}

.public-qg-salawat h2,
.public-qg-activity h2 {
    margin: .2rem 0 .35rem;
    font-size: 1rem;
}

.public-qg-salawat > p {
    margin: 0;
    color: var(--qg-text);
    font-size: .7rem;
    line-height: 1.8;
}

.public-qg-salawat__count {
    display: block;
    margin: .85rem 0;
    color: var(--qg-green-800);
    font-size: 1.5rem;
}

.public-qg-salawat__count small {
    display: block;
    color: #8b918e;
    font-size: .61rem;
    font-weight: 500;
}

.public-qg-salawat__choices {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .3rem;
    margin-bottom: .55rem;
}

.public-qg-salawat__choices label {
    position: relative;
    cursor: pointer;
}

.public-qg-salawat__choices input {
    position: absolute;
    opacity: 0;
}

.public-qg-salawat__choices span {
    display: block;
    padding: .45rem .2rem;
    color: #6c7772;
    background: var(--qg-bg);
    border: 1px solid var(--qg-border);
    border-radius: .55rem;
    font-size: .65rem;
    text-align: center;
}

.public-qg-salawat__choices input:checked + span {
    color: var(--qg-green-800);
    background: var(--qg-green-100);
    border-color: rgb(35 95 84 / 30%);
    font-weight: 850;
}

.public-qg-activity__list {
    display: grid;
}

.public-qg-activity__list article {
    display: grid;
    grid-template-columns: .8rem minmax(0, 1fr);
    gap: .55rem;
    padding: .62rem 0;
    border-bottom: 1px solid var(--qg-border);
}

.public-qg-activity__list article:last-child {
    border-bottom: 0;
}

.public-qg-activity__dot {
    width: .58rem;
    height: .58rem;
    margin-top: .3rem;
    background: #858d89;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #eef0ef;
}

.public-qg-activity__dot.is-khatm_participation {
    background: var(--qg-green-800);
    box-shadow: 0 0 0 3px var(--qg-green-100);
}

.public-qg-activity__dot.is-khatm_cycle_completed {
    background: var(--qg-gold);
    box-shadow: 0 0 0 3px var(--qg-gold-soft);
}

.public-qg-activity__dot.is-salawat {
    background: #7066a1;
    box-shadow: 0 0 0 3px #eeecf6;
}

.public-qg-activity__list strong {
    font-size: .72rem;
}

.public-qg-activity__list p {
    margin: .12rem 0;
    color: var(--qg-text);
    font-size: .68rem;
    line-height: 1.7;
}

.public-qg-activity__list small {
    color: #939996;
    font-size: .59rem;
}

@media (max-width: 1050px) {
    .public-qg-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .public-qg-khatm-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .public-qg-hero__inner,
    .public-qg-detail-hero__content,
    .public-qg-detail__lower {
        grid-template-columns: 1fr;
    }

    .public-qg-hero__ornament {
        min-height: 11.5rem;
        padding: 1.25rem;
    }

    .public-qg-hero__arch {
        width: 8.8rem;
        height: 10.2rem;
    }

    .public-qg-hero__emblem {
        width: 6.7rem;
    }

    .public-qg-detail-hero__stats {
        min-width: 0;
    }
}

@media (max-width: 620px) {
    .public-qg-hero__inner {
        min-height: 0;
        padding-block: 2.6rem;
    }

    .public-qg-hero h1,
    .public-qg-detail-hero h1 {
        font-size: clamp(1.65rem, 9vw, 2.25rem);
    }

    .public-qg-grid,
    .public-qg-khatm-grid {
        grid-template-columns: 1fr;
    }

    .public-qg-detail-hero__stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .public-qg-salawat__choices {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Public Quran Group confirmation ----------------------------------- */

.public-qg-confirm[hidden] {
    display: none;
}

.public-qg-confirm {
    position: fixed;
    inset: 0;
    z-index: 1085;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgb(20 35 31 / 58%);
    backdrop-filter: blur(.28rem);
}

.public-qg-confirm__dialog {
    position: relative;
    width: min(100%, 25rem);
    padding: 1.35rem;
    background: #fff;
    border: 1px solid var(--qg-border);
    border-radius: 1rem;
    box-shadow: 0 1.6rem 5rem rgb(15 30 26 / 22%);
    text-align: center;
}

.public-qg-confirm__close {
    position: absolute;
    inset-block-start: .7rem;
    inset-inline-end: .7rem;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    padding: 0;
    color: #7d8581;
    background: #f5f5f3;
    border: 0;
    border-radius: 50%;
    font: inherit;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.public-qg-confirm__mark {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    margin: 0 auto .65rem;
    color: var(--qg-gold);
    background: var(--qg-gold-soft);
    border-radius: .85rem;
    font-size: 1.45rem;
}

.public-qg-confirm h2 {
    margin: 0 0 .35rem;
    font-size: 1rem;
}

.public-qg-confirm p {
    margin: 0;
    color: var(--qg-text);
    font-size: .72rem;
    line-height: 1.95;
}

.public-qg-confirm__actions {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: .45rem;
    margin-top: 1rem;
}

.public-qg-confirm__actions button {
    min-height: 2.55rem;
    border-radius: .65rem;
    font-family: inherit;
    font-size: .68rem;
    font-weight: 850;
    cursor: pointer;
}

.public-qg-confirm__cancel {
    color: #68736e;
    background: #f7f6f3;
    border: 1px solid var(--qg-border);
}

.public-qg-confirm__submit {
    color: #fff;
    background: var(--qg-green-800);
    border: 1px solid var(--qg-green-800);
}

body.public-qg-confirm-open {
    overflow: hidden;
}


/* Quran Group activity height containment ---------------------------- */

.public-qg-detail__lower {
    align-items: start;
}

.public-qg-salawat,
.public-qg-activity {
    align-self: start;
}

.public-qg-activity {
    min-height: 0;
    overflow: hidden;
}

.public-qg-activity > header {
    position: relative;
    z-index: 2;
    padding-bottom: .7rem;
    background: #fff;
    border-bottom: 1px solid var(--qg-border);
}

.public-qg-activity__list {
    max-height: 28rem;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-inline-end: .35rem;
}

.public-qg-activity__list::-webkit-scrollbar {
    width: .38rem;
}

.public-qg-activity__list::-webkit-scrollbar-track {
    background: transparent;
}

.public-qg-activity__list::-webkit-scrollbar-thumb {
    background: rgb(35 95 84 / 20%);
    border-radius: 999px;
}

.public-qg-activity__list {
    scrollbar-width: thin;
    scrollbar-color:
        rgb(35 95 84 / 20%)
        transparent;
}

@media (max-width: 820px) {
    .public-qg-activity__list {
        max-height: 24rem;
    }
}


/* Private Quran Group access ---------------------------------------- */

.public-qg-private-access {
    min-height: 62vh;
    display: grid;
    place-items: center;
    padding-block: clamp(3rem, 8vw, 6rem);
    background:
        radial-gradient(circle at 50% 0%, rgb(169 135 83 / 12%), transparent 20rem),
        var(--qg-bg);
}

.public-qg-private-access__card {
    width: min(100%, 34rem);
    padding: clamp(1.3rem, 4vw, 2rem);
    text-align: center;
    background: #fff;
    border: 1px solid var(--qg-border);
    border-radius: 1.2rem;
    box-shadow: 0 1.2rem 3.5rem rgb(63 55 44 / 8%);
}

.public-qg-private-access__mark {
    width: 3.6rem;
    height: 3.6rem;
    display: grid;
    place-items: center;
    margin: 0 auto .8rem;
    color: var(--qg-gold);
    background: var(--qg-gold-soft);
    border-radius: 1rem;
    font-size: 1.35rem;
}

.public-qg-private-access h1 {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.6;
}

.public-qg-private-access p {
    max-width: 28rem;
    margin: .45rem auto 0;
    color: var(--qg-text);
    font-size: .76rem;
    line-height: 1.95;
}

.public-qg-private-access__actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

.public-qg-private-access__primary,
.public-qg-private-access__secondary {
    min-height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .55rem .85rem;
    border-radius: .65rem;
    font-size: .7rem;
    font-weight: 850;
    text-decoration: none;
}

.public-qg-private-access__primary {
    color: #fff;
    background: var(--qg-green-800);
}

.public-qg-private-access__secondary {
    color: var(--qg-green-800);
    background: #fff;
    border: 1px solid var(--qg-border);
}
