@import url('https://cdn.jsdelivr.net/npm/@fontsource-variable/google-sans-flex/index.css');

:root {
    --bg: #f5faf6;
    --surface: #ffffff;
    --surface-soft: #eef8f1;
    --text: #07120d;
    --muted: #627269;
    --brand: #8de0b9;
    --brand-strong: #8de0b9;
    --brand-hover: #72d2a9;
    --complete: #813221;
    --complete-soft: #ffe0d6;
    --ink: #07120d;
    --ink-2: #102019;
    --border: #dce9e1;
    --shadow: 0 22px 70px rgba(7, 18, 13, .14);
}

* { box-sizing: border-box; }
html { font-size: 16px; overflow-x: hidden; }

body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: "Google Sans Flex Variable", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(245, 250, 246, .88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(7, 18, 13, .08);
}

.bagsta-navbar { min-height: 76px; }

.bagsta-brand {
    display: inline-flex;
    align-items: center;
    padding-block: .35rem;
}

.brand-logo {
    display: block;
    width: clamp(142px, 16vw, 172px);
    height: auto;
}

.nav-link {
    color: var(--muted);
    font-weight: 700;
}

.nav-link:hover { color: var(--text); }

.btn {
    border-radius: 8px;
    font-weight: 800;
    letter-spacing: 0;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease, transform .16s ease;
}

.btn-brand {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--ink);
}

.btn-brand:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--brand);
    box-shadow: 0 10px 24px rgba(7, 18, 13, .16);
}

.btn-brand:focus-visible {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--brand);
    box-shadow: 0 0 0 .2rem rgba(141, 224, 185, .38);
}

.btn-outline-dark {
    border-color: rgba(7, 18, 13, .18);
    color: var(--ink);
}

.challenge-hero {
    padding: 28px 0 0;
    background:
        radial-gradient(circle at 15% 0%, rgba(141, 224, 185, .24), transparent 32%),
        linear-gradient(180deg, #f8fcf9 0%, #edf7f1 100%);
}

.challenge-hero-panel {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    padding: clamp(1.25rem, 3.3vw, 3rem);
    background:
        linear-gradient(135deg, rgba(7, 18, 13, .96), rgba(16, 32, 25, .93)),
        url('/images/temp/challenge-cheviot.svg');
    background-size: cover;
    background-position: center;
    color: #fff;
    box-shadow: var(--shadow);
}

.challenge-hero-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(115deg, transparent 0%, transparent 54%, rgba(141, 224, 185, .15) 100%);
    pointer-events: none;
}

.challenge-hero-panel > * { position: relative; z-index: 1; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin-bottom: .75rem;
    color: var(--brand);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.eyebrow.dark { color: #8de0b9; }

.challenge-hero .eyebrow {
    color: var(--brand);
}

.challenge-hero h1,
.home-placeholder h1 {
    max-width: 780px;
    margin: 0 0 .9rem;
    font-size: clamp(2.35rem, 5vw, 4.9rem);
    line-height: .96;
    font-weight: 900;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.challenge-summary {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    line-height: 1.58;
}

.challenge-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.45rem;
}

.challenge-actions .btn-outline-light {
    border-color: rgba(255, 255, 255, .24);
    color: #fff;
}

.challenge-progress-panel {
    width: min(100%, 460px);
    margin-left: auto;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    color: var(--text);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .26);
}

.progress-panel-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .8rem;
}

.progress-panel-main strong,
.progress-panel-main span {
    display: block;
}

.progress-panel-main strong {
    font-size: clamp(2.05rem, 4vw, 3.15rem);
    line-height: .95;
    font-weight: 900;
}

.progress-panel-main > div:first-child > span:last-child {
    color: var(--muted);
    font-weight: 800;
}

.progress-ring {
    --size: 72px;
    position: relative;
    flex: 0 0 var(--size);
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--brand-strong) calc(var(--progress) * 1%), #e5eee8 0);
}

.progress-ring::before {
    content: "";
    position: absolute;
    width: calc(var(--size) - 18px);
    height: calc(var(--size) - 18px);
    border-radius: 50%;
    background: #fff;
}

.progress-ring span {
    position: relative;
    color: var(--ink);
    font-size: .86rem;
    font-weight: 900;
}

.progress-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5eee8;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), var(--brand-strong));
}

.hero-progress.is-completed .progress-ring,
.challenge-list-card.is-completed .progress-ring {
    background: conic-gradient(var(--complete) calc(var(--progress) * 1%), var(--complete-soft) 0);
}

.hero-progress.is-completed .progress-track span,
.challenge-list-card.is-completed .challenge-card-progress span {
    background: var(--complete);
}

.hero-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    margin-top: .75rem;
}

.hero-metric {
    min-height: 94px;
    padding: .8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    display: grid;
    align-content: center;
    gap: .12rem;
    position: relative;
    overflow: hidden;
}

.hero-metric::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -34px;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(141, 224, 185, .14);
}

.hero-metric strong {
    font-size: 1.65rem;
    line-height: 1;
    font-weight: 900;
}

.hero-metric > span:not(.metric-icon) {
    color: var(--muted);
    font-size: .88rem;
    font-weight: 800;
}

.metric-icon {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin-bottom: .25rem;
    border-radius: 50%;
    background: rgba(141, 224, 185, .22);
    color: #8de0b9;
    font-weight: 900;
}

.hero-metric.is-complete { border-color: rgba(244, 197, 66, .42); }

.activity-bars {
    display: flex;
    align-items: end;
    gap: .24rem;
    height: 34px;
    margin-bottom: .2rem;
}

.activity-bars span {
    flex: 1;
    min-width: 8px;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(180deg, var(--brand), #8de0b9);
}

.challenge-content { padding: 2rem 0 4.5rem; }

.challenge-sponsor-examples {
    display: grid;
    gap: .8rem;
    margin-top: clamp(1.35rem, 3vw, 2rem);
}

.challenge-sponsor-card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(1.1rem, 2.6vw, 2rem);
    padding: .9rem;
    border-radius: 8px;
}

.challenge-sponsor-card-compact {
    grid-template-columns: auto minmax(0, 1fr) auto;
    width: 100%;
    max-width: 100%;
    min-height: 76px;
    padding: .7rem .85rem;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .09);
    color: #fff;
    backdrop-filter: blur(12px);
}

.challenge-sponsor-label {
    color: rgba(255, 255, 255, .68);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.challenge-sponsor-logo {
    display: grid;
    place-items: center;
    width: 128px;
    min-height: 52px;
    padding: .45rem .7rem;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 900;
    text-transform: uppercase;
}

.challenge-sponsor-logo img {
    display: block;
    width: auto;
    max-width: 112px;
    max-height: 40px;
}

.challenge-sponsor-copy span {
    display: block;
    margin-bottom: .18rem;
    color: var(--brand);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.challenge-sponsor-copy h2 {
    margin: 0 0 .22rem;
    color: inherit;
    font-size: clamp(1.05rem, 1.5vw, 1.35rem);
    line-height: 1.08;
    font-weight: 900;
}

.challenge-sponsor-copy p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, .74);
    font-size: .96rem;
    line-height: 1.45;
}

.challenge-sponsor-card-compact .challenge-sponsor-copy h2 {
    font-size: 1.02rem;
}

.challenge-sponsor-card-compact .challenge-sponsor-copy p {
    display: -webkit-box;
    overflow: hidden;
    max-width: none;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.challenge-sponsor-card-image {
    grid-template-columns: auto minmax(0, 1fr) auto;
    overflow: hidden;
    min-height: 176px;
    border: 1px solid rgba(141, 224, 185, .42);
    background: #fff;
    color: var(--ink);
    padding: clamp(1rem, 2vw, 1.35rem);
}

.challenge-sponsor-card-image .challenge-sponsor-copy p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.52;
}

.challenge-sponsor-image {
    display: grid;
    place-items: center;
    width: clamp(112px, 14vw, 164px);
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    background: #f4faf6;
}

.challenge-sponsor-image img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@media (max-width: 767.98px) {
    .challenge-sponsor-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .challenge-sponsor-card-compact {
        width: 100%;
    }

    .challenge-sponsor-card .btn {
        width: 100%;
    }

    .challenge-sponsor-logo,
    .challenge-sponsor-image {
        width: 100%;
    }

    .challenge-sponsor-image {
        max-width: 220px;
    }
}

.challenge-tabs {
    display: flex;
    gap: .5rem;
    padding: .35rem;
    margin: 0 0 2.4rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255,255,255,.78);
    box-shadow: 0 10px 30px rgba(7, 18, 13, .08);
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
}

.challenge-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 46px;
    padding: .7rem 1rem;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 900;
    white-space: nowrap;
}

.challenge-tab.active {
    background: var(--ink);
    color: #fff;
}
@media (min-width: 768px) {
    .challenge-tabs.no-guides {
        display: inline-grid;
        grid-template-columns: repeat(3, minmax(150px, auto));
        width: auto;
    }

    .challenge-tabs.no-guides .challenge-tab {
        width: auto;
        min-width: 150px;
        padding-inline: 1.1rem;
    }
}

.tab-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(141, 224, 185, .18);
    color: var(--brand);
    font-size: 1rem;
    line-height: 1;
}

.tab-icon .bi {
    display: block;
    line-height: 1;
}

.challenge-tab.active .tab-icon {
    background: var(--brand);
    color: var(--ink);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.4rem;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 3rem);
    line-height: 1;
    font-weight: 900;
}

.section-heading p {
    max-width: 470px;
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.place-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.place-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    min-height: 132px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 34px rgba(7, 18, 13, .07);
}

.place-image-link img {
    width: 100%;
    height: 100%;
    min-height: 132px;
    object-fit: cover;
}

button.place-image-link,
.place-title-trigger {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

button.place-image-link {
    display: block;
    width: 100%;
}

.place-title-trigger:hover,
.place-title-trigger:focus-visible {
    text-decoration: none;
}

.place-panel-card,
.place-link-card {
    cursor: pointer;
}

.place-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
}

.place-area {
    display: block;
    margin-bottom: .35rem;
    color: #8de0b9;
    font-size: .75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
    overflow-wrap: anywhere;
}

.place-card h3 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.12;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.bag-button {
    flex: 0 0 auto;
    min-width: 92px;
    min-height: 42px;
    border: 1px solid rgba(7, 18, 13, .14);
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    font-weight: 900;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease, transform .16s ease;
}

.bag-button:hover,
.bag-button:focus-visible {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--ink);
    box-shadow: 0 10px 22px rgba(7, 18, 13, .16);
}

.bag-button.bagged {
    background: var(--brand);
    color: var(--ink);
    border-color: var(--brand);
}

.bag-button.bagged:hover,
.bag-button.bagged:focus-visible {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--brand);
}

@media (hover: none) {
    .bag-button:hover,
    .bag-button:focus,
    .bag-button:focus-visible {
        background: var(--ink);
        border-color: rgba(7, 18, 13, .14);
        color: #fff;
        box-shadow: none;
    }

    .bag-button.bagged:hover,
    .bag-button.bagged:focus,
    .bag-button.bagged:focus-visible {
        background: var(--brand);
        border-color: var(--brand);
        color: var(--ink);
        box-shadow: none;
    }
}

.place-card.is-bagged {
    border-color: rgba(141, 224, 185, .48);
    background: linear-gradient(90deg, rgba(141, 224, 185, .08), #fff 42%);
}

.about-challenge {
    margin-top: 2.3rem;
    padding: 1.4rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.about-challenge p {
    max-width: 900px;
    margin: 0;
    color: var(--muted);
    line-height: 1.68;
}

.home-placeholder { padding: 4rem 0; }

.home-placeholder-panel {
    border-radius: 8px;
    padding: clamp(2rem, 6vw, 5rem);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.home-placeholder p {
    max-width: 560px;
    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1.6;
}

.home-install-toast {
    overflow: hidden;
    border: 1px solid rgba(141, 224, 185, .35);
    border-left: 6px solid var(--brand);
    border-radius: 8px;
    background: #4c1d95;
    color: #fff;
    box-shadow: 0 18px 42px rgba(76, 29, 149, .35);
}

.home-install-toast .toast-body {
    padding: 1rem 1.1rem;
    color: #fff;
    font-size: 1rem;
    line-height: 1.35;
}

.site-footer {
    padding: 2rem 0;
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: #fff;
    font-weight: 700;
}

.site-footer a,
.site-footer a[data-tf-slider],
.site-footer [data-tf-slider] {
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-weight: inherit;
    text-decoration: underline;
    text-decoration-color: var(--brand);
    text-decoration-thickness: .12em;
    text-underline-offset: .2em;
}

.site-footer a:hover,
.site-footer a[data-tf-slider]:hover,
.site-footer [data-tf-slider]:hover {
    color: var(--muted);
}

@media (max-width: 991.98px) {
    .bagsta-navbar { min-height: 68px; }
    .challenge-hero { padding-top: 1rem; }
    .challenge-progress-panel { margin-left: 0; }
    .section-heading { display: block; }
    .section-heading p { margin-top: .75rem; }
    .place-grid { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
    .challenge-hero-panel { padding: 1.15rem; }
    .challenge-hero h1 { font-size: clamp(1.8rem, 8.8vw, 2.75rem); }
    .challenge-actions .btn { width: 100%; }
    .challenge-progress-panel { padding: .85rem; }
    .progress-panel-main strong { font-size: 2.15rem; }
    .progress-ring { --size: 60px; }
    .hero-metric-grid { grid-template-columns: 1fr 1fr; }
    .activity-card { grid-column: 1 / -1; }
    .challenge-tabs { width: 100%; }
    .challenge-tab { flex: 1 0 auto; padding: .65rem .75rem; }
    .place-card {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .place-image-link,
    button.place-image-link {
        display: none;
    }
    .place-image-link img {
        min-height: 0;
    }
    .place-card-body {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-width: 0;
        padding: .9rem;
        flex-direction: row;
        gap: .75rem;
    }
    .place-card-body > div {
        min-width: 0;
        flex: 1 1 auto;
        padding: 0;
    }
    .place-card h3 { font-size: 1rem; }
    .place-card-body > .bag-button {
        width: auto;
        min-width: 76px;
        min-height: 40px;
        margin: 0;
        border: 1px solid rgba(7, 18, 13, .14);
        border-radius: 8px;
        font-size: .86rem;
    }
}

/* Mockup-aligned compact challenge preview hero */
.challenge-app-card {
    width: min(100%, 430px);
    margin-left: auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .28);
}

.app-card-header,
.app-card-body {
    background:
        linear-gradient(180deg, rgba(7, 18, 13, .78), rgba(7, 18, 13, .9)),
        url('/images/temp/challenge-cheviot.svg');
    background-size: cover;
    background-position: center;
    color: #fff;
}

.app-card-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: .75rem;
    min-height: 48px;
    padding: .65rem 1rem 0;
    font-weight: 900;
}

.app-time {
    font-size: .82rem;
    color: rgba(255, 255, 255, .8);
}

.app-brand {
    color: #fff;
    font-size: 1rem;
    letter-spacing: .02em;
}

.app-menu {
    justify-self: end;
    color: rgba(255, 255, 255, .84);
}

.app-card-body {
    padding: 1rem 1rem 1.15rem;
}

.app-kicker {
    display: inline-flex;
    margin-bottom: .3rem;
    color: var(--brand);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.app-card-body h2 {
    max-width: 100%;
    margin: 0 0 1rem;
    color: #fff;
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.app-progress-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .7rem;
}

.app-label {
    display: block;
    margin-bottom: .18rem;
    color: rgba(255, 255, 255, .7);
    font-size: .76rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.app-progress-grid strong {
    display: block;
    color: #fff;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: .95;
    font-weight: 900;
}

.challenge-app-card .progress-ring {
    --size: 76px;
    background: conic-gradient(var(--brand-strong) calc(var(--progress) * 1%), rgba(255,255,255,.22) 0);
}

.challenge-app-card .progress-ring::before {
    background: rgba(255,255,255,.94);
}

.challenge-app-card .progress-track {
    background: rgba(255,255,255,.18);
}

.challenge-app-card .hero-metric-grid {
    margin: 0;
    padding: .75rem;
    background: #fff;
}

.challenge-progress-panel {
    display: none;
}

@media (max-width: 991.98px) {
    .challenge-app-card {
        margin-left: 0;
    }
}

@media (max-width: 575.98px) {
    .challenge-app-card {
        width: 100%;
    }

    .challenge-app-card .hero-metric-grid {
        grid-template-columns: 1fr 1fr;
    }

    .challenge-app-card .activity-card {
        grid-column: 1 / -1;
    }
}

/* Simplified integrated hero progress */
.hero-progress {
    width: min(100%, 360px);
    margin-left: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .9rem 1rem;
    color: #fff;
}

.hero-progress-copy strong,
.hero-progress-copy span {
    display: block;
}

.hero-progress-copy strong {
    color: #fff;
    font-size: clamp(2.15rem, 4vw, 3.15rem);
    line-height: .95;
    font-weight: 900;
}

.hero-progress .progress-ring {
    --size: 78px;
    background: conic-gradient(var(--brand-strong) calc(var(--progress) * 1%), rgba(255,255,255,.22) 0);
}

.hero-progress .progress-ring::before {
    background: rgba(255,255,255,.94);
}

.hero-progress .progress-ring span {
    color: var(--ink);
}

.hero-progress .progress-track {
    grid-column: 1 / -1;
    background: rgba(255,255,255,.2);
}

.hero-progress .progress-track span {
    background: var(--brand);
}

@media (max-width: 991.98px) {
    .hero-progress {
        margin-left: 0;
        width: min(100%, 390px);
    }
}

@media (max-width: 575.98px) {
    .hero-progress {
        width: 100%;
    }

    .hero-progress .progress-ring {
        --size: 66px;
    }
}
.challenge-app-card,
.hero-metric-grid,
.challenge-progress-panel {
    display: none;
}

/* Final compact challenge hero progress override */
.challenge-hero .hero-progress {
    width: min(100%, 350px);
    margin-left: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .7rem 1rem;
    padding-top: .4rem;
    color: #fff;
}

.challenge-hero .hero-progress-copy strong,
.challenge-hero .hero-progress-copy span {
    display: block;
}

.challenge-hero .hero-progress-copy strong {
    color: #fff;
    font-size: clamp(2.25rem, 4vw, 3rem);
    line-height: .95;
    font-weight: 900;
}

.challenge-hero .app-label {
    display: block;
    margin-bottom: .2rem;
    color: rgba(255, 255, 255, .72);
    font-size: .76rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.challenge-hero .hero-progress .progress-ring {
    --size: 74px;
    background: conic-gradient(var(--brand-strong) calc(var(--progress) * 1%), rgba(255,255,255,.22) 0);
}

.challenge-hero .hero-progress .progress-ring::before {
    background: rgba(255,255,255,.94);
}

.challenge-hero .hero-progress .progress-ring span {
    color: var(--ink);
}

.challenge-hero .hero-progress .progress-track {
    grid-column: 1 / -1;
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,.2);
}

.challenge-hero .hero-progress .progress-track span {
    background: var(--brand);
}

.challenge-hero .challenge-app-card,
.challenge-hero .hero-metric-grid,
.challenge-hero .challenge-progress-panel {
    display: none !important;
}

@media (max-width: 991.98px) {
    .challenge-hero .hero-progress {
        width: 100%;
        max-width: none;
        margin-left: 0;
    }
}

@media (max-width: 575.98px) {
    .challenge-hero .hero-progress {
        width: 100%;
    }

    .challenge-hero .hero-progress .progress-ring {
        --size: 64px;
    }
}



@media (max-width: 767.98px) {
    .challenge-hero .container {
        padding-left: .85rem;
        padding-right: .85rem;
    }

    .challenge-hero-panel {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .challenge-hero-panel .row {
        --bs-gutter-x: 0;
        margin-left: 0;
        margin-right: 0;
    }

    .challenge-hero-panel .row > * {
        padding-left: 0;
        padding-right: 0;
    }
}
/* Mobile-friendly challenge tabs */
@media (max-width: 767.98px) {
    .challenge-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        overflow: visible;
    }

    .challenge-tabs.no-guides {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .challenge-tab {
        width: 100%;
        min-width: 0;
        flex: none;
    }
}

.tab-icon {
    flex-basis: 26px;
}

@media (max-width: 767.98px) {
    .challenge-tabs {
        gap: 0;
        padding: 0;
        border-color: var(--border);
        background: #fff;
    }

    .challenge-tab {
        border-radius: 0;
        border-right: 1px solid #9fb9aa;
        border-bottom: 1px solid #9fb9aa;
    }

    .challenge-tab:nth-child(2n) {
        border-right: 0;
    }

    .challenge-tab:nth-last-child(-n + 2) {
        border-bottom: 0;
    }


    .challenge-tabs.no-guides .challenge-tab {
        gap: 0;
        border-bottom: 0;
        padding-inline: .35rem;
        font-size: .8rem;
    }

    .challenge-tabs.no-guides .tab-icon {
        display: none;
    }

    .challenge-tabs.no-guides .challenge-tab:nth-child(2) {
        border-right: 1px solid #9fb9aa;
        border-bottom: 0;
    }

    .challenge-tabs.no-guides .challenge-tab:nth-child(3) {
        grid-column: auto;
        border-right: 0;
        border-bottom: 0;
    }
    .challenge-tab.active {
        border-color: var(--ink);
        box-shadow: none;
    }
}



/* Subtle horizontal tab dividers */
@media (min-width: 768px) {
    .challenge-tabs {
        gap: 0;
    }

    .challenge-tab {
        position: relative;
        margin: 0 .25rem;
    }

    .challenge-tab + .challenge-tab::before {
        content: "";
        position: absolute;
        left: -.25rem;
        top: 10px;
        bottom: 10px;
        width: 1px;
        background: #9fb9aa;
    }

    .challenge-tab.active::before,
    .challenge-tab.active + .challenge-tab::before {
        display: none;
    }
}

.challenge-primary-action {
    min-width: 190px;
}

.challenge-primary-action.is-complete {
    background: #fff;
    border-color: #fff;
    color: var(--ink);
}

.challenge-primary-action.is-locked {
    background: transparent;
    border-color: rgba(255, 255, 255, .28);
    color: #fff;
}

.challenge-bagger-summary {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem .65rem;
    margin: .85rem 0 0;
    color: rgba(255, 255, 255, .72);
    font-size: .98rem;
    font-weight: 800;
}

.challenge-bagger-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    min-height: 34px;
    padding: .32rem .58rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, .1);
    color: inherit;
}

.challenge-bagger-badge strong {
    color: var(--brand);
    font-weight: 900;
}

.guided-challenge-note {
    margin: .8rem 0 0;
    color: rgba(255, 255, 255, .72);
    font-size: .98rem;
    font-weight: 800;
    line-height: 1.45;
}

/* Challenge list page */
.list-page-header {
    padding: 2.4rem 0 1.25rem;
    background: linear-gradient(180deg, #f8fcf9 0%, #edf7f1 100%);
}

.list-page-title-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
}

.list-page-title-row h1 {
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: .95;
    font-weight: 900;
}

.list-page-title-row p {
    max-width: 620px;
    margin: .85rem 0 0;
    color: var(--muted);
    font-size: 1.12rem;
    line-height: 1.55;
}

.challenge-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1.6rem;
}

.challenge-filters a {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 42px;
    padding: .55rem .85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    font-weight: 900;
}

.challenge-filters a.active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.challenge-filters span {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    height: 24px;
    padding: 0 .35rem;
    border-radius: 999px;
    background: #eef2f4;
    color: #526159;
    font-size: .8rem;
}

.challenge-filters a.active span {
    background: var(--brand);
    color: var(--ink);
}
.challenge-list-section {
    padding: 1.25rem 0 4.5rem;
}

.empty-state {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: clamp(1.5rem, 5vw, 3rem);
    overflow: hidden;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(7, 18, 13, .08);
}

.empty-state-copy {
    position: relative;
    z-index: 1;
}

.empty-state h2 {
    max-width: 680px;
    margin: .35rem 0 .75rem;
    color: var(--ink);
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1;
    font-weight: 900;
}

.empty-state p {
    max-width: 640px;
    margin: 0 0 1.35rem;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.55;
}

.challenge-list {
    display: grid;
    gap: 1rem;
}

.challenge-list-card {
    display: grid;
    grid-template-columns: minmax(260px, 450px) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(7, 18, 13, .08);
}

.challenge-list-image img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
}

.challenge-list-body {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.25rem;
}

.challenge-list-main {
    min-width: 0;
}

.challenge-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .65rem;
}

.challenge-location,
.challenge-status {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: .3rem .55rem;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.challenge-location {
    background: #fff1cc;
    color: #815c00;
}

.challenge-status {
    background: #f0f5f1;
    color: var(--muted);
}

.challenge-status.is-in-progress {
    background: #e7f0ff;
    color: #315f93;
}

.challenge-status.is-completed {
    background: #ffe0d6;
    color: #813221;
}

.challenge-complete-badge {
    display: inline-flex;
    gap: .55rem;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: .85rem 1.2rem;
    border: 1px solid rgba(143, 50, 24, .18);
    border-radius: 8px;
    background: #ffe0d6;
    color: #813221;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.challenge-complete-badge i {
    font-size: 1.05rem;
    line-height: 1;
}

.challenge-list-card h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    line-height: 1;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.challenge-list-card p {
    max-width: 760px;
    margin: .7rem 0 0;
    color: var(--muted);
    line-height: 1.58;
}

.challenge-list-card .challenge-bagger-summary {
    color: #5d6b63;
}

.challenge-list-card .challenge-bagger-badge {
    background: #f0f5f1;
    color: #5d6b63;
}

.challenge-list-card .challenge-bagger-badge strong {
    color: var(--ink);
}

.challenge-list-card .guided-challenge-note {
    color: #5d6b63;
}

.challenge-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: .9rem;
    color: var(--text);
    font-weight: 900;
}

.challenge-card-progress {
    height: 8px;
    max-width: 420px;
    margin-top: .9rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e5eee8;
}

.challenge-card-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--brand-strong);
}

.challenge-list-action {
    display: flex;
    flex: 0 0 150px;
    flex-direction: column;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.progress-ring.small {
    --size: 58px;
}

.progress-ring.small span {
    font-size: .78rem;
}

/* Stack challenge list cards before the content column gets squeezed */
@media (max-width: 991.98px) {
    .challenge-list-card {
        grid-template-columns: 1fr;
    }

    .challenge-list-image img {
        aspect-ratio: 16 / 9;
        min-height: 0;
    }
}
@media (max-width: 767.98px) {
    .list-page-title-row {
        display: block;
    }

    .list-page-title-row .btn {
        margin-top: 1rem;
    }

    .challenge-filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .challenge-list-card {
        grid-template-columns: 1fr;
    }

    .challenge-list-image img {
        aspect-ratio: 16 / 9;
        min-height: 0;
    }

    .challenge-list-body {
        display: block;
    }

    .challenge-list-action {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin-top: 1rem;
    }
}

@media (max-width: 420px) {
    .challenge-filters {
        grid-template-columns: 1fr;
    }
}

/* Challenge list card action/progress alignment */
.challenge-list-body {
    flex-direction: column;
}

.challenge-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
}

.challenge-card-top > .btn {
    flex: 0 0 auto;
    min-width: 158px;
}

.challenge-card-bottom {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-top: auto;
    padding-top: 1rem;
}

.challenge-card-bottom.has-progress {
    align-items: center;
}

.challenge-progress-inline {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .85rem;
    flex: 1 1 380px;
    min-width: 240px;
}

.challenge-progress-inline .challenge-card-progress {
    flex: 1 1 auto;
    max-width: 360px;
    margin-top: 0;
}

.challenge-list-action {
    display: none;
}

@media (max-width: 767.98px) {
    .challenge-card-top {
        display: block;
    }

    .challenge-card-top > .btn {
        width: 100%;
        margin-top: 1rem;
    }

    .challenge-card-bottom,
    .challenge-card-bottom.has-progress {
        align-items: center;
        gap: .75rem;
    }

    .challenge-progress-inline {
        flex: 1 1 auto;
        min-width: 0;
        gap: .65rem;
    }

    .challenge-progress-inline .challenge-card-progress {
        max-width: none;
    }
}

@media (max-width: 420px) {
    .challenge-card-bottom,
    .challenge-card-bottom.has-progress {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .challenge-progress-inline {
        grid-column: 1 / -1;
        width: 100%;
    }
}

/* Challenge count block aligned with hero progress language */
.challenge-count-block {
    flex: 1 1 auto;
    min-width: 0;
}

.challenge-count-block strong,
.challenge-count-block span {
    display: block;
}

.challenge-count-block strong {
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    line-height: .95;
    font-weight: 900;
}

.challenge-count-block > span {
    margin-top: .12rem;
    color: var(--muted);
    font-weight: 800;
}

.challenge-count-block .challenge-card-progress {
    max-width: 420px;
    margin-top: .75rem;
}

.challenge-card-bottom > .progress-ring.small {
    flex: 0 0 var(--size);
}

.challenge-list-meta,
.challenge-progress-inline {
    display: none;
}

@media (max-width: 767.98px) {
    .challenge-count-block .challenge-card-progress {
        max-width: none;
    }
}

@media (max-width: 420px) {
    .challenge-card-bottom,
    .challenge-card-bottom.has-progress {
        display: flex;
    }
}

/* Align challenge view hero progress with challenge cards */
.challenge-hero .hero-progress {
    grid-template-columns: minmax(0, 1fr) auto;
}

.challenge-hero .hero-progress .progress-track {
    grid-column: 1;
    width: 100%;
}

@media (max-width: 575.98px) {
    .challenge-hero .hero-progress .progress-track {
        grid-column: 1;
    }
}

/* Challenge view hero keeps the progress line under the count and ring */
.challenge-hero .hero-progress .progress-track {
    grid-column: 1 / -1;
}

@media (max-width: 575.98px) {
    .challenge-hero .hero-progress .progress-track {
        grid-column: 1 / -1;
    }
}

/* Challenge cards: progress line under both count and ring */
.challenge-card-bottom.has-progress {
    display: block;
}

.challenge-count-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.challenge-count-row .progress-ring.small {
    flex: 0 0 var(--size);
}

.challenge-count-block .challenge-card-progress {
    max-width: none;
    width: 100%;
    margin-top: .75rem;
}

.challenge-list-card.is-completed .progress-ring,
.challenge-hero .hero-progress.is-completed .progress-ring {
    background-color: var(--complete-soft) !important;
    background-image: conic-gradient(var(--complete) calc(var(--progress) * 1%), var(--complete-soft) 0) !important;
}

.challenge-list-card.is-completed .challenge-card-progress,
.challenge-hero .hero-progress.is-completed .progress-track {
    background-color: var(--complete-soft) !important;
    background-image: none !important;
}

.challenge-list-card.is-completed .challenge-card-progress span,
.challenge-hero .hero-progress.is-completed .progress-track span {
    background-color: var(--complete) !important;
    background-image: none !important;
    opacity: 1;
}

/* Dark app header */
.site-header {
    background: var(--ink);
    border-bottom: 0;
}

.bagsta-navbar {
    min-height: 74px;
    background: transparent;
}

.bagsta-brand,
.bagsta-brand:hover {
    color: #fff;
}

.site-header .nav-link {
    color: rgba(255, 255, 255, .76);
    font-size: .98rem;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus {
    color: var(--brand);
}

.site-header .navbar-toggler {
    border-color: rgba(255, 255, 255, .18);
}

.site-header .navbar-collapse {
    padding-top: .75rem;
    padding-bottom: .75rem;
}

.nav-login {
    min-width: 92px;
}

@media (min-width: 992px) {
    .site-header .navbar-collapse {
        padding-top: 0;
        padding-bottom: 0;
    }
}

.challenge-hero {
    padding-top: 0;
}

.challenge-hero-panel {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

@media (max-width: 991.98px) {
    .bagsta-navbar {
        min-height: 68px;
    }

    .site-header .nav-link {
        padding-top: .65rem;
        padding-bottom: .65rem;
    }

    .nav-login {
        width: 100%;
        margin-top: .5rem;
    }
}

/* Restore spacing between dark header and contained hero */
.challenge-hero {
    padding-top: 28px;
}

.challenge-hero-panel {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

@media (max-width: 991.98px) {
    .challenge-hero {
        padding-top: 1rem;
    }
}

/* Stronger dark-header navigation treatment */
@media (min-width: 992px) {
    .site-header .navbar-collapse {
        justify-content: flex-end;
    }

    .site-header .navbar-nav.me-auto {
        margin-left: auto !important;
        margin-right: 1.1rem !important;
    }

    .site-header .navbar-nav.me-auto .nav-item + .nav-item {
        border-left: 1px solid rgba(255, 255, 255, .12);
    }

    .site-header .navbar-nav.me-auto .nav-link {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.site-header .nav-link {
    color: rgba(255, 255, 255, .88);
    font-size: 1.02rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .045em;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus {
    color: var(--brand);
}

.site-header .nav-link[aria-current="page"],
.site-header .nav-link.active {
    color: var(--brand);
}

.site-header .nav-login {
    min-height: 40px;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Header nav contrast refinements */
.site-header .nav-link {
    color: var(--brand);
}

.site-header .nav-link:hover,
.site-header .nav-link:focus {
    color: #fff;
}

@media (min-width: 992px) {
    .site-header .navbar-nav.me-auto .nav-item + .nav-item {
        border-left-color: rgba(141, 224, 185, .34);
    }
}

.site-header .nav-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.site-header .nav-login {
    background: transparent;
    border-color: var(--brand);
    color: var(--brand);
}

.site-header .nav-login:hover,
.site-header .nav-login:focus {
    background: var(--ink);
    border-color: var(--brand);
    color: var(--brand);
}

.challenge-state-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0 2rem;
    border: 1px solid rgba(15, 24, 30, .12);
    border-radius: 8px;
    background: #f7fbf5;
    color: #172026;
}

.challenge-state-copy {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.challenge-state-message strong {
    flex: 0 0 auto;
    font-weight: 900;
}

.challenge-state-message span {
    color: #4f5b62;
}

.challenge-state-message.is-not-started {
    align-items: center;
    padding: 1.15rem 1.25rem;
    border-color: rgba(49, 95, 147, .26);
    background: linear-gradient(135deg, #eef5ff 0%, #ffffff 62%);
    box-shadow: 0 16px 38px rgba(15, 24, 30, .08);
}

.challenge-state-message.is-not-started strong {
    display: inline-flex;
    align-items: center;
    padding: .35rem .55rem;
    border-radius: 999px;
    background: #e7f0ff;
    color: #315f93;
    font-size: .8rem;
    line-height: 1;
    text-transform: uppercase;
}

.challenge-state-message.is-not-started span {
    color: #172026;
    font-weight: 700;
}

.challenge-state-action {
    flex: 0 0 auto;
    padding: .72rem 1rem;
    white-space: nowrap;
}

.challenge-state-message.is-logged-out {
    background: linear-gradient(135deg, #fff8d8 0%, #ffffff 62%);
}
@media (max-width: 767.98px) {
    .challenge-state-message,
    .challenge-state-copy {
        align-items: flex-start;
        flex-direction: column;
    }

    .challenge-state-message {
        gap: .85rem;
    }

    .challenge-state-copy {
        gap: .55rem;
    }

    .challenge-state-action {
        width: 100%;
    }
}


.account-section {
    padding: clamp(3rem, 8vw, 6rem) 0;
    background: linear-gradient(180deg, #f4fbf1 0%, #ffffff 55%);
}

.account-panel {
    width: min(100%, 560px);
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px solid rgba(15, 24, 30, .12);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 24, 30, .08);
}

.account-panel h1 {
    margin: .35rem 0 .75rem;
    font-size: clamp(2rem, 6vw, 3.25rem);
    font-weight: 900;
}

.account-panel p {
    color: #566168;
    font-size: 1.08rem;
}

.account-form {
    margin-top: 1.5rem;
}

.account-form .form-label {
    font-weight: 800;
}

.account-form .form-control {
    border-radius: 8px;
    border-color: rgba(15, 24, 30, .2);
    font-weight: 700;
}

.account-switch {
    min-height: 2.25rem;
    padding-left: 3.35rem;
}

.account-switch .form-check-input {
    width: 2.75rem;
    height: 1.45rem;
    margin-left: -3.35rem;
    margin-top: .1rem;
    border-color: rgba(7, 18, 13, .22);
    background-color: #dfe9e3;
    cursor: pointer;
}

.account-switch .form-check-input:checked {
    border-color: var(--brand);
    background-color: var(--brand);
}

.account-switch .form-check-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .2rem rgba(141, 224, 185, .35);
}

.account-switch .form-check-label {
    cursor: pointer;
}

.account-small {
    margin: 1rem 0 0;
    font-size: .95rem;
    text-align: center;
}

.account-form .text-danger {
    display: block;
    margin-top: .35rem;
}

.mobile-app-nav {
    position: fixed;
    left: .75rem;
    right: .75rem;
    bottom: .75rem;
    z-index: 1060;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: rgba(7, 18, 13, .96);
    box-shadow: 0 16px 42px rgba(7, 18, 13, .28);
}

.mobile-app-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 54px;
    color: #fff;
    font-size: .86rem;
    font-weight: 900;
    text-decoration: none;
}

.mobile-app-nav a + a {
    border-left: 1px solid rgba(255, 255, 255, .14);
}

.mobile-app-nav i {
    color: var(--brand);
    font-size: 1.1rem;
}

@media (max-width: 991.98px) {
    body.has-mobile-app-nav {
        padding-bottom: 72px;
    }

    .mobile-app-nav {
        display: grid;
    }
}

.bag-button.is-loading {
    opacity: .7;
    pointer-events: none;
}

.challenge-hero .hero-progress-copy strong {
    white-space: nowrap;
}

.challenge-hero .hero-progress-copy strong span {
    display: inline;
}

.challenge-map-section {
    padding-bottom: clamp(3rem, 7vw, 5rem);
}

.challenge-map-shell {
    overflow: hidden;
    border: 1px solid rgba(7, 18, 13, .12);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(7, 18, 13, .1);
}

.challenge-map {
    width: 100%;
    height: min(72vh, 760px);
    min-height: 520px;
    z-index: 1;
}

.challenge-map .leaflet-control-zoom a {
    color: var(--ink);
    font-weight: 900;
}

.leaflet-top .leaflet-control-bagsta-fullscreen {
    margin-top: 0;
}

.leaflet-control-bagsta-fullscreen button {
    display: grid;
    width: 30px;
    height: 30px;
    padding: 0;
    place-items: center;
    border: 0;
    background: #fff;
    cursor: pointer;
}

.leaflet-control-bagsta-fullscreen button:hover,
.leaflet-control-bagsta-fullscreen button:focus-visible {
    background: #f4f4f4;
}

.leaflet-control-bagsta-fullscreen button i {
    color: var(--ink);
    font-size: 1.08rem;
    line-height: 1;
}

.challenge-map:fullscreen {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
}

.challenge-map:fullscreen .challenge-map-panel,
.challenge-map:fullscreen .challenge-map-panel-backdrop {
    position: absolute;
}

.challenge-map-touch-locked {
    touch-action: pan-y pinch-zoom;
}

.challenge-map-touch-locked::after {
    content: "Use two fingers to move the map";
    position: absolute;
    left: 50%;
    bottom: 1rem;
    z-index: 500;
    max-width: calc(100% - 2rem);
    padding: .55rem .8rem;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(7, 18, 13, .88);
    color: #fff;
    font-size: .86rem;
    font-weight: 900;
    line-height: 1.2;
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s ease;
    white-space: nowrap;
}

.challenge-map-touch-locked:hover::after,
.challenge-map-touch-locked:focus-within::after {
    opacity: 1;
}

.challenge-map-touch-locked.is-touch-active::after {
    opacity: 0;
}

.map-top-controls {
    display: flex;
    align-items: stretch;
    gap: .5rem;
}

.map-location-control,
.map-label-toggle {
    display: inline-flex;
    align-items: center;
    height: 38px;
    gap: .45rem;
    border: 1px solid #d6d6d6;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    color: var(--ink);
    font-size: .9rem;
    font-weight: 900;
}

.map-location-control {
    min-width: 38px;
    padding-left: .65rem;
    padding-right: .65rem;
}

.map-location-control span:last-child {
    display: none;
}

.map-location-icon {
    position: relative;
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--ink);
    border-radius: 999px;
}

.map-location-icon::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: .28rem;
    height: .28rem;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: var(--ink);
}

.map-location-icon::after {
    content: "";
    position: absolute;
    inset: -.32rem;
    background:
        linear-gradient(var(--ink), var(--ink)) center top / 2px .28rem no-repeat,
        linear-gradient(var(--ink), var(--ink)) center bottom / 2px .28rem no-repeat,
        linear-gradient(var(--ink), var(--ink)) left center / .28rem 2px no-repeat,
        linear-gradient(var(--ink), var(--ink)) right center / .28rem 2px no-repeat;
}

.map-label-toggle {
    cursor: pointer;
    padding: .45rem .65rem;
}

.map-label-toggle input {
    accent-color: var(--brand);
}

.map-location-control.is-loading {
    cursor: wait;
    opacity: .92;
}

.map-location-control.is-loading::before {
    animation: map-location-spin .7s linear infinite;
    width: .9rem;
    height: .9rem;
    margin-right: .2rem;
    border: 2px solid rgba(7, 18, 13, .18);
    border-top-color: var(--ink);
    border-radius: 999px;
    content: "";
}

.map-marker-label {
    border: 0;
    border-radius: .2rem;
    color: var(--ink);
    cursor: pointer;
    font-family: inherit;
    font-weight: 900;
    padding: .15rem .4rem;
    pointer-events: auto;
}

.map-marker-label::before {
    display: none;
}

.map-location-status {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1800;
    display: none;
    align-items: center;
    gap: 1rem;
    width: 420px;
    max-width: calc(100vw - 2rem);
    padding: 1rem;
    transform: translate(-50%, -50%);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
}

.map-location-status.is-active {
    display: flex;
}

.map-location-status span {
    display: block;
    font-size: .9rem;
    font-weight: 800;
}

.map-location-status-spinner {
    animation: map-location-spin .7s linear infinite;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    border: 3px solid rgba(141, 224, 185, .3);
    border-top-color: var(--brand);
    border-radius: 999px;
}

@keyframes map-location-spin {
    to {
        transform: rotate(360deg);
    }
}

.bagsta-marker-cluster {
    display: grid;
    place-items: center;
    border: 3px solid #fff;
    border-radius: 999px;
    background: #facc15;
    color: var(--ink);
    font-weight: 900;
    box-shadow: 0 10px 28px rgba(7, 18, 13, .24);
}

.bagsta-marker-cluster span {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}

.challenge-map-panel,
.challenge-map-panel-backdrop {
    position: fixed;
    z-index: 1050;
}

.challenge-map-panel-backdrop {
    inset: 0;
    visibility: hidden;
    background: rgba(7, 18, 13, .28);
    opacity: 0;
    transition: opacity .18s ease, visibility .18s ease;
}

.challenge-map-panel-backdrop.is-open {
    visibility: visible;
    opacity: 1;
}

.challenge-map-panel {
    top: 0;
    right: 0;
    width: min(420px, 92vw);
    height: 100vh;
    overflow-y: auto;
    transform: translateX(105%);
    background: #fff;
    box-shadow: -18px 0 52px rgba(7, 18, 13, .22);
    transition: transform .22s ease;
}

.challenge-map-panel.is-open {
    transform: translateX(0);
}

.challenge-map-panel-close {
    position: absolute;
    top: .75rem;
    right: .75rem;
    z-index: 2;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(7, 18, 13, .88);
    color: #fff;
}

.challenge-map-panel-close::before,
.challenge-map-panel-close::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.challenge-map-panel-close::before {
    transform: rotate(45deg);
}

.challenge-map-panel-close::after {
    transform: rotate(-45deg);
}

.challenge-map-panel-image-link {
    display: block;
    cursor: pointer;
}

.challenge-map-panel-image-link.is-static {
    pointer-events: none;
}

.challenge-map-panel-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--surface-soft);
}

.challenge-map-panel-body {
    padding: 1.25rem;
}

.challenge-map-panel h2 {
    margin: .35rem 0 .75rem;
    color: var(--ink);
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    font-weight: 900;
}

.challenge-map-panel p {
    color: #526159;
    font-size: 1rem;
}

.challenge-map-panel-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-top: 1.2rem;
}

.challenge-map-panel-actions.single-action {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
}

.challenge-map-panel-actions .btn,
.challenge-map-panel-actions .bag-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    text-align: center;
}

.btn-map-external {
    border-color: #f4c542;
    background: #f4c542;
    color: var(--ink);
    font-weight: 900;
}

.btn-map-external:hover,
.btn-map-external:focus-visible {
    border-color: #07120d;
    background: #07120d;
    color: #fff;
}

.challenge-map-panel-actions.single-action .btn {
    width: min(100%, 260px);
}

.challenge-map-panel-actions .d-none + .bag-button,
.challenge-map-panel-actions .bag-button:only-child {
    grid-column: 1 / -1;
}

@media (max-width: 767.98px) {
    .empty-state {
        grid-template-columns: 1fr;
    }

    .challenge-map {
        min-height: 460px;
        height: 64vh;
    }

    .challenge-map-panel {
        width: 100%;
        max-width: 100%;
    }
}

.leaderboard-panel {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(7, 18, 13, .08);
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 1rem 1.15rem;
    border-bottom: 1px solid rgba(7, 18, 13, .08);
    vertical-align: middle;
}

.leaderboard-table th {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.leaderboard-table tbody tr:last-child td {
    border-bottom: 0;
}

.leaderboard-table tbody tr.is-complete:not(.is-me) {
    background: linear-gradient(90deg, rgba(255, 193, 7, .2), rgba(255, 241, 204, .55));
}

.leaderboard-table tbody tr.is-complete:not(.is-me) .leader-position {
    background: #f4c542;
    color: var(--ink);
    box-shadow: 0 0 0 4px rgba(244, 197, 66, .2);
}

.leaderboard-table tbody tr.is-complete:not(.is-me) .leader-count {
    color: #815c00;
}

.leaderboard-table tbody tr.is-me {
    background: linear-gradient(90deg, rgba(141, 224, 185, .42), rgba(141, 224, 185, .14));
}

.leaderboard-table tbody tr.is-me .leader-position {
    background: var(--brand);
    color: var(--ink);
    box-shadow: 0 0 0 4px rgba(141, 224, 185, .28);
}

.leaderboard-table tbody tr.is-me .leader-count {
    color: var(--ink);
}

.leader-position {
    display: inline-grid;
    min-width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-weight: 900;
}

.leader-count {
    font-weight: 900;
}

.leader-name-cell {
    min-width: 0;
}

.leader-name-line {
    display: flex;
    align-items: baseline;
    gap: .35rem;
    min-width: 0;
}

.leader-name {
    min-width: 0;
    white-space: nowrap;
}

.leader-date {
    color: var(--muted);
    font-weight: 800;
}

.leader-me,
.leader-complete,
.leader-hidden-badge {
    display: inline-flex;
    align-items: center;
    margin-left: .5rem;
    padding: .22rem .5rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.leader-me {
    background: var(--brand);
    color: var(--ink);
}

.leader-complete {
    background: var(--ink);
    color: #fff;
}

.leader-hidden-badge {
    background: rgba(7, 18, 13, .08);
    color: var(--muted);
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .leaderboard-table th,
    .leaderboard-table td {
        padding: .85rem .7rem;
    }

    .leaderboard-table th:first-child,
    .leaderboard-table td:first-child {
        width: 62px;
    }

    .leaderboard-table th:last-child,
    .leaderboard-table td:last-child {
        width: 62px;
    }

    .leader-position {
        min-width: 32px;
        height: 32px;
    }

    .leader-name-line {
        display: block;
    }

    .leader-name {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .leader-date {
        display: block;
        margin-top: .12rem;
    }

    .leader-date-bracket {
        display: none;
    }

    .leader-hidden-badge {
        margin-top: .35rem;
        margin-left: 0;
    }
}
/* Home hero */
.home-hero {
    position: relative;
    overflow: hidden;
    min-height: 760px;
    padding: clamp(3rem, 5vw, 5.5rem) 0 0;
    background: #edf6f0;
}

.home-hero-bg {
    position: absolute;
    inset: -2px 0 0;
    background: url('/images/home/home-hero-bg.webp');
    background-size: cover;
    background-position: center bottom;
}

.home-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 660px) minmax(0, 680px);
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: center;
    min-height: 680px;
}

.home-hero-copy {
    max-width: 660px;
    padding-bottom: clamp(2rem, 6vw, 5rem);
}

.home-hero h1 {
    margin: 0 0 1.45rem;
    color: var(--ink);
    font-size: clamp(3.6rem, 4.2vw, 4.85rem);
    line-height: .96;
    font-weight: 900;
    letter-spacing: 0;
}

.home-hero h1 > span {
    display: block;
    white-space: nowrap;
}

.home-hero h1 .home-hero-green {
    color: #8de0b9;
    text-shadow:
        0 2px 10px rgba(255, 255, 255, .52),
        0 4px 8px rgba(7, 18, 13, .52),
        0 1px 2px rgba(7, 18, 13, .46);
}

.home-hero-copy p {
    max-width: 590px;
    margin: 0;
    color: #17241d;
    font-size: clamp(1.16rem, 1.35vw, 1.35rem);
    line-height: 1.34;
    font-weight: 720;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.8rem;
}

.home-hero-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    min-height: 60px;
    padding-inline: 1.45rem;
    border-radius: 8px;
    font-size: 1.08rem;
}

.home-hero-actions .btn-outline-dark {
    background: rgba(255, 255, 255, .52);
    border-color: rgba(7, 18, 13, .24);
}

.btn-icon {
    position: relative;
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    color: currentColor;
}

.btn-icon-mark {
    border: 3px solid currentColor;
    border-radius: 999px 999px 999px 3px;
    transform: rotate(-45deg) scale(.86);
}

.btn-icon-mark::before {
    content: "";
    width: 8px;
    height: 8px;
    border: 2px solid currentColor;
    border-radius: 999px;
}

.btn-icon-user::before,
.btn-icon-user::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: 3px solid currentColor;
}

.btn-icon-user::before {
    top: 1px;
    width: 11px;
    height: 11px;
    border-radius: 999px;
}

.btn-icon-user::after {
    bottom: 1px;
    width: 20px;
    height: 11px;
    border-top-left-radius: 999px;
    border-top-right-radius: 999px;
    border-bottom: 0;
}

.home-hero-art {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-width: 0;
    margin-right: 0;
}

.home-hero-art img {
    display: block;
    width: min(100%, 680px);
    height: auto;
    filter: drop-shadow(0 28px 52px rgba(7, 18, 13, .16));
}

.home-featured-strip {
    position: relative;
    z-index: 2;
    margin-top: -1px;
    padding: clamp(2.8rem, 5vw, 4.8rem) 0 clamp(3rem, 5vw, 5rem);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 -18px 48px rgba(7, 18, 13, .08);
}

.home-featured-heading {
    max-width: 720px;
    margin-bottom: 1.5rem;
}

.home-featured-heading h2 {
    margin: 0 0 .55rem;
    font-size: clamp(2rem, 3.6vw, 3.4rem);
    line-height: 1;
    font-weight: 900;
}

.home-featured-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.48;
    font-weight: 720;
}

.home-featured-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.home-featured-card {
    position: relative;
    display: grid;
    min-height: clamp(220px, 24vw, 330px);
    align-content: end;
    overflow: hidden;
    border-radius: 8px;
    color: #fff;
    isolation: isolate;
    box-shadow: 0 16px 42px rgba(7, 18, 13, .16);
}

.home-featured-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, transparent 20%, rgba(7, 18, 13, .88) 100%),
        linear-gradient(90deg, rgba(7, 18, 13, .38), transparent 58%);
    opacity: .9;
    transition: opacity .18s ease;
}

.home-featured-card img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-featured-card span,
.home-featured-card strong {
    margin-inline: clamp(1rem, 2vw, 1.35rem);
}

.home-featured-card span {
    width: max-content;
    margin-bottom: .45rem;
    color: rgba(255, 255, 255, .78);
    font-size: .86rem;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
    transition: color .18s ease;
}

.home-featured-card strong {
    margin-bottom: clamp(1rem, 2vw, 1.35rem);
    color: #fff;
    font-size: clamp(1.55rem, 2.45vw, 2.45rem);
    line-height: 1;
    font-weight: 900;
    transition: color .18s ease;
}

.home-featured-card:hover,
.home-featured-card:focus-visible {
    color: #fff;
}

.home-featured-card:hover::after,
.home-featured-card:focus-visible::after {
    opacity: 1;
}

.home-featured-card:hover strong,
.home-featured-card:focus-visible strong {
    color: var(--brand);
}

@media (max-width: 1199.98px) {
    .home-hero-inner {
        grid-template-columns: minmax(430px, .98fr) minmax(390px, 1.02fr);
        gap: 1.5rem;
    }

    .home-hero h1 {
        font-size: clamp(3rem, 4.3vw, 4.1rem);
    }

    .home-hero-copy p {
        max-width: 520px;
        font-size: 1.1rem;
    }

    .home-hero-art {
        margin-right: 0;
    }
}

@media (max-width: 991.98px) {
    .home-hero {
        min-height: auto;
        padding: 2.2rem 0 2.8rem;
    }

    .home-hero-bg {
        display: none;
    }

    .home-hero-inner {
        display: block;
        min-height: 0;
    }

    .home-hero-copy {
        max-width: 760px;
        padding-bottom: 0;
    }

    .home-hero h1 {
        font-size: clamp(3rem, 10vw, 5rem);
    }

    .home-hero h1 .home-hero-green {
        text-shadow: none;
    }

    .home-hero-art {
        display: none;
    }

    .home-featured-grid {
        grid-template-columns: 1fr;
    }

    .home-featured-card {
        min-height: 170px;
    }
}

@media (max-width: 575.98px) {
    .home-hero {
        padding-top: 1.35rem;
    }

    .home-hero h1 {
        font-size: clamp(2.6rem, 14vw, 3.8rem);
    }

    .home-hero h1 > span {
        white-space: normal;
    }

    .home-hero h1 .home-hero-green {
        margin-top: .12em;
    }

    .home-hero-copy p {
        font-size: 1.05rem;
    }

    .home-hero-actions {
        display: grid;
    }

    .home-hero-actions .btn {
        width: 100%;
    }

    .home-featured-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Home steps */
.home-steps {
    background: #fff;
}

.home-steps h2 {
    max-width: 760px;
    margin: 0 0 .7rem;
    color: var(--ink);
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1;
    font-weight: 900;
}

.home-steps .container > div:first-child > p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    font-size: 1.12rem;
    line-height: 1.5;
    font-weight: 720;
}

.home-step-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px dashed rgba(7, 18, 13, .18);
    border-radius: 8px;
    background: rgba(255, 255, 255, .82);
}

.home-step {
    min-height: 300px;
    padding: clamp(1.3rem, 3vw, 2.2rem);
}

.home-step + .home-step {
    border-left: 1px solid rgba(7, 18, 13, .14);
}

.home-step-number {
    display: block;
    margin-bottom: 1.8rem;
    color: transparent;
    -webkit-text-stroke: 1.4px var(--ink);
    font-size: clamp(3.2rem, 6vw, 5rem);
    line-height: .9;
    font-weight: 900;
    letter-spacing: 0;
}

.home-step h3 {
    margin: 0 0 .75rem;
    color: var(--ink);
    font-size: clamp(1.28rem, 2vw, 1.6rem);
    line-height: 1.08;
    font-weight: 900;
}

.home-step p {
    max-width: 380px;
    margin: 0;
    color: #17241d;
    font-size: 1.02rem;
    line-height: 1.55;
}

@media (max-width: 991.98px) {
    .home-step-grid {
        grid-template-columns: 1fr;
    }

    .home-step {
        min-height: 0;
    }

    .home-step + .home-step {
        border-left: 0;
        border-top: 1px solid rgba(7, 18, 13, .14);
    }

    .home-step-number {
        margin-bottom: 1.1rem;
    }
}

/* Home app section */
.home-app {
    background:
        radial-gradient(circle at 12% 0%, rgba(141, 224, 185, .2), transparent 34%),
        linear-gradient(180deg, #f8fcf9 0%, #eef8f1 100%);
}

.home-app-panel {
    overflow: visible;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 18px 48px rgba(7, 18, 13, .08);
}

.home-app-visual {
    position: relative;
    min-height: 590px;
}

.home-app-photo {
    position: absolute;
    left: clamp(.75rem, 2vw, 1.35rem);
    top: 50%;
    width: min(96%, 470px);
    height: 350px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .76);
    background:
        linear-gradient(180deg, rgba(7, 18, 13, .04), rgba(7, 18, 13, .16)),
        url('/images/home/home-app-bg.webp');
    background-size: cover;
    background-position: center bottom;
    box-shadow: 0 18px 44px rgba(7, 18, 13, .16);
    transform: translateY(-50%);
}

.home-app-visual img {
    position: absolute;
    right: clamp(-.9rem, -1.5vw, -.35rem);
    top: 50%;
    z-index: 1;
    display: block;
    width: min(92%, 440px);
    height: auto;
    filter: drop-shadow(0 28px 42px rgba(7, 18, 13, .22));
    transform: translateY(-50%);
}

.home-app-copy {
    padding: clamp(1.5rem, 4vw, 3rem);
}

.home-app h2 {
    max-width: 740px;
    margin: 0 0 .85rem;
    color: var(--ink);
    font-size: clamp(2.4rem, 5vw, 5rem);
    line-height: .98;
    font-weight: 900;
}

.home-app-copy > p:not(.home-app-note) {
    max-width: 660px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(1.1rem, 1.7vw, 1.35rem);
    line-height: 1.42;
    font-weight: 720;
}

.home-app-feature {
    min-height: 62px;
    display: grid;
    place-items: center;
    padding: .8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-weight: 900;
    text-align: center;
}

.home-app-note {
    color: #17241d;
    font-size: 1.05rem;
}

@media (max-width: 991.98px) {
    .home-app-panel {
        display: block;
    }
}

/* Home testimonials */
.home-testimonials {
    overflow: hidden;
    background:
        linear-gradient(180deg, #eef8f1 0%, #ffffff 100%);
}

.home-testimonials-heading h2 {
    max-width: 760px;
    margin: 0;
    color: var(--ink);
    font-size: clamp(2.2rem, 4.4vw, 4.55rem);
    line-height: .96;
    font-weight: 900;
}

.home-testimonials-heading p {
    max-width: 440px;
    margin: 0;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.5;
    font-weight: 720;
}

.home-testimonials-track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: .25rem 0 1rem;
}

.home-testimonial-card {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow: hidden;
    padding: clamp(1.15rem, 2.5vw, 1.55rem);
    border: 1px solid rgba(7, 18, 13, .12);
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(7, 18, 13, .1);
}

.home-testimonial-card-green {
    background: var(--brand);
    color: var(--ink);
}

.home-testimonial-card-ink {
    background: var(--ink);
    color: #fff;
}

.home-testimonial-card-white {
    background: #fff;
    color: var(--ink);
}

.home-testimonial-person {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: .9rem;
}

.home-testimonial-person img {
    flex: 0 0 74px;
    width: 74px;
    height: 74px;
    border: 4px solid rgba(255, 255, 255, .72);
    border-radius: 999px;
    object-fit: cover;
    box-shadow: 0 12px 26px rgba(7, 18, 13, .18);
}

.home-testimonial-person h3 {
    margin: 0 0 .18rem;
    font-size: 1.14rem;
    line-height: 1.1;
    font-weight: 900;
}

.home-testimonial-person span {
    display: block;
    color: currentColor;
    font-size: .86rem;
    font-weight: 900;
    opacity: .68;
}

.home-testimonial-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    line-height: 1.15;
    font-weight: 900;
}

@media (min-width: 1200px) {
    .home-testimonials-track {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .home-testimonials-track {
        grid-template-columns: 1fr;
    }
}

/* Home SEO finish */
.home-seo {
    background: #fff;
}

.home-seo-copy {
    max-width: 900px;
}

.home-seo h2 {
    margin: 0 0 1rem;
    color: var(--ink);
    font-size: clamp(2.2rem, 4.6vw, 4.7rem);
    line-height: .98;
    font-weight: 900;
}

.home-seo p {
    max-width: 790px;
    margin: 0 auto 1rem;
    color: var(--muted);
    font-size: clamp(1.05rem, 1.45vw, 1.24rem);
    line-height: 1.58;
    font-weight: 680;
}




















.content-hero {
    display: flex;
    align-items: center;
    min-height: clamp(120px, 16vw, 180px);
    padding: clamp(1.5rem, 3.5vw, 3rem) 0;
    background: linear-gradient(180deg, #f8fcf9 0%, #eef8f1 100%);
}

.content-hero h1 {
    max-width: 900px;
    margin: 0;
    color: var(--ink);
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    line-height: .98;
    font-weight: 900;
}

.content-page {
    background: #fff;
}

.content-page h2,
.content-page h3 {
    color: var(--ink);
    font-weight: 900;
}

.content-page p,
.content-page li {
    color: #526159;
    font-size: 1.1rem;
    line-height: 1.68;
}

.content-page .btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--ink);
}

.content-page .btn-primary:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--brand);
}

.content-page a:not(.btn) {
    color: var(--ink);
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: var(--brand);
    text-decoration-thickness: .14em;
    text-underline-offset: .2em;
}

.place-hero {
    padding: 28px 0;
    background: #fff;
}

.place-hero-panel {
    overflow: hidden;
    border-radius: 8px;
    background: var(--surface-soft);
    box-shadow: var(--shadow);
}

.place-hero-copy {
    padding: clamp(1.4rem, 3vw, 2.5rem);
}

.place-hero h1 {
    margin: 0 0 .9rem;
    color: var(--ink);
    font-size: clamp(2.5rem, 5vw, 4.8rem);
    line-height: .98;
    font-weight: 900;
}

.place-hero p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.55;
}

.place-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.35rem;
}

.place-hero img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
}

.place-map-section {
    padding: clamp(2rem, 5vw, 4rem) 0;
    background: linear-gradient(180deg, #f8fcf9 0%, #eef8f1 100%);
}

.place-map-heading {
    max-width: 760px;
    margin-bottom: 1.5rem;
}

.place-map-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
    font-weight: 900;
}

.place-map-shell,
.place-map-card {
    overflow: hidden;
    border: 1px solid rgba(7, 18, 13, .12);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(7, 18, 13, .1);
}

.place-map,
.place-mini-map {
    width: 100%;
    z-index: 1;
}

.place-map {
    height: min(64vh, 620px);
    min-height: 420px;
}

.place-mini-map {
    height: 340px;
}

.place-map-card {
    height: 100%;
    padding: 1rem;
}

.place-map-card h3 {
    margin: .15rem 0 1rem;
    color: var(--ink);
    font-weight: 900;
}

.place-map-card dl {
    display: grid;
    gap: .35rem 1rem;
    grid-template-columns: max-content 1fr;
    margin: 1rem 0 0;
}

.place-map-card dt {
    color: var(--ink);
    font-weight: 900;
}

.place-map-card dd {
    margin: 0;
    color: var(--muted);
}

.place-map-card p {
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
}

.route-map-message {
    margin: 0;
    padding: 1rem;
    color: var(--muted);
    font-weight: 800;
    text-align: center;
}

.route-marker {
    display: grid;
    place-items: center;
}

.route-marker span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 3px solid #fff;
    border-radius: 999px;
    background: var(--brand);
    color: var(--ink);
    box-shadow: 0 10px 24px rgba(7, 18, 13, .28);
}

.route-marker i {
    font-size: 1rem;
    line-height: 1;
}

.route-marker-finish span {
    background: var(--ink);
    color: var(--brand);
}

.place-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.place-detail-item {
    padding: 1.2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.challenge-cancel {
    margin-top: 1.4rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.challenge-back-link {
    margin-top: 1.5rem;
}

.challenge-back-link .btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.challenge-cancel form {
    display: inline;
}

.challenge-cancel-link {
    padding: 0;
    color: var(--muted);
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: .2em;
}

.challenge-cancel-link:hover {
    color: var(--ink);
}

.challenge-cancel p {
    margin: .35rem 0 0;
    color: var(--muted);
    font-size: .92rem;
}

.challenge-cancel-modal {
    border: 0;
    border-radius: 8px;
}

.challenge-cancel-modal .modal-title {
    color: var(--ink);
    font-weight: 900;
}

.challenge-cancel-modal .modal-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.challenge-cancel-modal .modal-footer form {
    margin: 0;
}

@media (max-width: 767.98px) {
    .place-detail-grid {
        grid-template-columns: 1fr;
    }

    .place-hero img {
        min-height: 240px;
    }

    .place-map-card dl {
        grid-template-columns: 1fr;
    }
}

/* Completed progress: keep list and challenge hero charts visually identical. */
.challenge-list-card.is-completed .progress-ring,
.challenge-hero .hero-progress.is-completed .progress-ring {
    background: conic-gradient(#813221 calc(var(--progress) * 1%), #ffe0d6 0) !important;
}

.challenge-list-card.is-completed .challenge-card-progress,
.challenge-hero .hero-progress.is-completed .progress-track {
    background: #813221 !important;
}

.challenge-list-card.is-completed .challenge-card-progress > span,
.challenge-hero .hero-progress.is-completed .progress-track > span,
.challenge-hero .hero-progress.is-completed #challenge-progress-bar {
    background: #813221 !important;
    box-shadow: none !important;
    filter: none !important;
    opacity: 1 !important;
    border-radius: inherit !important;
}
/* Bagsta app shell */
.app-body {
    min-height: 100vh;
    background: #f3f8f4;
    color: #07140c;
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

.app-shell-header {
    position: sticky;
    top: 0;
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 1rem;
    background: #07140c;
    border-bottom: 4px solid #8de0b9;
}

.app-shell-brand img {
    display: block;
    width: 112px;
    height: auto;
}

.app-shell-status {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: .35rem .8rem;
    border-radius: 999px;
    background: #07140c;
    color: #8de0b9;
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.app-main {
    min-height: calc(100vh - 78px);
}

.app-page {
    width: min(100%, 720px);
    margin: 0 auto;
    padding: 1rem 1rem 1.5rem;
}

.app-page-heading {
    margin-bottom: 1rem;
}

.app-page-heading h1,
.app-challenge-hero h1 {
    margin: .2rem 0 0;
    font-size: clamp(2rem, 9vw, 3.5rem);
    line-height: .95;
}

.app-back-link {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    margin-bottom: 1rem;
    color: #496052;
    font-weight: 900;
    text-decoration: none;
}

.app-filter-tabs,
.app-view-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: .35rem;
    margin-bottom: 1rem;
    padding: .3rem;
    border: 2px solid rgba(7, 20, 12, .08);
    border-radius: 8px;
    background: #e8f3ed;
}

.app-filter-tabs a,
.app-view-tabs a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 44px;
    padding: .45rem .5rem;
    border-radius: 8px;
    color: #496052;
    font-size: .78rem;
    font-weight: 750;
    text-align: center;
    text-decoration: none;
}

.app-filter-tabs a span {
    color: #07140c;
}

.app-filter-tabs a.active,
.app-view-tabs a.active {
    background: #07140c;
    color: #8de0b9;
}

.app-filter-tabs a.active span {
    color: #fff;
}

.app-challenge-list,
.app-leaderboard {
    display: grid;
    gap: .75rem;
}

.app-challenge-card,
.app-leader-row,
.app-action-panel,
.app-offline-panel,
.app-form,
.app-empty-state,
.app-challenge-hero,
.app-map-shell {
    border: 1px solid rgba(7, 20, 12, .08);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(7, 20, 12, .06);
}

.app-challenge-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    padding: 1.1rem;
    color: inherit;
    text-decoration: none;
}

.app-leader-row.is-complete {
    border-color: rgba(129, 50, 33, .28);
    background: #fff7f5;
}

.app-challenge-main h2,
.app-place-copy h2 {
    margin: .12rem 0 0;
    font-size: 1.25rem;
    line-height: 1.08;
}

.app-place-copy h2 {
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.12;
}

.app-challenge-main h2 {
    max-width: 100%;
    font-size: clamp(1.25rem, 5.2vw, 1.25rem);
    font-weight: 950;
    letter-spacing: 0;
    line-height: 1;
}

.app-challenge-main p {
    margin: .55rem 0 0;
    color: #496052;
    font-size: .95rem;
}

.app-card-meta,
.app-place-copy span {
    color: #52b98d;
    font-size: .75rem;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.app-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    align-items: center;
}

.app-card-status-text {
    color: #607368;
}

.app-card-status-not-started {
    color: #d89b00;
}

.app-card-status-in-progress {
    color: #1684c6;
}

.app-card-status-completed {
    color: #813221;
}

.app-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .7rem;
}

.app-card-badges span {
    padding: .25rem .55rem;
    border-radius: 999px;
    background: #eef3f0;
    color: #496052;
    font-size: .74rem;
    font-weight: 900;
}

.app-progress-total small {
    color: #607368;
    font-size: .62rem;
    font-weight: 950;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: uppercase;
}

.app-progress-total {
    display: grid;
    align-self: center;
    justify-items: center;
    min-width: 74px;
}

.app-progress-total strong {
    color: #07140c;
    font-size: clamp(1.35rem, 5vw, 1.65rem);
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
}

.app-progress-total strong span:first-child {
    color: #52b98d;
}

.app-challenge-hero {
    display: grid;
    gap: .75rem;
    padding: 1.15rem;
    margin-bottom: .8rem;
    background: linear-gradient(145deg, #07140c, #143c2a);
    color: #fff;
}

.app-challenge-hero .app-card-meta {
    color: #8de0b9;
}

.app-hero-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem .7rem;
    margin: 0;
}

.app-challenge-hero h1 {
    margin: 0;
    max-width: 100%;
    font-size: clamp(2rem, 8vw, 3rem);
    font-weight: 750;
    letter-spacing: 0;
    line-height: 1;
    overflow-wrap: normal;
}

.app-hero-status {
    display: inline-block;
    font-size: .82rem;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.app-hero-stat-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin: 0;
}

.app-hero-count {
    display: flex;
    align-items: flex-end;
}

.app-hero-count strong {
    color: #fff;
    font-size: clamp(1.45rem, 5.5vw, 1.95rem);
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
}

.app-hero-count strong span:first-child {
    color: #8de0b9;
}

.app-hero-count em {
    display: none;
}

.app-hero-percent {
    display: flex;
    align-items: flex-end;
    padding-bottom: .05rem;
}

.app-hero-percent em {
    color: rgba(255, 255, 255, .9);
    font-size: clamp(1.1rem, 4.6vw, 1.45rem);
    font-style: normal;
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
}

.app-progress-bar {
    height: 12px;
    margin-top: 0;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
}

.app-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #8de0b9;
}

.app-hero-progress-bar {
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: inset 0 0 0 1px rgba(7, 20, 12, .2);
}

.app-action-panel,
.app-offline-panel,
.app-form,
.app-empty-state {
    padding: 1rem;
    margin-bottom: 1rem;
}

.app-action-panel p,
.app-offline-panel span,
.app-empty-state p,
.app-help-text {
    color: #496052;
}

.app-place-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    align-items: center;
    gap: .75rem;
    padding: .9rem .75rem .9rem .9rem;
    cursor: pointer;
}

.app-place-list-panel {
    overflow: hidden;
    border: 1px solid rgba(7, 20, 12, .08);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(7, 20, 12, .06);
}

.app-place-list-panel .app-place-row {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.app-place-list-panel .app-place-row + .app-place-row {
    border-top: 1px dashed rgba(82, 185, 141, .45);
}

.app-place-row .bag-button {
    justify-self: end;
    width: 76px;
    min-width: 76px;
    min-height: 40px;
    padding: .45rem .65rem;
    border-radius: 8px;
    font-size: .86rem;
}

.app-place-row.is-bagged {
    background: #effaf5;
    border-color: rgba(82, 185, 141, .3);
}

.app-sync-icon {
    display: none;
    position: absolute;
    top: 50%;
    right: .25rem;
    transform: translateY(-50%);
    color: #8b5cf6;
    font-size: 1.05rem;
}

.app-place-row.has-pending-sync .app-sync-icon {
    display: inline-grid;
    place-items: center;
}

.app-place-row.has-pending-sync .bag-button {
    margin-right: 1.35rem;
}

.app-offline-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.app-offline-panel strong,
.app-offline-panel span {
    display: block;
}

.app-challenge-map {
    height: min(72vh, 620px);
    min-height: 460px;
    border-radius: 8px;
}

.app-map-shell {
    overflow: hidden;
}

.app-place-drawer {
    height: auto;
    max-height: 72vh;
    border-radius: 8px 8px 0 0;
}

.app-place-drawer h2 {
    font-size: 1.55rem;
}

.app-drawer-actions {
    display: grid;
    gap: .55rem;
}

.app-leader-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: .8rem;
    padding: .85rem;
}

.app-leader-position {
    display: grid;
    place-items: center;
    width: 42px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #07140c;
    color: #fff;
    font-weight: 950;
}

.app-leader-row.is-me {
    background: #e7fbf2;
    border-color: rgba(141, 224, 185, .6);
}

.app-leader-row div {
    display: grid;
}

.app-leader-row strong {
    font-size: 1.05rem;
}

.app-leader-row span,
.app-leader-row em {
    color: #607368;
    font-size: .85rem;
    font-style: normal;
    font-weight: 900;
}

.app-leader-row b {
    font-size: 1.25rem;
}

.app-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .55rem;
    padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(7, 20, 12, .12);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(14px);
}

.app-bottom-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 52px;
    border-radius: 8px;
    color: #496052;
    font-weight: 950;
    text-decoration: none;
}

.app-bottom-nav a.active {
    background: #07140c;
    color: #8de0b9;
}

.app-empty-logo {
    display: block;
    width: 150px;
    margin-bottom: 1rem;
}

.app-profile-page {
    padding-top: 1.25rem;
}

.app-profile-panel {
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 24, 30, .1);
}

.app-profile-panel .account-form {
    margin-top: 0;
}

.download-app-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.download-app-desktop-note {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .download-app-actions [data-install-app] {
        display: none;
    }

    .download-app-preview {
        --bs-btn-padding-x: 1.5rem;
    }

    .download-app-phone-note {
        display: none;
    }

    .download-app-desktop-note {
        display: block;
    }
}

@media (max-width: 440px) {
    .app-filter-tabs {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-flow: row;
    }

    .app-view-tabs a {
        font-size: .72rem;
        padding-inline: .25rem;
    }

    .app-challenge-card {
        grid-template-columns: minmax(0, 1fr) 76px;
    }

    .app-place-row {
        grid-template-columns: minmax(0, 1fr) 76px;
    }

    .app-offline-panel {
        display: grid;
    }

    .app-challenge-hero h1 {
        font-size: clamp(1.75rem, 8.2vw, 2.35rem);
    }
}
