:root {
    --ca-bg: #07100a;
    --ca-bg-soft: #0b1710;
    --ca-panel: rgba(17, 36, 23, .78);
    --ca-panel-solid: #112417;
    --ca-green: #4fe15f;
    --ca-green-2: #a4ff58;
    --ca-green-dark: #1d7c33;
    --ca-text: #f4fff6;
    --ca-muted: #9db7a4;
    --ca-border: rgba(130, 255, 142, .14);
    --ca-red: #ff4242;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ca-text);
    background:
        radial-gradient(circle at 15% 5%, rgba(57, 196, 73, .18), transparent 30%),
        radial-gradient(circle at 85% 35%, rgba(164, 255, 88, .08), transparent 25%),
        var(--ca-bg);
    font-family: "Inter", sans-serif;
    min-height: 100vh;
}

.site-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .025;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: "Outfit", sans-serif;
}

a {
    text-decoration: none;
}

.glass-nav {
    padding: 14px 0;
    background: rgba(4, 12, 7, .72);
    border-bottom: 1px solid var(--ca-border);
    backdrop-filter: blur(18px);
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: -.03em;
    font-size: 1.3rem;
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.nav-link {
    color: rgba(255,255,255,.72);
    font-weight: 600;
    border-radius: 10px;
    padding: .65rem .8rem !important;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(79, 225, 95, .1);
}

.dropdown-menu {
    border-color: var(--ca-border);
    background: #0d1b12;
}

.btn-youtube {
    color: white;
    background: var(--ca-red);
    border: 0;
    font-weight: 700;
    border-radius: 12px;
    padding: .72rem 1rem;
    box-shadow: 0 10px 28px rgba(255, 66, 66, .18);
}

.btn-youtube:hover {
    color: white;
    background: #ff2e2e;
    transform: translateY(-1px);
}

.btn-brand {
    background: linear-gradient(135deg, var(--ca-green), var(--ca-green-2));
    color: #051008;
    border: 0;
    font-weight: 800;
    border-radius: 14px;
    padding: .82rem 1.15rem;
    box-shadow: 0 12px 34px rgba(79, 225, 95, .18);
}

.btn-brand:hover {
    color: #051008;
    transform: translateY(-2px);
}

.btn-soft {
    border: 1px solid var(--ca-border);
    color: #e9ffed;
    background: rgba(255,255,255,.035);
    border-radius: 14px;
    padding: .82rem 1.15rem;
    font-weight: 700;
}

.btn-soft:hover {
    color: white;
    border-color: rgba(130,255,142,.35);
    background: rgba(79,225,95,.08);
}

.hero {
    min-height: 760px;
    padding: 150px 0 90px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.hero::after {
    content: "";
    position: absolute;
    width: 470px;
    height: 470px;
    right: -120px;
    top: 180px;
    background: rgba(79, 225, 95, .09);
    filter: blur(80px);
    border-radius: 50%;
    z-index: -1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: var(--ca-green-2);
    padding: .5rem .8rem;
    border: 1px solid var(--ca-border);
    background: rgba(79, 225, 95, .065);
    border-radius: 999px;
    font-size: .84rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.hero-title {
    margin-top: 1.3rem;
    font-size: clamp(3rem, 6vw, 6.2rem);
    line-height: .91;
    letter-spacing: -.065em;
    font-weight: 800;
}

.text-gradient {
    color: transparent;
    background: linear-gradient(90deg, #fff, var(--ca-green-2), var(--ca-green));
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-copy {
    max-width: 620px;
    color: var(--ca-muted);
    font-size: 1.08rem;
    line-height: 1.8;
}

.hero-art-wrap {
    position: relative;
    min-height: 540px;
    display: grid;
    place-items: center;
}

.hero-art-glow {
    position: absolute;
    width: 72%;
    height: 72%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79,225,95,.3), rgba(79,225,95,0) 67%);
    filter: blur(18px);
}

.hero-art {
    width: min(100%, 580px);
    max-height: 570px;
    object-fit: contain;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 35px 50px rgba(0,0,0,.42));
}

.floating-card {
    position: absolute;
    z-index: 3;
    padding: .8rem 1rem;
    border: 1px solid var(--ca-border);
    border-radius: 16px;
    background: rgba(9, 24, 14, .82);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 50px rgba(0,0,0,.25);
}

.floating-card strong {
    display: block;
    font-family: "Outfit", sans-serif;
    font-size: 1.15rem;
}

.floating-card span {
    color: var(--ca-muted);
    font-size: .8rem;
}

.float-one { left: 0; top: 22%; }
.float-two { right: 0; bottom: 18%; }

.stat-strip {
    margin-top: -55px;
    position: relative;
    z-index: 5;
}

.stat-panel,
.content-card,
.video-card,
.person-card,
.series-card {
    border: 1px solid var(--ca-border);
    background: var(--ca-panel);
    backdrop-filter: blur(18px);
    border-radius: 22px;
}

.stat-panel {
    padding: 1.5rem;
    box-shadow: 0 25px 60px rgba(0,0,0,.24);
}

.stat-item {
    padding: 1rem 1.25rem;
    border-right: 1px solid var(--ca-border);
}

.stat-item:last-child {
    border-right: 0;
}

.stat-number {
    font-family: "Outfit", sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: -.03em;
}

.stat-label {
    color: var(--ca-muted);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
}

.section-space {
    padding: 100px 0;
}

.page-hero {
    padding: 165px 0 70px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -.045em;
    font-weight: 800;
}

.section-copy {
    color: var(--ca-muted);
    line-height: 1.75;
    max-width: 700px;
}

.video-card {
    overflow: hidden;
    height: 100%;
    transition: transform .22s ease, border-color .22s ease;
}

.video-card:hover,
.person-card:hover,
.series-card:hover,
.content-card:hover {
    transform: translateY(-5px);
    border-color: rgba(130,255,142,.32);
}

.video-thumb {
    position: relative;
    height: 230px;
    overflow: hidden;
    background: #09130d;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.video-card:hover .video-thumb img {
    transform: scale(1.035);
}

.duration {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: rgba(0,0,0,.82);
    color: white;
    padding: .25rem .5rem;
    border-radius: 7px;
    font-size: .76rem;
    font-weight: 700;
}

.video-body,
.card-body-custom {
    padding: 1.35rem;
}

.video-body p,
.card-body-custom p {
    color: var(--ca-muted);
}

.card-meta {
    color: var(--ca-green-2);
    font-size: .82rem;
    font-weight: 700;
}

.content-card {
    padding: 1.5rem;
    height: 100%;
    transition: transform .22s ease, border-color .22s ease;
}

.icon-box {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: var(--ca-green-2);
    background: rgba(79,225,95,.09);
    border: 1px solid var(--ca-border);
    font-size: 1.25rem;
}

.person-card,
.series-card {
    overflow: hidden;
    height: 100%;
    transition: transform .22s ease, border-color .22s ease;
}

.person-image,
.series-image {
    height: 240px;
    background: #0b170f;
}

.person-image img,
.series-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.status-badge {
    display: inline-flex;
    padding: .38rem .65rem;
    border-radius: 999px;
    color: #b6ffbd;
    background: rgba(79,225,95,.11);
    border: 1px solid var(--ca-border);
    font-size: .75rem;
    font-weight: 800;
}

.chart-placeholder {
    min-height: 300px;
    padding: 2rem;
    display: flex;
    align-items: end;
    gap: 12px;
}

.chart-bar {
    flex: 1;
    border-radius: 9px 9px 3px 3px;
    background: linear-gradient(180deg, var(--ca-green-2), var(--ca-green-dark));
    min-height: 25px;
    opacity: .9;
}

.site-footer {
    margin-top: 80px;
    padding: 55px 0 30px;
    border-top: 1px solid var(--ca-border);
    background: rgba(3,10,6,.65);
}

.footer-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links a {
    color: var(--ca-muted);
}

.footer-links a:hover {
    color: white;
}

.social-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-left: .35rem;
    border: 1px solid var(--ca-border);
    border-radius: 12px;
    color: white;
    background: rgba(255,255,255,.03);
}

.social-btn:hover {
    color: var(--ca-green-2);
    border-color: rgba(130,255,142,.35);
}

.site-footer hr {
    border-color: var(--ca-border);
    margin: 2rem 0 1.3rem;
}

@media (max-width: 1199px) {
    .glass-nav {
        background: rgba(4,12,7,.95);
    }
    .navbar-collapse {
        padding: 1rem 0;
    }
}

@media (max-width: 991px) {
    .hero {
        padding-top: 130px;
        text-align: center;
    }
    .hero-copy {
        margin-inline: auto;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-art-wrap {
        min-height: 480px;
        margin-top: 1rem;
    }
    .float-one { left: 8%; }
    .float-two { right: 8%; }
    .stat-strip {
        margin-top: 0;
    }
    .stat-item {
        border-right: 0;
        border-bottom: 1px solid var(--ca-border);
    }
    .stat-item:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 575px) {
    .hero {
        min-height: auto;
        padding-bottom: 55px;
    }
    .hero-title {
        font-size: 3.2rem;
    }
    .hero-art-wrap {
        min-height: 390px;
    }
    .floating-card {
        display: none;
    }
    .section-space {
        padding: 75px 0;
    }
    .page-hero {
        padding-top: 135px;
    }
}


/* Stage 2 form and admin improvements */
.creator-input,
.creator-input-group .form-control,
.creator-input-group .input-group-text {
    color: #f4fff6 !important;
    background: #0a1a10 !important;
    border-color: rgba(157, 183, 164, .42) !important;
}

.creator-input::placeholder,
.creator-input-group .form-control::placeholder {
    color: #7f9b86 !important;
    opacity: 1;
}

.creator-input:focus,
.creator-input-group .form-control:focus {
    color: #fff !important;
    background: #0d2114 !important;
    border-color: var(--ca-green) !important;
    box-shadow: 0 0 0 .22rem rgba(79, 225, 95, .12) !important;
}

.form-select.creator-input option {
    color: #f4fff6;
    background: #0a1a10;
}

.form-text {
    color: #88a891 !important;
}

.creator-alert {
    color: #f4fff6;
    background: rgba(255,255,255,.055);
    border-color: var(--ca-border);
}

.admin-auth,
.error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
}

.admin-auth-card {
    width: min(100%, 470px);
    padding: 2rem;
    border: 1px solid var(--ca-border);
    border-radius: 24px;
    background: var(--ca-panel);
    box-shadow: 0 25px 70px rgba(0,0,0,.35);
}

.admin-logo {
    width: 76px;
    height: 76px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.admin-nav {
    padding: 1rem 0;
    border-bottom: 1px solid var(--ca-border);
    background: rgba(4,12,7,.92);
}

.admin-main {
    padding: 70px 0 100px;
}

.error-mascot {
    width: min(280px, 70vw);
    height: 250px;
    object-fit: contain;
}

.error-code {
    margin: .25rem 0 0;
    font-size: clamp(5rem, 14vw, 10rem);
    line-height: .85;
    color: var(--ca-green);
    font-weight: 800;
}


.admin-shell {
    display: grid;
    grid-template-columns: 250px minmax(0,1fr);
    min-height: calc(100vh - 76px);
}
.admin-sidebar {
    padding: 1.5rem;
    border-right: 1px solid var(--ca-border);
    background: rgba(4,12,7,.72);
}
.admin-sidebar a {
    display: flex;
    gap: .8rem;
    align-items: center;
    padding: .8rem .9rem;
    margin-bottom: .35rem;
    border-radius: 12px;
    color: var(--ca-muted);
    font-weight: 700;
}
.admin-sidebar a:hover {
    color: white;
    background: rgba(79,225,95,.08);
}
.admin-content {
    padding: 2rem;
    min-width: 0;
}
.admin-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ca-text);
    --bs-table-border-color: var(--ca-border);
}
.admin-table thead th {
    color: var(--ca-muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .07em;
}
.media-thumb {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: #09130d;
    border-radius: 14px;
}
@media (max-width: 991px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar {
        display: flex;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid var(--ca-border);
    }
    .admin-sidebar a { white-space: nowrap; }
}


.person-profile-link {
    display: block;
    color: inherit;
    height: 100%;
}
.person-profile-link:hover {
    color: inherit;
}

.profile-hero {
    min-height: calc(100vh - 170px);
    display: flex;
    align-items: center;
    padding: 170px 0 90px;
}
.profile-image-wrap {
    display: inline-grid;
    place-items: center;
    width: min(100%, 360px);
    aspect-ratio: 1;
    padding: 1.5rem;
    border-radius: 30px;
    border: 1px solid var(--ca-border);
    background: var(--ca-panel);
    box-shadow: 0 30px 70px rgba(0,0,0,.28);
}
.profile-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 20px;
}
.profile-handle {
    color: var(--ca-green-2);
    font-weight: 800;
    font-size: 1.05rem;
}
.profile-description {
    max-width: 780px;
    color: var(--ca-muted);
    font-size: 1.08rem;
    line-height: 1.85;
}

.featured-friend-card {
    display: block;
    height: 100%;
    overflow: hidden;
    color: white;
    border: 1px solid var(--ca-border);
    border-radius: 22px;
    background: var(--ca-panel);
    transition: transform .22s ease, border-color .22s ease;
}
.featured-friend-card:hover {
    color: white;
    transform: translateY(-5px);
    border-color: rgba(130,255,142,.35);
}
.featured-friend-image {
    height: 215px;
    display: grid;
    place-items: center;
    background: #09150d;
}
.featured-friend-image img {
    width: 100%;
    height: 100%;
    padding: 1rem;
    object-fit: contain;
}
.featured-friend-body {
    padding: 1.25rem;
}
.featured-friend-body span {
    color: var(--ca-green-2);
    font-size: .8rem;
    font-weight: 800;
}
.featured-friend-body h3 {
    margin: .35rem 0 .5rem;
    font-size: 1.2rem;
}
.featured-friend-body p {
    color: var(--ca-muted);
    margin: 0;
    line-height: 1.6;
}


.series-profile-link {
    display: block;
    color: inherit;
    height: 100%;
}
.series-profile-link:hover { color: inherit; }

.series-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--ca-muted);
    font-size: .85rem;
}

.series-detail-hero {
    padding: 165px 0 80px;
}
.series-detail-art {
    width: min(100%, 380px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    border-radius: 28px;
    border: 1px solid var(--ca-border);
    background: var(--ca-panel);
}
.series-detail-art img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.series-detail-description {
    max-width: 800px;
    color: var(--ca-muted);
    font-size: 1.08rem;
    line-height: 1.85;
}
.series-stat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.5rem;
}
.series-stat-pills span {
    padding: .55rem .8rem;
    border-radius: 999px;
    border: 1px solid var(--ca-border);
    background: rgba(79,225,95,.06);
    color: var(--ca-muted);
}
.series-stat-pills strong { color: white; }

.season-block {
    padding: 70px 0 20px;
    border-top: 1px solid var(--ca-border);
}
.season-block:first-child {
    border-top: 0;
    padding-top: 25px;
}

.episode-badge,
.series-video-badge,
.popular-badge {
    position: absolute;
    z-index: 2;
    padding: .34rem .55rem;
    border-radius: 8px;
    font-size: .72rem;
    font-weight: 800;
    backdrop-filter: blur(10px);
}
.episode-badge {
    left: 12px;
    bottom: 12px;
    color: #07100a;
    background: var(--ca-green-2);
}
.series-video-badge {
    left: 12px;
    top: 12px;
    color: white;
    background: rgba(5,20,10,.86);
    border: 1px solid var(--ca-border);
}
.popular-badge {
    left: 12px;
    top: 12px;
    color: #fff;
    background: rgba(255,83,42,.88);
}

.video-detail-page {
    padding: 135px 0 90px;
}
.video-player-wrap {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    border: 1px solid var(--ca-border);
    background: #000;
    box-shadow: 0 28px 70px rgba(0,0,0,.3);
}
.video-player-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.video-detail-title {
    font-size: clamp(2rem, 4vw, 3.6rem);
    letter-spacing: -.045em;
    font-weight: 800;
}
.video-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--ca-muted);
}
.video-description {
    white-space: normal;
    color: var(--ca-muted);
    line-height: 1.8;
    max-height: 480px;
    overflow: auto;
}
.video-series-link {
    display: inline-flex;
    margin-top: .4rem;
    color: var(--ca-green-2);
    font-size: .82rem;
    font-weight: 800;
}

.featured-series-card {
    display: block;
    height: 100%;
    overflow: hidden;
    color: white;
    border: 1px solid var(--ca-border);
    border-radius: 22px;
    background: var(--ca-panel);
    transition: transform .22s ease, border-color .22s ease;
}
.featured-series-card:hover {
    color: white;
    transform: translateY(-5px);
    border-color: rgba(130,255,142,.35);
}
.featured-series-art {
    height: 260px;
    display: grid;
    place-items: center;
    background: #09150d;
}
.featured-series-art img {
    width: 100%;
    height: 100%;
    padding: 1rem;
    object-fit: contain;
}
.featured-series-content { padding: 1.35rem; }
.featured-series-content span {
    color: var(--ca-green-2);
    font-size: .78rem;
    font-weight: 800;
}
.featured-series-content h3 {
    margin: .4rem 0 .55rem;
    font-size: 1.35rem;
}
.featured-series-content p {
    color: var(--ca-muted);
    margin: 0;
}


.media-stat-pill {
    display: inline-flex;
    align-items: center;
    padding: .55rem .8rem;
    border: 1px solid var(--ca-border);
    border-radius: 999px;
    color: var(--ca-muted);
    background: rgba(79,225,95,.05);
    font-size: .82rem;
    font-weight: 700;
}

.media-drop-zone {
    position: relative;
    min-height: 210px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: .45rem;
    padding: 2rem;
    border: 2px dashed rgba(130,255,142,.25);
    border-radius: 20px;
    background: rgba(79,225,95,.035);
    text-align: center;
    transition: border-color .2s ease, background .2s ease;
    cursor: pointer;
}
.media-drop-zone:hover,
.media-drop-zone.dragging {
    border-color: var(--ca-green);
    background: rgba(79,225,95,.08);
}
.media-drop-zone > i {
    color: var(--ca-green-2);
    font-size: 2.2rem;
}
.media-drop-zone > span {
    color: var(--ca-muted);
    font-size: .85rem;
}
.media-drop-zone input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.media-upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1rem;
}
.media-upload-preview-item {
    width: 110px;
    overflow: hidden;
    border: 1px solid var(--ca-border);
    border-radius: 12px;
    background: #09150d;
}
.media-upload-preview-item img {
    width: 100%;
    height: 82px;
    object-fit: cover;
}
.media-upload-preview-item span {
    display: block;
    padding: .45rem;
    color: var(--ca-muted);
    font-size: .7rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.media-manager-grid,
.media-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.15rem;
}
.media-manager-card {
    overflow: hidden;
    border: 1px solid var(--ca-border);
    border-radius: 18px;
    background: var(--ca-panel);
}
.media-manager-image {
    position: relative;
    height: 190px;
    display: grid;
    place-items: center;
    background: #07120b;
}
.media-manager-image img {
    width: 100%;
    height: 100%;
    padding: .6rem;
    object-fit: contain;
}
.media-usage-badge {
    position: absolute;
    top: .7rem;
    right: .7rem;
    padding: .3rem .5rem;
    border-radius: 999px;
    color: white;
    background: rgba(0,0,0,.72);
    font-size: .7rem;
    font-weight: 800;
}
.media-manager-body {
    padding: 1rem;
}
.media-modal-preview {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    padding: .75rem;
    border-radius: 14px;
    background: #07120b;
}

.image-picker-layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 1.25rem;
    padding: 1rem;
    border: 1px solid var(--ca-border);
    border-radius: 18px;
    background: rgba(79,225,95,.025);
}
.image-picker-preview {
    min-height: 170px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #07120b;
}
.image-picker-preview img {
    width: 100%;
    height: 170px;
    padding: .5rem;
    object-fit: contain;
}
.image-picker-controls {
    min-width: 0;
}

.modal-content {
    color: var(--ca-text);
    border: 1px solid var(--ca-border);
    background: #0a1910;
}
.modal-header,
.modal-footer {
    border-color: var(--ca-border);
}
.media-picker-item {
    overflow: hidden;
    padding: 0;
    color: white;
    border: 1px solid var(--ca-border);
    border-radius: 14px;
    background: #0c1d12;
    text-align: left;
    transition: transform .18s ease, border-color .18s ease;
}
.media-picker-item:hover {
    transform: translateY(-3px);
    border-color: var(--ca-green);
}
.media-picker-item img {
    width: 100%;
    height: 150px;
    padding: .4rem;
    object-fit: contain;
    background: #07120b;
}
.media-picker-item span,
.media-picker-item small {
    display: block;
    padding-inline: .75rem;
}
.media-picker-item span {
    padding-top: .65rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.media-picker-item small {
    padding-top: .2rem;
    padding-bottom: .7rem;
    color: var(--ca-muted);
}
.grid-column-full {
    grid-column: 1 / -1;
}

@media (max-width: 767px) {
    .image-picker-layout {
        grid-template-columns: 1fr;
    }
}


.friends-page-hero {
    padding-bottom: 55px;
}
.community-count {
    display: inline-flex;
    padding: .65rem .9rem;
    color: var(--ca-green-2);
    border: 1px solid var(--ca-border);
    border-radius: 999px;
    background: rgba(79,225,95,.055);
    font-size: .82rem;
    font-weight: 800;
}
.friends-directory {
    padding-top: 15px;
}

.creator-directory-card {
    display: block;
    height: 100%;
    overflow: hidden;
    color: white;
    border: 1px solid var(--ca-border);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(16,38,23,.95), rgba(10,27,16,.94));
    box-shadow: 0 22px 55px rgba(0,0,0,.18);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.creator-directory-card:hover {
    color: white;
    transform: translateY(-6px);
    border-color: rgba(130,255,142,.38);
    box-shadow: 0 30px 70px rgba(0,0,0,.3);
}

.creator-directory-cover {
    position: relative;
    height: 300px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 45%, rgba(79,225,95,.13), transparent 58%),
        #07140c;
}
.creator-directory-glow {
    position: absolute;
    width: 65%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(79,225,95,.14);
    filter: blur(45px);
}
.creator-directory-cover img {
    position: relative;
    z-index: 1;
    width: calc(100% - 34px);
    height: calc(100% - 34px);
    object-fit: contain;
    border-radius: 16px;
}
.creator-card-arrow {
    position: absolute;
    z-index: 2;
    top: 1rem;
    right: 1rem;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: white;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 13px;
    background: rgba(3,13,7,.72);
    backdrop-filter: blur(10px);
    transition: transform .2s ease, background .2s ease;
}
.creator-directory-card:hover .creator-card-arrow {
    transform: rotate(7deg);
    color: #07100a;
    background: var(--ca-green-2);
}

.creator-directory-body {
    padding: 1.4rem;
}
.creator-handle {
    color: var(--ca-green-2);
    font-size: .8rem;
    font-weight: 800;
}
.creator-directory-body h2 {
    margin: .35rem 0 .7rem;
    font-size: 1.45rem;
}
.creator-directory-body p {
    min-height: 3.2rem;
    margin: 0;
    color: var(--ca-muted);
    line-height: 1.62;
}
.creator-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.2rem;
    padding-top: 1rem;
    color: #eaffed;
    border-top: 1px solid var(--ca-border);
    font-size: .84rem;
    font-weight: 800;
}
.empty-directory-state > i {
    color: var(--ca-green-2);
    font-size: 2.4rem;
}

.creator-profile-page {
    position: relative;
    min-height: calc(100vh - 60px);
    padding: 145px 0 95px;
    overflow: hidden;
}
.creator-profile-background {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 30%, rgba(79,225,95,.18), transparent 28%),
        radial-gradient(circle at 88% 65%, rgba(164,255,88,.08), transparent 24%);
    pointer-events: none;
}
.profile-back-link {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1.4rem;
    color: var(--ca-muted);
    font-weight: 700;
}
.profile-back-link:hover {
    color: white;
}

.creator-profile-panel {
    display: grid;
    grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr);
    overflow: hidden;
    min-height: 590px;
    border: 1px solid var(--ca-border);
    border-radius: 30px;
    background: rgba(8,24,13,.84);
    box-shadow: 0 35px 90px rgba(0,0,0,.32);
    backdrop-filter: blur(18px);
}
.creator-profile-visual {
    position: relative;
    display: grid;
    place-items: center;
    padding: 2rem;
    background:
        radial-gradient(circle at center, rgba(79,225,95,.14), transparent 60%),
        #07140c;
}
.creator-profile-image {
    position: relative;
    z-index: 2;
    width: min(100%, 430px);
    aspect-ratio: 1;
    overflow: hidden;
    padding: 1rem;
    border: 1px solid rgba(130,255,142,.18);
    border-radius: 26px;
    background: rgba(0,0,0,.18);
    box-shadow: 0 25px 55px rgba(0,0,0,.28);
}
.creator-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 18px;
}
.profile-visual-accent {
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(79,225,95,.16);
    filter: blur(65px);
}
.creator-profile-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 5vw, 5rem);
}
.creator-profile-content h1 {
    margin: 1.1rem 0 .3rem;
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: .95;
    letter-spacing: -.055em;
    font-weight: 800;
}
.creator-profile-handle {
    color: var(--ca-green-2);
    font-size: 1rem;
    font-weight: 800;
}
.creator-profile-description {
    max-width: 760px;
    margin-top: 1.4rem;
    color: var(--ca-muted);
    font-size: 1.05rem;
    line-height: 1.85;
}
.creator-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
    margin-top: 2rem;
}

@media (max-width: 991px) {
    .creator-profile-panel {
        grid-template-columns: 1fr;
    }
    .creator-profile-visual {
        min-height: 440px;
    }
}
@media (max-width: 575px) {
    .creator-directory-cover {
        height: 255px;
    }
    .creator-profile-page {
        padding-top: 120px;
    }
    .creator-profile-panel {
        border-radius: 22px;
    }
    .creator-profile-content {
        padding: 1.5rem;
    }
    .creator-profile-content h1 {
        font-size: 2.7rem;
    }
}


.friends-showcase-hero {
    padding: 175px 0 85px;
    border-bottom: 1px solid var(--ca-border);
    background:
        linear-gradient(110deg, rgba(5,18,9,.92), rgba(5,18,9,.55)),
        radial-gradient(circle at 18% 35%, rgba(79,225,95,.22), transparent 34%);
}
.friends-showcase-copy {
    max-width: 900px;
}
.friends-showcase-copy h1 {
    max-width: 820px;
    margin: 1.25rem 0 1rem;
    font-size: clamp(3.5rem, 8vw, 7rem);
    line-height: .9;
    letter-spacing: -.07em;
    font-weight: 800;
}
.friends-showcase-copy p {
    max-width: 700px;
    margin: 0;
    color: var(--ca-muted);
    font-size: 1.12rem;
    line-height: 1.8;
}

.friends-showcase-grid-section {
    padding: 75px 0 110px;
}
.friends-showcase-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 2rem;
}
.friends-showcase-heading span {
    color: var(--ca-green-2);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .09em;
}
.friends-showcase-heading h2 {
    margin: .35rem 0 0;
    font-size: 2.4rem;
}
.friends-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
.friend-showcase-card {
    overflow: hidden;
    color: white;
    border: 1px solid var(--ca-border);
    border-radius: 28px;
    background: #0a1c11;
    box-shadow: 0 28px 65px rgba(0,0,0,.22);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.friend-showcase-card:hover {
    color: white;
    transform: translateY(-8px);
    border-color: rgba(164,255,88,.5);
    box-shadow: 0 38px 80px rgba(0,0,0,.34);
}
.friend-showcase-art {
    position: relative;
    height: 360px;
    overflow: hidden;
    background:
        radial-gradient(circle at center, rgba(79,225,95,.15), transparent 60%),
        #061109;
}
.friend-showcase-art img {
    width: 100%;
    height: 100%;
    padding: 1.2rem;
    object-fit: contain;
    transition: transform .35s ease;
}
.friend-showcase-card:hover .friend-showcase-art img {
    transform: scale(1.035);
}
.friend-showcase-overlay {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(transparent, rgba(5,15,8,.86));
    pointer-events: none;
}
.friend-open-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: #07100a;
    border-radius: 14px;
    background: var(--ca-green-2);
    box-shadow: 0 12px 28px rgba(164,255,88,.18);
}
.friend-showcase-info {
    padding: 1.55rem;
}
.friend-showcase-handle {
    color: var(--ca-green-2);
    font-size: .8rem;
    font-weight: 800;
}
.friend-showcase-info h3 {
    margin: .35rem 0 .65rem;
    font-size: 1.7rem;
}
.friend-showcase-info p {
    min-height: 3.4rem;
    margin: 0;
    color: var(--ca-muted);
    line-height: 1.65;
}
.friend-showcase-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ca-border);
    font-size: .86rem;
    font-weight: 800;
}

@media (max-width: 575px) {
    .friends-showcase-hero {
        padding-top: 135px;
    }
    .friends-showcase-copy h1 {
        font-size: 3.4rem;
    }
    .friend-showcase-art {
        height: 290px;
    }
}


/* Stage 4.3.2 — Featured friend artwork cleanup */
.featured-friend-image {
    position: relative;
    height: 250px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 42%, rgba(164,255,88,.14), transparent 56%),
        #07140c;
}
.featured-friend-avatar {
    width: 190px;
    height: 190px;
    overflow: hidden;
    border: 1px solid rgba(164,255,88,.22);
    border-radius: 50%;
    background: rgba(0,0,0,.2);
    box-shadow: 0 18px 45px rgba(0,0,0,.28);
}
.featured-friend-avatar img {
    width: 100%;
    height: 125%;
    padding: 0;
    object-fit: cover;
    object-position: center top;
    transform: translateY(-2%);
}
.featured-friend-body {
    min-height: 175px;
}

.friend-showcase-art {
    display: grid;
    place-items: center;
}
.friend-showcase-avatar {
    position: relative;
    z-index: 1;
    width: 245px;
    height: 245px;
    overflow: hidden;
    border: 1px solid rgba(164,255,88,.22);
    border-radius: 28px;
    background: rgba(0,0,0,.18);
    box-shadow: 0 20px 55px rgba(0,0,0,.28);
}
.friend-showcase-avatar img {
    width: 100%;
    height: 125%;
    padding: 0;
    object-fit: cover;
    object-position: center top;
    transform: translateY(-2%);
}
.friend-showcase-art > img {
    display: none;
}

@media (max-width: 575px) {
    .featured-friend-avatar {
        width: 165px;
        height: 165px;
    }
    .friend-showcase-avatar {
        width: 210px;
        height: 210px;
    }
}


.profile-links-editor {
    padding: 1.25rem;
    border: 1px solid var(--ca-border);
    border-radius: 18px;
    background: rgba(79,225,95,.025);
}
.profile-link-edit-row {
    display: grid;
    grid-template-columns: 1fr 1.6fr .8fr auto;
    align-items: end;
    gap: .75rem;
    margin-top: .85rem;
    padding: .9rem;
    border: 1px solid var(--ca-border);
    border-radius: 14px;
    background: rgba(4,15,8,.45);
}
.profile-link-remove {
    height: 42px;
    width: 42px;
    padding: 0;
}

.creator-profile-links {
    margin-top: 2.1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ca-border);
}
.creator-profile-links-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: .9rem;
}
.creator-profile-links-heading span {
    color: white;
    font-weight: 800;
}
.creator-profile-links-heading small {
    color: var(--ca-muted);
}
.creator-profile-links-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}
.creator-social-link {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: .8rem;
    padding: .82rem;
    color: white;
    border: 1px solid var(--ca-border);
    border-radius: 15px;
    background: rgba(79,225,95,.035);
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.creator-social-link:hover {
    color: white;
    transform: translateY(-2px);
    border-color: rgba(164,255,88,.42);
    background: rgba(79,225,95,.08);
}
.creator-social-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: #07100a;
    border-radius: 13px;
    background: var(--ca-green-2);
    font-size: 1.1rem;
}
.creator-social-copy {
    min-width: 0;
}
.creator-social-copy strong,
.creator-social-copy small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.creator-social-copy strong {
    font-size: .88rem;
}
.creator-social-copy small {
    margin-top: .15rem;
    color: var(--ca-muted);
    font-size: .72rem;
}
.creator-social-arrow {
    color: var(--ca-muted);
}

@media (max-width: 991px) {
    .profile-link-edit-row {
        grid-template-columns: 1fr 1fr;
    }
    .profile-link-remove {
        grid-column: 2;
        justify-self: end;
    }
}
@media (max-width: 767px) {
    .creator-profile-links-grid,
    .profile-link-edit-row {
        grid-template-columns: 1fr;
    }
    .profile-link-remove {
        grid-column: 1;
    }
}


.youtube-sync-mode {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(164,255,88,.22);
    border-radius: 15px;
    background: rgba(79,225,95,.055);
}
.youtube-sync-mode > i {
    color: var(--ca-green-2);
    font-size: 1.5rem;
}
.youtube-sync-mode strong,
.youtube-sync-mode span {
    display: block;
}
.youtube-sync-mode span {
    margin-top: .2rem;
    color: var(--ca-muted);
    font-size: .82rem;
    line-height: 1.55;
}


/* Stage 4.6 — Series season tabs and episode pagination */
.series-seasons-section {
    padding-top: 30px;
}

.series-season-toolbar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2.2rem;
}

.series-season-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    padding: .7rem;
    border: 1px solid var(--ca-border);
    border-radius: 18px;
    background: rgba(8, 24, 13, .72);
    backdrop-filter: blur(16px);
}

.series-season-tab {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    padding: .75rem 1rem;
    color: var(--ca-muted);
    border: 1px solid transparent;
    border-radius: 13px;
    background: transparent;
    font-weight: 800;
    transition:
        color .18s ease,
        background .18s ease,
        border-color .18s ease,
        transform .18s ease;
}

.series-season-tab:hover {
    color: white;
    border-color: var(--ca-border);
    background: rgba(79, 225, 95, .06);
    transform: translateY(-1px);
}

.series-season-tab.active {
    color: #061008;
    border-color: transparent;
    background: linear-gradient(
        135deg,
        var(--ca-green),
        var(--ca-green-2)
    );
    box-shadow: 0 10px 28px rgba(79, 225, 95, .17);
}

.series-season-tab small {
    min-width: 24px;
    padding: .15rem .38rem;
    color: inherit;
    border-radius: 999px;
    background: rgba(255, 255, 255, .13);
    text-align: center;
    font-size: .7rem;
}

.series-season-panel {
    display: none;
}

.series-season-panel.active {
    display: block;
    animation: seriesPanelIn .24s ease;
}

@keyframes seriesPanelIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.series-season-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.series-season-heading h3 {
    margin: .65rem 0 0;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    letter-spacing: -.035em;
}

.season-label {
    display: inline-flex;
    padding: .4rem .68rem;
    color: var(--ca-green-2);
    border: 1px solid var(--ca-border);
    border-radius: 999px;
    background: rgba(79, 225, 95, .06);
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.series-season-count {
    color: var(--ca-muted);
    white-space: nowrap;
    font-size: .85rem;
}

.series-load-more-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .8rem;
    margin-top: 2.2rem;
}

.series-visible-count {
    color: var(--ca-muted);
    font-size: .8rem;
}

.back-to-top {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 1050;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    color: #061008;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(
        135deg,
        var(--ca-green),
        var(--ca-green-2)
    );
    box-shadow: 0 15px 40px rgba(0, 0, 0, .34);
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition:
        opacity .2s ease,
        visibility .2s ease,
        transform .2s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
}

@media (min-width: 992px) {
    .series-season-toolbar {
        flex-direction: row;
        justify-content: space-between;
        align-items: end;
    }

    .series-season-tabs {
        justify-content: flex-end;
    }
}

@media (max-width: 767px) {
    .series-season-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: .85rem;
    }

    .series-season-tab {
        flex: 0 0 auto;
    }

    .series-season-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 46px;
        height: 46px;
    }
}


/* Stage 4.7 — Friend YouTube statistics */
.friend-youtube-config {
    padding: 1.25rem;
    border: 1px solid rgba(255, 66, 66, .18);
    border-radius: 18px;
    background: rgba(255, 66, 66, .035);
}

.friend-youtube-config-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.sync-time-badge {
    display: inline-flex;
    padding: .45rem .7rem;
    color: var(--ca-muted);
    border: 1px solid var(--ca-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, .03);
    white-space: nowrap;
    font-size: .72rem;
    font-weight: 700;
}

.admin-friend-avatar {
    width: 48px;
    height: 48px;
    padding: .2rem;
    object-fit: contain;
    border: 1px solid var(--ca-border);
    border-radius: 13px;
    background: #07140c;
}

.admin-mini-stats {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.admin-mini-stats span {
    padding: .3rem .48rem;
    color: var(--ca-muted);
    border: 1px solid var(--ca-border);
    border-radius: 8px;
    background: rgba(79, 225, 95, .035);
    font-size: .7rem;
}

.admin-mini-stats strong {
    color: white;
}

.friend-youtube-section {
    padding: 0 0 100px;
}

.friend-channel-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    margin-bottom: 80px;
    border: 1px solid var(--ca-border);
    border-radius: 24px;
    background: rgba(12, 31, 18, .78);
    backdrop-filter: blur(18px);
}

.friend-channel-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-right: 1px solid var(--ca-border);
}

.friend-channel-stat:last-child {
    border-right: 0;
}

.friend-channel-stat-icon {
    width: 52px;
    height: 52px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    color: var(--ca-green-2);
    border: 1px solid var(--ca-border);
    border-radius: 15px;
    background: rgba(79, 225, 95, .08);
    font-size: 1.15rem;
}

.friend-channel-stat strong,
.friend-channel-stat span {
    display: block;
}

.friend-channel-stat strong {
    font-family: "Outfit", sans-serif;
    font-size: 1.8rem;
    line-height: 1;
}

.friend-channel-stat div > span {
    margin-top: .35rem;
    color: var(--ca-muted);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.friend-latest-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 2rem;
    margin-bottom: 2rem;
}

.friend-video-meta {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    color: var(--ca-green-2);
    font-size: .76rem;
    font-weight: 700;
}

.friend-video-card .video-body {
    min-height: 135px;
}

@media (max-width: 767px) {
    .friend-channel-stats {
        grid-template-columns: 1fr;
    }

    .friend-channel-stat {
        border-right: 0;
        border-bottom: 1px solid var(--ca-border);
    }

    .friend-channel-stat:last-child {
        border-bottom: 0;
    }

    .friend-latest-heading,
    .friend-youtube-config-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* Stage 4.8 — Friend card stats and live stream indicators */
.integration-divider {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding-top: .5rem;
    color: #bf94ff;
    border-top: 1px solid var(--ca-border);
    font-weight: 800;
}

.friend-card-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
    margin-top: 1.15rem;
}

.friend-card-stats > div {
    min-width: 0;
    padding: .65rem .45rem;
    text-align: center;
    border: 1px solid var(--ca-border);
    border-radius: 12px;
    background: rgba(79, 225, 95, .035);
}

.friend-card-stats i,
.friend-card-stats strong,
.friend-card-stats span {
    display: block;
}

.friend-card-stats i {
    margin-bottom: .35rem;
    color: var(--ca-green-2);
    font-size: .9rem;
}

.friend-card-stats strong {
    color: white;
    font-size: 1rem;
}

.friend-card-stats span {
    margin-top: .18rem;
    color: var(--ca-muted);
    font-size: .58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.friend-live-badge {
    position: absolute;
    z-index: 3;
    left: 1rem;
    top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    padding: .48rem .68rem;
    color: white;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .3);
}

.friend-live-badge.youtube-live {
    background: #ff0033;
}

.friend-live-badge.twitch-live {
    background: #9146ff;
}

.creator-live-banner {
    margin: -35px 0 75px;
}

.creator-live-banner .creator-live-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.3rem;
    color: white;
    border-radius: 18px;
    box-shadow: 0 20px 55px rgba(0, 0, 0, .3);
}

.creator-live-banner.youtube .creator-live-inner {
    background: linear-gradient(115deg, #b30024, #ff0033);
}

.creator-live-banner.twitch .creator-live-inner {
    background: linear-gradient(115deg, #5d20b8, #9146ff);
}

.live-pulse {
    width: 14px;
    height: 14px;
    border: 3px solid rgba(255, 255, 255, .38);
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, .55);
    animation: livePulse 1.7s infinite;
}

@keyframes livePulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); }
    70% { box-shadow: 0 0 0 13px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.creator-live-copy span,
.creator-live-copy strong,
.creator-live-copy small {
    display: block;
}

.creator-live-copy span {
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .08em;
}

.creator-live-copy strong {
    margin-top: .18rem;
    font-size: 1.05rem;
}

.creator-live-copy small {
    margin-top: .15rem;
    color: rgba(255, 255, 255, .78);
}

.friend-channel-stat-icon {
    color: #07100a;
    border: 0;
    background: linear-gradient(135deg, var(--ca-green), var(--ca-green-2));
    box-shadow: 0 9px 25px rgba(79, 225, 95, .14);
}

@media (max-width: 767px) {
    .creator-live-banner .creator-live-inner {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .creator-live-banner .btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .friend-card-stats {
        gap: .35rem;
    }
}


/* Stage 4.8.1 — Friend stats icon correction */
.friend-channel-stat {
    min-height: 100px;
    padding: 1.45rem 1.6rem;
}

.friend-channel-stat-icon {
    position: relative;
    width: 56px;
    height: 56px;
    display: grid;
    flex: 0 0 56px;
    place-items: center;
    color: var(--ca-green-2) !important;
    border: 1px solid rgba(130, 255, 142, .24) !important;
    border-radius: 16px;
    background:
        linear-gradient(145deg, rgba(79, 225, 95, .11), rgba(79, 225, 95, .035)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.025),
        0 10px 24px rgba(0,0,0,.18) !important;
    overflow: hidden;
}

.friend-channel-stat-icon::after {
    content: "";
    position: absolute;
    inset: auto -14px -18px auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(130, 255, 142, .09);
    filter: blur(4px);
}

.friend-channel-stat-icon i {
    position: relative;
    z-index: 1;
    display: block;
    color: inherit;
    font-size: 1.32rem;
    line-height: 1;
    font-weight: normal;
}

.friend-channel-stat strong {
    color: #f7fff8;
    font-size: 1.95rem;
    letter-spacing: -.035em;
}

.friend-channel-stat div > span {
    color: #9eb3a4;
    font-size: .72rem;
    letter-spacing: .075em;
}

@media (max-width: 767px) {
    .friend-channel-stat {
        min-height: 88px;
        padding: 1.2rem;
    }

    .friend-channel-stat-icon {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
        border-radius: 14px;
    }
}


/* Stage 4.8.2 — Exact SVG icon centering */
.friend-channel-stat-icon {
    position: relative;
    width: 56px !important;
    height: 56px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 56px !important;
    padding: 0 !important;
    color: var(--ca-green-2) !important;
    border: 1px solid rgba(130, 255, 142, .24) !important;
    border-radius: 16px !important;
    background: linear-gradient(
        145deg,
        rgba(79, 225, 95, .11),
        rgba(79, 225, 95, .035)
    ) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .025),
        0 10px 24px rgba(0, 0, 0, .18) !important;
    overflow: hidden;
    line-height: 0 !important;
}

.friend-channel-stat-icon::after {
    pointer-events: none;
}

.friend-channel-stat-icon svg {
    position: relative;
    z-index: 2;
    display: block;
    width: 24px;
    height: 24px;
    margin: 0;
    overflow: visible;
    fill: currentColor;
    transform: none !important;
}

.friend-channel-stat-icon i {
    display: none !important;
}

@media (max-width: 767px) {
    .friend-channel-stat-icon {
        width: 50px !important;
        height: 50px !important;
        flex-basis: 50px !important;
    }

    .friend-channel-stat-icon svg {
        width: 22px;
        height: 22px;
    }
}


/* Stage 4.9 — Twitch live banner */
.creator-live-banner.twitch .creator-live-inner {
    color: #fff;
    border: 1px solid rgba(213, 183, 255, .34);
    background:
        radial-gradient(circle at 12% 50%, rgba(255,255,255,.15), transparent 22%),
        linear-gradient(110deg, #4f1d96 0%, #6f2bd1 45%, #9146ff 100%);
    box-shadow:
        0 20px 55px rgba(79, 29, 150, .32),
        inset 0 1px 0 rgba(255,255,255,.12);
}

.creator-live-banner.twitch .btn-light {
    color: #5b20aa;
    border-color: rgba(255,255,255,.7);
    font-weight: 800;
}

.creator-live-banner.twitch .live-pulse {
    background: #fff;
    box-shadow: 0 0 0 0 rgba(213, 183, 255, .65);
}


/* Stage 4.9.1 — Dual YouTube and Twitch live tags */
.friend-live-tags,
.featured-friend-live-tags {
    position: absolute;
    z-index: 4;
    top: 1rem;
    left: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    max-width: calc(100% - 5.5rem);
    pointer-events: none;
}

.featured-friend-live-tags {
    right: 1rem;
    max-width: calc(100% - 2rem);
}

.friend-live-tags .friend-live-badge,
.featured-friend-live-tags .friend-live-badge {
    position: static;
    inset: auto;
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    width: max-content;
    margin: 0;
    padding: .48rem .7rem;
    color: #fff;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 10px 28px rgba(0,0,0,.32);
    backdrop-filter: blur(10px);
}

.friend-live-tags .youtube-live,
.featured-friend-live-tags .youtube-live {
    background: linear-gradient(135deg, #d9002b, #ff1748);
}

.friend-live-tags .twitch-live,
.featured-friend-live-tags .twitch-live {
    background: linear-gradient(135deg, #5d20b8, #9146ff);
}

.friend-live-tags .friend-live-badge i,
.featured-friend-live-tags .friend-live-badge i {
    font-size: .78rem;
    line-height: 1;
}

.featured-friend-image {
    position: relative;
}

@media (max-width: 575px) {
    .friend-live-tags,
    .featured-friend-live-tags {
        top: .75rem;
        left: .75rem;
        right: .75rem;
        max-width: calc(100% - 1.5rem);
        gap: .35rem;
    }

    .friend-live-tags .friend-live-badge,
    .featured-friend-live-tags .friend-live-badge {
        padding: .42rem .58rem;
        font-size: .64rem;
    }
}


/* Stage 4.9.2 — Friend card polish and automatic content watch */
.friend-showcase-card {
    display: flex;
    flex-direction: column;
}
.friend-showcase-info {
    display: flex;
    flex: 1;
    flex-direction: column;
}
.friend-card-description {
    display: -webkit-box;
    min-height: 5.1rem !important;
    max-height: 5.1rem;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}
.friend-platform-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    margin-top: 1rem;
}
.friend-platform-row span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .32rem .5rem;
    color: #dfffe4;
    border: 1px solid var(--ca-border);
    border-radius: 999px;
    background: rgba(79,225,95,.04);
    font-size: .68rem;
    font-weight: 800;
}
.friend-platform-row small {
    margin-left: auto;
    color: var(--ca-muted);
    font-size: .65rem;
}
.friend-showcase-action {
    margin-top: auto;
}
.featured-friend-description {
    display: -webkit-box;
    min-height: 3.1rem;
    max-height: 3.1rem;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}
.site-watch-toast {
    position: fixed;
    z-index: 2000;
    right: 24px;
    bottom: 24px;
    display: flex;
    align-items: center;
    gap: .7rem;
    max-width: min(420px, calc(100vw - 32px));
    padding: .85rem 1rem;
    color: #f5fff7;
    border: 1px solid rgba(130,255,142,.25);
    border-radius: 14px;
    background: rgba(7,22,12,.96);
    box-shadow: 0 18px 55px rgba(0,0,0,.38);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .18s ease, transform .18s ease;
    font-size: .82rem;
    font-weight: 750;
}
.site-watch-toast.visible { opacity: 1; transform: translateY(0); }
.site-watch-pulse {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 50%;
    background: var(--ca-green-2);
    box-shadow: 0 0 0 0 rgba(164,255,88,.55);
    animation: livePulse 1.5s infinite;
}
@media (max-width: 575px) {
    .friend-card-description { min-height: 4.5rem !important; max-height: 4.5rem; }
    .friend-platform-row small { width: 100%; margin-left: 0; }
    .site-watch-toast { right: 16px; bottom: 16px; }
}


/* Stage 4.9.3 — Media Manager redesign */
.media-page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.media-page-heading h1 {
    margin: .6rem 0 .35rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -.045em;
    font-weight: 800;
}

.media-page-heading p {
    margin: 0;
    color: var(--ca-muted);
}

.media-page-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    overflow: hidden;
    border: 1px solid var(--ca-border);
    border-radius: 16px;
    background: rgba(11, 31, 17, .78);
}

.media-page-stats > div {
    padding: .8rem 1rem;
    border-right: 1px solid var(--ca-border);
}

.media-page-stats > div:last-child {
    border-right: 0;
}

.media-page-stats strong,
.media-page-stats span {
    display: block;
}

.media-page-stats strong {
    font-size: 1rem;
}

.media-page-stats span {
    margin-top: .15rem;
    color: var(--ca-muted);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.media-upload-panel {
    display: grid;
    grid-template-columns: minmax(230px, .55fr) minmax(0, 1.45fr);
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 1px solid var(--ca-border);
    border-radius: 22px;
    background:
        radial-gradient(circle at 12% 40%, rgba(79, 225, 95, .09), transparent 30%),
        rgba(11, 31, 17, .82);
}

.media-upload-copy h2 {
    margin: .8rem 0 .45rem;
    font-size: 1.55rem;
}

.media-upload-copy p {
    margin: 0;
    color: var(--ca-muted);
}

.media-upload-rules {
    display: grid;
    gap: .35rem;
    margin: 1rem 0 0;
    padding-left: 1.1rem;
    color: var(--ca-muted);
    font-size: .78rem;
}

.media-upload-form {
    min-width: 0;
}

.media-drop-zone-compact {
    min-height: 145px;
    padding: 1.25rem;
    border-radius: 17px;
}

.media-drop-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: var(--ca-green-2);
    border: 1px solid var(--ca-border);
    border-radius: 14px;
    background: rgba(79, 225, 95, .08);
    font-size: 1.25rem;
}

.media-upload-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.media-selection-summary {
    color: var(--ca-muted);
    font-size: .82rem;
}

.media-upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: .7rem;
}

.media-upload-preview-item-upgraded {
    width: auto;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    border-radius: 12px;
}

.media-upload-preview-item-upgraded img {
    width: 58px;
    height: 58px;
}

.media-upload-preview-info {
    min-width: 0;
    padding: .45rem .55rem;
}

.media-upload-preview-info strong,
.media-upload-preview-info span {
    display: block;
}

.media-upload-preview-info strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: .72rem;
}

.media-upload-preview-info span {
    margin-top: .2rem;
    color: var(--ca-muted);
    font-size: .65rem;
}

.media-library-section {
    padding: 1.3rem;
    border: 1px solid var(--ca-border);
    border-radius: 22px;
    background: rgba(8, 24, 13, .58);
}

.media-library-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.media-library-toolbar h2 {
    margin: 0;
    font-size: 1.45rem;
}

.media-library-toolbar p {
    margin: .25rem 0 0;
    color: var(--ca-muted);
    font-size: .8rem;
}

.media-filter-form {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 150px 155px auto auto;
    gap: .65rem;
    align-items: center;
}

.media-search-control {
    position: relative;
}

.media-search-control > i {
    position: absolute;
    top: 50%;
    left: .85rem;
    z-index: 2;
    color: var(--ca-muted);
    transform: translateY(-50%);
}

.media-search-control input {
    width: 100%;
    height: 42px;
    padding: .65rem .8rem .65rem 2.45rem;
    color: white;
    border: 1px solid rgba(157, 183, 164, .42);
    border-radius: 10px;
    outline: none;
    background: #0a1a10;
}

.media-search-control input:focus {
    border-color: var(--ca-green);
    box-shadow: 0 0 0 .2rem rgba(79, 225, 95, .1);
}

.media-manager-grid-upgraded {
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
    gap: 1rem;
}

.media-manager-card-upgraded {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 17px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.media-manager-card-upgraded:hover {
    transform: translateY(-3px);
    border-color: rgba(130, 255, 142, .32);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .22);
}

.media-card-preview {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    padding: 0;
    border: 0;
    background:
        linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,.025) 25%, transparent 25%),
        #07120b;
    background-size: 18px 18px;
    cursor: pointer;
}

.media-card-preview img {
    width: 100%;
    height: 100%;
    padding: .75rem;
    object-fit: contain;
    transition: transform .22s ease;
}

.media-manager-card-upgraded:hover .media-card-preview img {
    transform: scale(1.025);
}

.media-card-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: white;
    background: rgba(3, 12, 6, .62);
    opacity: 0;
    transition: opacity .18s ease;
}

.media-card-overlay span {
    padding: .5rem .7rem;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    background: rgba(0,0,0,.35);
    font-size: .72rem;
    font-weight: 800;
}

.media-card-preview:hover .media-card-overlay {
    opacity: 1;
}

.media-card-topbar {
    position: absolute;
    top: .65rem;
    right: .65rem;
    left: .65rem;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.media-file-type,
.media-usage-badge {
    padding: .3rem .5rem;
    border-radius: 999px;
    color: white;
    background: rgba(0, 0, 0, .72);
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .04em;
}

.media-usage-badge {
    position: static;
}

.media-usage-badge.unused {
    color: #d9ffe0;
    background: rgba(24, 112, 45, .88);
}

.media-manager-card-upgraded .media-manager-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: .9rem;
}

.media-card-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .6rem;
    align-items: start;
}

.media-card-title-row h3 {
    overflow: hidden;
    margin: 0;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: .9rem;
}

.media-card-title-row p {
    margin: .25rem 0 0;
    color: var(--ca-muted);
    font-size: .7rem;
}

.media-card-title-row p span {
    padding: 0 .2rem;
}

.media-quick-action {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--ca-muted);
    border: 1px solid var(--ca-border);
    border-radius: 10px;
    background: rgba(255,255,255,.025);
}

.media-quick-action:hover,
.media-quick-action.copied {
    color: var(--ca-green-2);
    border-color: rgba(130,255,142,.35);
    background: rgba(79,225,95,.08);
}

.media-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
    margin-top: .85rem;
}

.media-edit-layout {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(0, .9fr);
    gap: 1.25rem;
}

.media-modal-preview-wrap {
    min-height: 410px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--ca-border);
    border-radius: 16px;
    background:
        linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,.025) 25%, transparent 25%),
        #07120b;
    background-size: 18px 18px;
}

.media-modal-preview {
    max-width: 100%;
    max-height: 410px;
    padding: 1rem;
    object-fit: contain;
    background: transparent;
}

.media-empty-state {
    padding: 4rem 1.5rem;
    text-align: center;
}

.media-empty-icon {
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    margin: 0 auto 1rem;
    color: var(--ca-green-2);
    border: 1px solid var(--ca-border);
    border-radius: 18px;
    background: rgba(79,225,95,.07);
    font-size: 1.5rem;
}

.media-empty-state h2 {
    margin: 0 0 .35rem;
}

.media-empty-state p {
    margin: 0 0 1rem;
    color: var(--ca-muted);
}

#mediaUploadButton:disabled {
    cursor: not-allowed;
    opacity: .45;
    box-shadow: none;
}

@media (max-width: 1250px) {
    .media-page-heading,
    .media-library-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .media-page-stats {
        width: 100%;
    }

    .media-filter-form {
        width: 100%;
        grid-template-columns: minmax(220px, 1fr) 145px 150px auto auto;
    }
}

@media (max-width: 991px) {
    .media-upload-panel {
        grid-template-columns: 1fr;
    }

    .media-filter-form {
        grid-template-columns: 1fr 1fr;
    }

    .media-search-control {
        grid-column: 1 / -1;
    }

    .media-edit-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .media-page-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .media-page-stats > div:nth-child(2) {
        border-right: 0;
    }

    .media-page-stats > div:nth-child(-n+2) {
        border-bottom: 1px solid var(--ca-border);
    }

    .media-upload-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .media-filter-form {
        grid-template-columns: 1fr;
    }

    .media-search-control {
        grid-column: auto;
    }

    .media-manager-grid-upgraded {
        grid-template-columns: 1fr;
    }
}


/* Stage 5.0 — News, changelogs and rich content */
.content-index-hero {
    padding: 175px 0 85px;
    border-bottom: 1px solid var(--ca-border);
    background:
        radial-gradient(circle at 18% 32%, rgba(79,225,95,.18), transparent 35%),
        linear-gradient(115deg, rgba(5,18,9,.96), rgba(5,18,9,.72));
}

.content-index-hero h1 {
    max-width: 900px;
    margin: 1.1rem 0 1rem;
    font-size: clamp(3.3rem, 7vw, 6.8rem);
    line-height: .92;
    letter-spacing: -.065em;
    font-weight: 800;
}

.content-index-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--ca-muted);
    font-size: 1.08rem;
    line-height: 1.75;
}

.changelog-hero {
    background:
        radial-gradient(circle at 78% 28%, rgba(164,255,88,.1), transparent 32%),
        linear-gradient(115deg, rgba(5,18,9,.96), rgba(5,18,9,.72));
}

.news-card {
    display: flex;
    height: 100%;
    overflow: hidden;
    flex-direction: column;
    color: white;
    border: 1px solid var(--ca-border);
    border-radius: 22px;
    background: rgba(11,31,17,.82);
    box-shadow: 0 18px 48px rgba(0,0,0,.18);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.news-card:hover {
    color: white;
    transform: translateY(-5px);
    border-color: rgba(130,255,142,.38);
    box-shadow: 0 28px 65px rgba(0,0,0,.28);
}

.news-card-image {
    position: relative;
    height: 235px;
    overflow: hidden;
    background: #07140c;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.035);
}

.news-category {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    padding: .42rem .65rem;
    color: #07100a;
    border-radius: 999px;
    background: var(--ca-green-2);
    font-size: .7rem;
    font-weight: 900;
}

.news-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.35rem;
}

.news-date {
    color: var(--ca-green-2);
    font-size: .72rem;
    font-weight: 800;
}

.news-card h3 {
    margin: .65rem 0;
    font-size: 1.45rem;
    line-height: 1.2;
}

.news-card p {
    margin: 0;
    color: var(--ca-muted);
    line-height: 1.65;
}

.news-card-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: auto;
    padding-top: 1.15rem;
    color: white;
    font-size: .82rem;
    font-weight: 800;
}

.featured-article-section {
    padding: 70px 0 45px;
}

.featured-article {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    overflow: hidden;
    color: white;
    border: 1px solid var(--ca-border);
    border-radius: 28px;
    background: rgba(11,31,17,.85);
    box-shadow: 0 28px 75px rgba(0,0,0,.24);
}

.featured-article:hover {
    color: white;
}

.featured-article-image {
    min-height: 470px;
    background: #07140c;
}

.featured-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-article-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4.5rem);
}

.featured-article-content h2 {
    margin: 1rem 0;
    font-size: clamp(2.3rem, 4vw, 4.2rem);
    line-height: .98;
    letter-spacing: -.045em;
}

.featured-article-content p {
    color: var(--ca-muted);
    font-size: 1rem;
    line-height: 1.75;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.article-meta span {
    padding: .42rem .65rem;
    color: var(--ca-muted);
    border: 1px solid var(--ca-border);
    border-radius: 999px;
    font-size: .72rem;
}

.content-index-heading {
    margin-bottom: 1.5rem;
}

.content-index-heading h2 {
    margin: 0;
    font-size: 2rem;
}

.content-index-heading p {
    margin: .25rem 0 0;
    color: var(--ca-muted);
}

.article-page {
    padding-bottom: 100px;
}

.article-hero {
    padding: 155px 0 55px;
    background:
        radial-gradient(circle at 25% 32%, rgba(79,225,95,.13), transparent 38%);
}

.article-container {
    max-width: 980px;
}

.article-hero h1 {
    margin: 1rem 0;
    font-size: clamp(3rem, 7vw, 6.2rem);
    line-height: .94;
    letter-spacing: -.06em;
    font-weight: 800;
}

.article-lead {
    max-width: 820px;
    color: var(--ca-muted);
    font-size: 1.22rem;
    line-height: 1.75;
}

.article-byline {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1rem;
    margin-top: 1.5rem;
    color: var(--ca-muted);
    font-size: .8rem;
}

.article-featured-image {
    overflow: hidden;
    margin-bottom: 3rem;
    border: 1px solid var(--ca-border);
    border-radius: 26px;
    background: #07140c;
}

.article-featured-image img {
    width: 100%;
    max-height: 620px;
    object-fit: cover;
}

.rich-content {
    color: #d9e7dc;
    font-size: 1.03rem;
    line-height: 1.9;
}

.rich-content h2,
.rich-content h3,
.rich-content h4 {
    margin-top: 2.2rem;
    color: white;
    letter-spacing: -.025em;
}

.rich-content h2 {
    font-size: 2rem;
}

.rich-content h3 {
    font-size: 1.55rem;
}

.rich-content a {
    color: var(--ca-green-2);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.rich-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 17px;
}

.rich-content blockquote {
    margin: 1.8rem 0;
    padding: 1.2rem 1.35rem;
    color: white;
    border-left: 4px solid var(--ca-green-2);
    border-radius: 0 14px 14px 0;
    background: rgba(79,225,95,.06);
}

.rich-content pre,
.rich-content code {
    color: #d8ffe0;
    background: #061109;
}

.rich-content pre {
    overflow-x: auto;
    padding: 1rem;
    border: 1px solid var(--ca-border);
    border-radius: 14px;
}

.rich-content table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.rich-content th,
.rich-content td {
    padding: .75rem;
    border: 1px solid var(--ca-border);
}

.news-mini-card {
    position: relative;
    display: block;
    min-height: 175px;
    padding: 1.2rem;
    color: white;
    border: 1px solid var(--ca-border);
    border-radius: 18px;
    background: rgba(11,31,17,.78);
}

.news-mini-card:hover {
    color: white;
    border-color: rgba(130,255,142,.34);
}

.news-mini-card span {
    color: var(--ca-green-2);
    font-size: .7rem;
}

.news-mini-card h3 {
    margin: .7rem 2rem 0 0;
    font-size: 1.15rem;
}

.news-mini-card > i {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.changelog-container {
    max-width: 1000px;
}

.changelog-timeline {
    position: relative;
}

.changelog-timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 16px;
    width: 1px;
    background: var(--ca-border);
}

.changelog-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0,1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
    color: white;
}

.changelog-timeline-item:hover {
    color: white;
}

.changelog-timeline-marker {
    position: relative;
    z-index: 2;
    padding-top: 1.6rem;
}

.changelog-timeline-marker span {
    display: block;
    width: 14px;
    height: 14px;
    margin: 0 auto;
    border: 3px solid #07140c;
    border-radius: 50%;
    background: var(--ca-green-2);
    box-shadow: 0 0 0 1px var(--ca-border);
}

.changelog-timeline-card {
    padding: 1.4rem;
    border: 1px solid var(--ca-border);
    border-radius: 20px;
    background: rgba(11,31,17,.78);
    transition: transform .18s ease, border-color .18s ease;
}

.changelog-timeline-item:hover .changelog-timeline-card {
    transform: translateX(4px);
    border-color: rgba(130,255,142,.36);
}

.changelog-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.changelog-card-header time {
    color: var(--ca-muted);
    font-size: .72rem;
}

.changelog-timeline-card h2 {
    margin: .85rem 0 .55rem;
    font-size: 1.45rem;
}

.changelog-timeline-card p {
    margin: 0;
    color: var(--ca-muted);
    line-height: 1.65;
}

.release-type,
.release-version {
    display: inline-flex;
    padding: .35rem .55rem;
    border-radius: 999px;
    font-size: .66rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.release-version {
    color: #d7e9da;
    border: 1px solid var(--ca-border);
    background: rgba(255,255,255,.025);
}

.release-major { color: #fff; background: #8b37e6; }
.release-minor { color: #07100a; background: var(--ca-green-2); }
.release-patch { color: #07100a; background: #45d6e8; }
.release-hotfix { color: #fff; background: #ed3d57; }
.release-maintenance { color: #07100a; background: #f1c75b; }

.content-editor-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) 340px;
    gap: 1.25rem;
    align-items: start;
}

.content-editor-sidebar {
    display: grid;
    gap: 1.25rem;
    position: sticky;
    top: 1rem;
}

.admin-content-thumb {
    width: 56px;
    height: 48px;
    object-fit: cover;
    border: 1px solid var(--ca-border);
    border-radius: 10px;
    background: #07140c;
}

.content-status {
    display: inline-flex;
    padding: .35rem .55rem;
    border-radius: 999px;
    font-size: .66rem;
    font-weight: 900;
}

.status-published { color: #07100a; background: var(--ca-green-2); }
.status-draft { color: #dce8df; background: #243329; }
.status-scheduled { color: #07100a; background: #f1c75b; }

.tox-tinymce {
    border: 1px solid var(--ca-border) !important;
    border-radius: 14px !important;
}

@media (max-width: 991px) {
    .featured-article,
    .content-editor-layout {
        grid-template-columns: 1fr;
    }

    .featured-article-image {
        min-height: 360px;
    }

    .content-editor-sidebar {
        position: static;
    }
}

@media (max-width: 575px) {
    .content-index-hero {
        padding-top: 135px;
    }

    .content-index-hero h1 {
        font-size: 3.5rem;
    }

    .article-hero {
        padding-top: 130px;
    }

    .article-hero h1 {
        font-size: 3.2rem;
    }

    .changelog-card-header {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* Stage 5.2 — Editor, image picker and webhooks */
.content-editor-sidebar .image-picker-block { width:100%; }
.content-editor-sidebar .image-picker-layout-sidebar {
    display:flex;
    flex-direction:column;
    gap:1rem;
    padding:0;
    border:0;
    background:transparent;
}
.content-editor-sidebar .image-picker-preview {
    width:100%;
    min-height:220px;
    border:1px solid var(--ca-border);
}
.content-editor-sidebar .image-picker-preview img { height:220px; padding:1rem; }
.image-picker-controls { width:100%; }
.image-picker-actions { display:grid; grid-template-columns:1fr auto; gap:.55rem; }
.image-picker-actions .btn { min-width:0; white-space:normal; }
.image-picker-meta-fields { display:grid; grid-template-columns:1fr; gap:.6rem; }
.image-picker-controls input[type="file"] { width:100%; font-size:.78rem; }

/* Override TinyMCE's default blue dark skin with the Coldalliance green admin palette. */
.tox.tox-tinymce { border-color:#285536 !important; background:#07140c !important; box-shadow:0 18px 42px rgba(0,0,0,.18); }
.tox .tox-editor-header,
.tox .tox-menubar,
.tox .tox-toolbar-overlord,
.tox .tox-toolbar__primary,
.tox .tox-toolbar,
.tox .tox-statusbar { background:#0b2112 !important; }
.tox .tox-menubar,
.tox .tox-toolbar-overlord,
.tox .tox-toolbar__primary { border-color:#285536 !important; }
.tox .tox-mbtn,
.tox .tox-tbtn,
.tox .tox-statusbar__path-item,
.tox .tox-statusbar__wordcount { color:#dce9df !important; }
.tox .tox-tbtn svg { fill:#dce9df !important; }
.tox .tox-tbtn:hover,
.tox .tox-tbtn--enabled,
.tox .tox-mbtn:hover { background:#164522 !important; }
.tox .tox-edit-area::before { border-color:#65f55b !important; }
.tox .tox-edit-area__iframe { background:#07140c !important; }

.webhook-editor-card { max-width:1050px; }

@media (max-width: 1300px) {
    .content-editor-layout { grid-template-columns:minmax(0,1fr) 390px; }
}
@media (max-width: 1050px) {
    .content-editor-layout { grid-template-columns:1fr; }
    .content-editor-sidebar { position:static; }
}


/* Stage 5.2.1 — TinyMCE uploads connected to Media Manager */
.tinymce-media-upload-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: .8rem;
    padding: .9rem 1rem;
    border: 1px solid var(--ca-border);
    border-radius: 14px;
    background: rgba(79, 225, 95, .055);
}

.tinymce-media-upload-panel strong,
.tinymce-media-upload-panel span {
    display: block;
}

.tinymce-media-upload-panel span {
    margin-top: .18rem;
    color: var(--ca-muted);
    font-size: .75rem;
}

.tox .tox-dialog__body-content {
    scrollbar-color: rgba(130, 255, 142, .35) #07140c;
}

.tox .tox-dropzone {
    color: #dce9df !important;
    border-color: rgba(130, 255, 142, .28) !important;
    background: rgba(79, 225, 95, .045) !important;
}

.tox .tox-dropzone:hover {
    border-color: var(--ca-green-2) !important;
    background: rgba(79, 225, 95, .08) !important;
}

@media (max-width: 650px) {
    .tinymce-media-upload-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .tinymce-media-upload-panel .btn {
        width: 100%;
    }
}


/* Stage 5.3 — Steam activity widget */
.steam-activity-widget {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
    overflow: hidden;
    border: 1px solid rgba(102, 192, 244, .24);
    border-radius: 26px;
    background:
        radial-gradient(circle at 12% 35%, rgba(102, 192, 244, .14), transparent 32%),
        linear-gradient(125deg, #071723 0%, #0b2130 58%, #091a25 100%);
    box-shadow: 0 28px 75px rgba(0, 0, 0, .25);
}

.steam-activity-main {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: clamp(1.5rem, 4vw, 2.4rem);
}

.steam-profile-block {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    min-width: 0;
}

.steam-avatar-wrap {
    position: relative;
    flex: 0 0 auto;
}

.steam-avatar-wrap img {
    width: 88px;
    height: 88px;
    padding: 3px;
    object-fit: cover;
    border: 1px solid rgba(102, 192, 244, .38);
    border-radius: 20px;
    background: #0b1d29;
    box-shadow: 0 15px 38px rgba(0,0,0,.28);
}

.steam-online-dot {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 20px;
    height: 20px;
    border: 4px solid #0a1d29;
    border-radius: 50%;
    background: #68747b;
}

.steam-status-online .steam-online-dot {
    background: #57cbde;
}

.steam-status-playing .steam-online-dot {
    background: #8bc53f;
    box-shadow: 0 0 0 0 rgba(139,197,63,.55);
    animation: steamLivePulse 1.8s infinite;
}

@keyframes steamLivePulse {
    0% { box-shadow: 0 0 0 0 rgba(139,197,63,.5); }
    70% { box-shadow: 0 0 0 12px rgba(139,197,63,0); }
    100% { box-shadow: 0 0 0 0 rgba(139,197,63,0); }
}

.steam-eyebrow {
    color: #66c0f4;
    border-color: rgba(102,192,244,.25);
    background: rgba(102,192,244,.07);
}

.steam-profile-block h2 {
    overflow: hidden;
    margin: .7rem 0 .45rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: clamp(1.7rem, 3vw, 2.7rem);
    letter-spacing: -.04em;
}

.steam-current-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
}

.steam-current-status strong {
    color: #dcecf5;
    font-size: .9rem;
}

.steam-status-pill {
    display: inline-flex;
    padding: .38rem .58rem;
    color: #d2dde3;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    background: rgba(255,255,255,.045);
    font-size: .68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .055em;
}

.steam-status-playing .steam-status-pill {
    color: #071108;
    border-color: transparent;
    background: #8bc53f;
}

.steam-status-online .steam-status-pill {
    color: #07151c;
    border-color: transparent;
    background: #57cbde;
}

.btn-steam {
    flex: 0 0 auto;
    color: white;
    border: 1px solid rgba(102,192,244,.3);
    background: rgba(102,192,244,.1);
}

.btn-steam:hover {
    color: #07151c;
    border-color: #66c0f4;
    background: #66c0f4;
}

.steam-current-game {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    border-left: 1px solid rgba(102,192,244,.18);
    background: #07131b;
}

.steam-current-game img {
    width: 100%;
    height: 100%;
    min-height: 230px;
    object-fit: cover;
}

.steam-current-game::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(3,10,15,.95), rgba(3,10,15,.08) 65%);
}

.steam-game-overlay {
    position: absolute;
    z-index: 2;
    right: 1.3rem;
    bottom: 1.2rem;
    left: 1.3rem;
}

.steam-game-overlay span,
.steam-game-overlay strong {
    display: block;
}

.steam-game-overlay span {
    color: #8bc53f;
    font-size: .68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.steam-game-overlay strong {
    margin-top: .3rem;
    font-size: 1.2rem;
}

.steam-recent-games {
    grid-column: 1 / -1;
    padding: 1.2rem 1.4rem 1.4rem;
    border-top: 1px solid rgba(102,192,244,.16);
    background: rgba(2,10,15,.28);
}

.steam-recent-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .8rem;
}

.steam-recent-heading span {
    font-weight: 800;
}

.steam-recent-heading small {
    color: #77909e;
}

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

.steam-recent-game {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
    padding: .75rem;
    color: white;
    border: 1px solid rgba(102,192,244,.14);
    border-radius: 14px;
    background: rgba(102,192,244,.045);
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.steam-recent-game:hover {
    color: white;
    transform: translateY(-2px);
    border-color: rgba(102,192,244,.35);
    background: rgba(102,192,244,.08);
}

.steam-recent-game img {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 9px;
}

.steam-recent-game div {
    min-width: 0;
}

.steam-recent-game strong,
.steam-recent-game span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.steam-recent-game strong {
    font-size: .82rem;
}

.steam-recent-game span {
    margin-top: .2rem;
    color: #8299a6;
    font-size: .65rem;
}

.steam-private-activity {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .9rem;
    color: #8299a6;
    border: 1px dashed rgba(102,192,244,.2);
    border-radius: 13px;
}

@media (max-width: 991px) {
    .steam-activity-widget {
        grid-template-columns: 1fr;
    }

    .steam-current-game {
        min-height: 260px;
        border-top: 1px solid rgba(102,192,244,.18);
        border-left: 0;
    }
}

@media (max-width: 767px) {
    .steam-activity-main {
        align-items: stretch;
        flex-direction: column;
    }

    .steam-profile-block {
        align-items: flex-start;
    }

    .steam-avatar-wrap img {
        width: 68px;
        height: 68px;
        border-radius: 16px;
    }

    .btn-steam {
        width: 100%;
    }

    .steam-recent-grid {
        grid-template-columns: 1fr;
    }
}


/* Stage 5.4 — Communities and automation */
.community-card{display:flex;height:100%;overflow:hidden;flex-direction:column;color:#fff;border:1px solid var(--ca-border);border-radius:22px;background:rgba(11,31,17,.82);transition:.2s ease}.community-card:hover{color:#fff;transform:translateY(-4px);border-color:rgba(130,255,142,.38)}.community-card-image{position:relative;height:230px;background:#07140c}.community-card-image img{width:100%;height:100%;padding:1rem;object-fit:contain}.community-featured-badge{position:absolute;top:1rem;left:1rem;padding:.45rem .65rem;border-radius:999px;color:#07100a;background:var(--ca-green-2);font-size:.68rem;font-weight:900}.community-card-body{display:flex;flex:1;flex-direction:column;padding:1.3rem}.community-card-body h3{font-size:1.45rem}.community-card-body p{color:var(--ca-muted);line-height:1.65}.community-owner{display:inline-flex;align-items:center;gap:.45rem;margin-top:.7rem;color:var(--ca-green-2);font-size:.76rem;font-weight:800}.community-profile-owner{margin-top:1rem;color:var(--ca-muted)}.community-profile-owner a{color:var(--ca-green-2)}
.automation-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1rem}.automation-card{padding:1.2rem;border:1px solid var(--ca-border);border-radius:18px;background:rgba(11,31,17,.8)}.automation-card-top{display:flex;justify-content:space-between;align-items:center}.automation-icon{width:44px;height:44px;display:grid;place-items:center;border-radius:13px;color:var(--ca-green-2);background:rgba(79,225,95,.08);font-size:1.15rem}.automation-card h2{margin:1rem 0 .45rem;font-size:1.15rem}.automation-card p{min-height:46px;color:var(--ca-muted);font-size:.78rem}.automation-card small{color:var(--ca-muted)}

.status-success{color:#07100a;background:var(--ca-green-2)}.status-failed{color:#fff;background:#d93b52}.status-running{color:#07100a;background:#f1c75b}.status-skipped{color:#dce8df;background:#34433a}


/* Stage 5.4.1 — polished public navigation */
.glass-nav {
    padding: .65rem 0;
    background: rgba(3, 12, 7, .9);
    border-bottom: 1px solid rgba(130, 255, 142, .12);
    box-shadow: 0 12px 35px rgba(0, 0, 0, .2);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.nav-shell {
    width: min(1560px, calc(100% - 2rem));
    margin-inline: auto;
    padding-inline: .35rem;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    flex: 0 0 auto;
    margin-right: 1.35rem;
    color: #fff;
}

.navbar-brand:hover,
.navbar-brand:focus {
    color: #fff;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 1px solid rgba(130, 255, 142, .16);
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(130,255,142,.1), rgba(130,255,142,.025));
}

.brand-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-copy strong {
    font-family: "Outfit", sans-serif;
    font-size: 1.14rem;
    letter-spacing: -.025em;
}

.brand-copy small {
    margin-top: .26rem;
    color: rgba(255,255,255,.42);
    font-family: "Inter", sans-serif;
    font-size: .57rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.nav-primary {
    gap: .15rem;
    min-width: 0;
}

.nav-primary .nav-link {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    min-height: 42px;
    padding: .58rem .67rem !important;
    color: rgba(255,255,255,.68);
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: .83rem;
    font-weight: 700;
    white-space: nowrap;
    transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}

.nav-primary .nav-link i {
    color: rgba(130,255,142,.72);
    font-size: .86rem;
}

.nav-primary .nav-link:hover {
    color: #fff;
    border-color: rgba(130,255,142,.11);
    background: rgba(130,255,142,.065);
    transform: translateY(-1px);
}

.nav-primary .nav-link.active,
.nav-primary .show > .nav-link {
    color: #fff;
    border-color: rgba(130,255,142,.14);
    background: linear-gradient(145deg, rgba(79,225,95,.14), rgba(79,225,95,.075));
    box-shadow: inset 0 0 0 1px rgba(130,255,142,.025);
}

.nav-primary .nav-link.active i,
.nav-primary .show > .nav-link i {
    color: var(--ca-green-2);
}

.nav-dropdown {
    min-width: 245px;
    margin-top: .65rem !important;
    padding: .5rem;
    border: 1px solid rgba(130,255,142,.14);
    border-radius: 16px;
    background: rgba(7, 22, 13, .98);
    box-shadow: 0 24px 60px rgba(0,0,0,.38);
}

.nav-dropdown-wide {
    min-width: 310px;
}

.nav-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: .72rem;
    padding: .72rem;
    color: rgba(255,255,255,.78);
    border-radius: 11px;
    white-space: normal;
}

.nav-dropdown .dropdown-item:hover,
.nav-dropdown .dropdown-item:focus {
    color: #fff;
    background: rgba(130,255,142,.08);
}

.nav-dropdown .dropdown-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    color: var(--ca-green-2);
    border: 1px solid rgba(130,255,142,.14);
    border-radius: 10px;
    background: rgba(130,255,142,.055);
}

.nav-dropdown .dropdown-item > span:last-child {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.nav-dropdown .dropdown-item strong {
    font-size: .8rem;
}

.nav-dropdown .dropdown-item small {
    margin-top: .15rem;
    color: rgba(255,255,255,.42);
    font-size: .64rem;
}

.nav-dropdown .dropdown-divider {
    border-color: rgba(130,255,142,.1);
}

.nav-actions {
    display: flex;
    align-items: center;
    margin-left: .8rem;
}

.nav-subscribe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .46rem;
    min-height: 42px;
    padding: .64rem .92rem;
    white-space: nowrap;
}

.navbar-toggler {
    width: 43px;
    height: 43px;
    padding: .55rem;
    border: 1px solid rgba(130,255,142,.16) !important;
    border-radius: 12px;
    background: rgba(130,255,142,.055);
    box-shadow: none !important;
}

@media (max-width: 1399px) and (min-width: 1200px) {
    .brand-copy small {
        display: none;
    }

    .navbar-brand {
        gap: .55rem;
        margin-right: .65rem;
    }

    .nav-primary .nav-link {
        gap: .3rem;
        padding-inline: .52rem !important;
        font-size: .76rem;
    }

    .nav-actions {
        margin-left: .5rem;
    }
}

@media (max-width: 1199px) {
    .glass-nav {
        padding: .58rem 0;
        background: rgba(3,12,7,.98);
    }

    .nav-shell {
        width: min(100% - 1rem, 980px);
    }

    .navbar-collapse {
        max-height: calc(100vh - 82px);
        margin-top: .7rem;
        padding: .75rem;
        overflow-y: auto;
        border: 1px solid rgba(130,255,142,.12);
        border-radius: 18px;
        background: #07160d;
        box-shadow: 0 20px 55px rgba(0,0,0,.36);
    }

    .nav-primary {
        gap: .25rem;
    }

    .nav-primary .nav-link {
        display: flex;
        width: 100%;
        padding: .72rem .8rem !important;
        font-size: .88rem;
    }

    .nav-dropdown,
    .nav-dropdown-wide {
        min-width: 0;
        margin-top: .2rem !important;
        padding: .35rem;
        border-radius: 13px;
        box-shadow: none;
    }

    .nav-actions {
        margin: .65rem 0 0;
        padding-top: .65rem;
        border-top: 1px solid rgba(130,255,142,.1);
    }

    .nav-subscribe {
        width: 100%;
    }
}

@media (max-width: 575px) {
    .nav-shell {
        width: calc(100% - .65rem);
    }

    .brand-copy small {
        display: none;
    }

    .brand-mark {
        width: 39px;
        height: 39px;
    }

    .brand-logo {
        width: 31px;
        height: 31px;
    }
}


/* Stage 5.4.2 — Featured communities and community galleries */
.home-community-card {
    display: flex;
    height: 100%;
    overflow: hidden;
    flex-direction: column;
    color: #fff;
    border: 1px solid var(--ca-border);
    border-radius: 24px;
    background: linear-gradient(160deg, rgba(13, 36, 20, .96), rgba(6, 21, 12, .96));
    box-shadow: 0 22px 55px rgba(0, 0, 0, .18);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.home-community-card:hover {
    color: #fff;
    transform: translateY(-5px);
    border-color: rgba(130, 255, 142, .42);
    box-shadow: 0 28px 70px rgba(0, 0, 0, .28);
}

.home-community-visual {
    position: relative;
    height: 250px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 35%, rgba(81, 255, 102, .13), transparent 44%),
        #05110a;
}

.home-community-visual::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 40%;
    background: linear-gradient(to top, rgba(5, 17, 10, .72), transparent);
    pointer-events: none;
}

.home-community-visual img {
    width: 100%;
    height: 100%;
    padding: 1.35rem;
    object-fit: contain;
    transition: transform .25s ease;
}

.home-community-card:hover .home-community-visual img {
    transform: scale(1.035);
}

.home-community-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.15rem;
    padding: 1.4rem;
}

.home-community-kicker {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    color: var(--ca-green-2);
    font-size: .72rem;
    font-weight: 850;
}

.home-community-body h3 {
    margin: .45rem 0 .65rem;
    font-size: 1.55rem;
}

.home-community-body p {
    margin: 0;
    color: var(--ca-muted);
    line-height: 1.65;
}

.home-community-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.home-community-meta span {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    padding: .42rem .58rem;
    color: #b8c9bd;
    border: 1px solid rgba(130, 255, 142, .12);
    border-radius: 999px;
    background: rgba(130, 255, 142, .045);
    font-size: .67rem;
    font-weight: 750;
}

.community-gallery-count {
    display: inline-flex;
    padding: .55rem .8rem;
    color: var(--ca-green-2);
    border: 1px solid rgba(130, 255, 142, .2);
    border-radius: 999px;
    background: rgba(130, 255, 142, .055);
    font-size: .74rem;
    font-weight: 850;
}

.community-gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: 1rem;
}

.community-gallery-item {
    position: relative;
    grid-column: span 4;
    min-height: 245px;
    overflow: hidden;
    padding: 0;
    color: white;
    border: 1px solid var(--ca-border);
    border-radius: 20px;
    background: #06120a;
    cursor: zoom-in;
}

.community-gallery-item:nth-child(7n + 1),
.community-gallery-item:nth-child(7n + 5) {
    grid-column: span 8;
}

.community-gallery-item:nth-child(5n + 2) {
    min-height: 330px;
}

.community-gallery-item img {
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
    transition: transform .28s ease, filter .28s ease;
}

.community-gallery-hover {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 1.1rem;
    background: linear-gradient(to top, rgba(1, 8, 4, .92), transparent);
    opacity: 0;
    transform: translateY(8px);
    transition: .22s ease;
}

.community-gallery-item:hover img {
    transform: scale(1.045);
    filter: brightness(.78);
}

.community-gallery-item:hover .community-gallery-hover {
    opacity: 1;
    transform: none;
}

.community-gallery-lightbox[hidden] {
    display: none;
}

.community-gallery-lightbox {
    position: fixed;
    z-index: 3000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 4rem 5rem;
    background: rgba(1, 7, 4, .94);
    backdrop-filter: blur(14px);
}

.community-gallery-lightbox figure {
    max-width: min(1200px, 88vw);
    max-height: 88vh;
    margin: 0;
    text-align: center;
}

.community-gallery-lightbox figure img {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}

.community-gallery-lightbox figcaption {
    min-height: 1.5rem;
    margin-top: .9rem;
    color: #dce8df;
    font-weight: 750;
}

.community-gallery-close,
.community-gallery-nav {
    position: absolute;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: white;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 50%;
    background: rgba(255,255,255,.07);
}

.community-gallery-close {
    top: 1.4rem;
    right: 1.4rem;
}

.community-gallery-nav {
    top: 50%;
    transform: translateY(-50%);
}

.community-gallery-nav.prev { left: 1.5rem; }
.community-gallery-nav.next { right: 1.5rem; }

.community-gallery-close:hover,
.community-gallery-nav:hover {
    color: #061109;
    border-color: var(--ca-green-2);
    background: var(--ca-green-2);
}

body.community-gallery-open {
    overflow: hidden;
}

.admin-section-divider {
    display: flex;
    align-items: center;
    gap: .8rem;
    color: #e8f4eb;
    font-weight: 850;
}

.admin-section-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--ca-border);
}

.community-gallery-upload-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.2rem;
    padding: 1.15rem;
    border: 1px dashed rgba(130, 255, 142, .28);
    border-radius: 16px;
    background: rgba(130, 255, 142, .045);
}

.community-gallery-upload-panel p {
    margin-top: .25rem;
    color: var(--ca-muted);
    font-size: .8rem;
}

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

.admin-community-gallery-item {
    overflow: hidden;
    border: 1px solid var(--ca-border);
    border-radius: 17px;
    background: rgba(7, 24, 13, .84);
}

.admin-community-gallery-preview {
    position: relative;
    height: 190px;
    background: #041008;
}

.admin-community-gallery-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-community-gallery-remove {
    position: absolute;
    top: .7rem;
    right: .7rem;
}

.admin-community-gallery-remove input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.admin-community-gallery-remove span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .55rem;
    color: #ffd9dc;
    border: 1px solid rgba(255, 86, 100, .35);
    border-radius: 999px;
    background: rgba(30, 4, 8, .82);
    font-size: .68rem;
    font-weight: 850;
    cursor: pointer;
}

.admin-community-gallery-remove input:checked + span {
    color: white;
    border-color: #ff4f60;
    background: #c92c3c;
}

.admin-community-gallery-fields {
    padding: .9rem;
}

@media (max-width: 991px) {
    .community-gallery-item,
    .community-gallery-item:nth-child(7n + 1),
    .community-gallery-item:nth-child(7n + 5) {
        grid-column: span 6;
    }

    .admin-community-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .community-gallery-grid {
        grid-template-columns: 1fr;
    }

    .community-gallery-item,
    .community-gallery-item:nth-child(7n + 1),
    .community-gallery-item:nth-child(7n + 5) {
        grid-column: auto;
        min-height: 240px;
    }

    .community-gallery-lightbox {
        padding: 4.5rem .8rem 5rem;
    }

    .community-gallery-nav {
        top: auto;
        bottom: 1rem;
        transform: none;
    }

    .community-gallery-nav.prev { left: calc(50% - 58px); }
    .community-gallery-nav.next { right: calc(50% - 58px); }

    .community-gallery-upload-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .community-gallery-upload-panel .btn {
        width: 100%;
    }

    .admin-community-gallery-grid {
        grid-template-columns: 1fr;
    }
}


/* Stage 5.5 — Projects I've Reviewed */
.review-index-hero {
    padding: 9.5rem 0 4.5rem;
    background:
        radial-gradient(circle at 14% 15%, rgba(117,255,86,.13), transparent 30%),
        radial-gradient(circle at 84% 20%, rgba(255,193,64,.1), transparent 28%);
}

.review-index-hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 2rem;
}

.review-index-hero h1 {
    max-width: 760px;
    margin: 1.1rem 0 .8rem;
    font-size: clamp(3rem, 7vw, 6rem);
    line-height: .95;
    letter-spacing: -.06em;
}

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

.review-contact-card {
    display: flex;
    min-width: min(100%, 390px);
    align-items: center;
    gap: .9rem;
    padding: 1rem 1.1rem;
    color: white;
    border: 1px solid rgba(130,255,142,.24);
    border-radius: 18px;
    background: rgba(10,35,19,.82);
    box-shadow: 0 24px 65px rgba(0,0,0,.22);
}

.review-contact-card:hover {
    color: white;
    border-color: rgba(130,255,142,.5);
    transform: translateY(-2px);
}

.review-contact-card > i {
    margin-left: auto;
}

.review-contact-icon {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    place-items: center;
    color: #06100a;
    border-radius: 14px;
    background: var(--ca-green-2);
    font-size: 1.2rem;
}

.review-contact-card small,
.review-contact-card strong {
    display: block;
}

.review-contact-card small {
    color: var(--ca-muted);
}

.featured-review-card {
    display: grid;
    min-height: 490px;
    overflow: hidden;
    grid-template-columns: minmax(0,1.08fr) minmax(360px,.92fr);
    color: white;
    border: 1px solid var(--ca-border);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(10,34,18,.98), rgba(5,18,10,.98));
    box-shadow: 0 30px 85px rgba(0,0,0,.28);
}

.featured-review-card:hover {
    color: white;
    border-color: rgba(130,255,142,.42);
}

.featured-review-image {
    position: relative;
    min-height: 490px;
    overflow: hidden;
    background: #061008;
}

.featured-review-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.featured-review-card:hover .featured-review-image img {
    transform: scale(1.035);
}

.featured-review-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(3,12,6,.6), transparent 60%);
}

.featured-review-badges {
    position: absolute;
    z-index: 2;
    top: 1.2rem;
    left: 1.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.featured-review-badges span {
    padding: .5rem .68rem;
    border-radius: 999px;
    background: rgba(5,17,9,.84);
    font-size: .7rem;
    font-weight: 850;
    backdrop-filter: blur(12px);
}

.featured-review-content {
    position: relative;
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding: clamp(2rem, 5vw, 4rem);
}

.review-score-orb {
    position: absolute;
    top: 1.4rem;
    right: 1.4rem;
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
    align-content: center;
    border: 1px solid rgba(255,202,72,.3);
    border-radius: 50%;
    background: rgba(255,190,54,.1);
}

.review-score-orb strong {
    color: #ffd56a;
    font-size: 1.8rem;
    line-height: 1;
}

.review-score-orb span {
    color: var(--ca-muted);
    font-size: .62rem;
    text-transform: uppercase;
}

.review-card-kicker {
    color: var(--ca-green-2);
    font-size: .72rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.featured-review-content h2 {
    max-width: 580px;
    margin: .85rem 0 1rem;
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    line-height: 1;
    letter-spacing: -.055em;
}

.featured-review-content p {
    color: var(--ca-muted);
    line-height: 1.75;
}

.review-meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: .7rem;
}

.review-meta-pills span {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    padding: .48rem .65rem;
    color: #cbdacf;
    border: 1px solid var(--ca-border);
    border-radius: 999px;
    background: rgba(255,255,255,.025);
    font-size: .7rem;
}

.review-index-heading {
    align-items: end;
}

.review-filter-controls {
    display: flex;
    gap: .65rem;
}

.review-filter-controls .form-select {
    min-width: 190px;
}

.review-grid-item[hidden] {
    display: none !important;
}

.review-card {
    display: flex;
    height: 100%;
    overflow: hidden;
    flex-direction: column;
    color: white;
    border: 1px solid var(--ca-border);
    border-radius: 22px;
    background: rgba(8,29,15,.92);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.review-card:hover {
    color: white;
    transform: translateY(-5px);
    border-color: rgba(130,255,142,.42);
    box-shadow: 0 26px 70px rgba(0,0,0,.25);
}

.review-card-image {
    position: relative;
    height: 235px;
    overflow: hidden;
    background: #051009;
}

.review-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .28s ease;
}

.review-card:hover .review-card-image img {
    transform: scale(1.045);
}

.review-card-overlay {
    position: absolute;
    inset: auto .85rem .85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
}

.review-card-score,
.review-updated-badge {
    padding: .45rem .58rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 900;
    backdrop-filter: blur(12px);
}

.review-card-score {
    color: #221702;
    background: #ffd66f;
}

.review-updated-badge {
    color: white;
    background: rgba(6,23,12,.88);
}

.review-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.25rem;
}

.review-card-body h3 {
    margin: .55rem 0 .65rem;
    font-size: 1.45rem;
}

.review-card-body p {
    flex: 1;
    color: var(--ca-muted);
    line-height: 1.65;
}

.review-card-footer {
    display: flex;
    justify-content: space-between;
    gap: .7rem;
    margin-top: 1rem;
    padding-top: .9rem;
    color: #b9cabe;
    border-top: 1px solid var(--ca-border);
    font-size: .7rem;
    font-weight: 750;
}

.review-request-banner {
    background:
        radial-gradient(circle at 50% 0%, rgba(130,255,142,.12), transparent 42%),
        rgba(8,29,15,.94);
}

.review-request-banner .section-copy {
    max-width: 680px;
}

.review-home-contact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(130,255,142,.2);
    border-radius: 18px;
    background: rgba(130,255,142,.045);
}

.review-home-contact strong,
.review-home-contact span {
    display: block;
}

.review-home-contact span {
    color: var(--ca-muted);
    font-size: .8rem;
}

.review-profile-hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    padding: 10rem 0 5rem;
}

.review-profile-backdrop {
    position: absolute;
    inset: 0;
}

.review-profile-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.3) saturate(.85);
}

.review-profile-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, #031008 0%, rgba(3,16,8,.54) 55%, rgba(3,16,8,.82) 100%),
        linear-gradient(to right, rgba(3,16,8,.82), transparent 75%);
}

.review-profile-hero-grid {
    display: grid;
    align-items: end;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 3rem;
    margin-top: 5rem;
}

.review-profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.review-profile-badges span {
    padding: .48rem .62rem;
    color: #d6e5da;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 999px;
    background: rgba(4,17,8,.68);
    font-size: .68rem;
    font-weight: 850;
    backdrop-filter: blur(10px);
}

.review-profile-badges .verified {
    color: #071108;
    border-color: transparent;
    background: var(--ca-green-2);
}

.review-profile-hero h1 {
    max-width: 970px;
    margin: 1.1rem 0;
    font-size: clamp(3.5rem, 8vw, 7rem);
    line-height: .92;
    letter-spacing: -.065em;
}

.review-profile-lead {
    max-width: 840px;
    color: #d4e0d7;
    font-size: 1.12rem;
    line-height: 1.75;
}

.review-profile-meta,
.review-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}

.review-profile-meta {
    margin-top: 1.5rem;
}

.review-profile-meta span {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    color: #c4d2c7;
    font-size: .76rem;
}

.review-profile-actions {
    margin-top: 1.6rem;
}

.review-overall-panel {
    display: grid;
    width: 190px;
    height: 190px;
    place-items: center;
    align-content: center;
    border: 1px solid rgba(255,211,100,.3);
    border-radius: 50%;
    background: rgba(8,25,13,.73);
    box-shadow: 0 25px 70px rgba(0,0,0,.35);
    backdrop-filter: blur(16px);
}

.review-overall-panel > span,
.review-overall-panel > small {
    color: #bdcbbf;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.review-overall-panel > strong {
    color: #ffd66f;
    font-size: 4.2rem;
    line-height: .95;
}

.review-recommendation {
    max-width: 150px;
    margin-top: .45rem;
    color: var(--ca-green-2);
    font-size: .72rem;
    font-weight: 900;
    text-align: center;
}

.review-score-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
    gap: .8rem;
}

.review-score-card {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: 1rem;
    border: 1px solid var(--ca-border);
    border-radius: 17px;
    background: rgba(8,29,15,.9);
}

.review-score-card > div {
    min-width: 0;
    flex: 1;
}

.review-score-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--ca-green-2);
    border: 1px solid rgba(130,255,142,.18);
    border-radius: 12px;
    background: rgba(130,255,142,.06);
}

.review-score-card small,
.review-score-card strong {
    display: block;
}

.review-score-card small {
    color: var(--ca-muted);
}

.review-score-track {
    height: 4px;
    overflow: hidden;
    margin-top: .45rem;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
}

.review-score-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--ca-green-2), #ffd66f);
}

.review-content-container {
    display: grid;
    grid-template-columns: minmax(0,1fr) 340px;
    gap: 2rem;
}

.review-main-content,
.review-detail-sidebar {
    min-width: 0;
}

/* Keep the complete review body in the left grid column so the sidebar
   can never spill over a following section when the verdict is long. */
.review-detail-sidebar {
    display: flex;
    flex-direction: column;
    align-self: start;
    gap: 1rem;
}

.review-detail-sidebar .content-card {
    width: 100%;
    height: auto;
    min-height: 0;
    flex: 0 0 auto;
}

.review-points-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.review-rich-content {
    margin-top: 1.5rem;
}

.review-detail-list {
    margin: 0;
}

.review-detail-list div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 0;
    border-bottom: 1px solid var(--ca-border);
}

.review-detail-list div:last-child {
    border-bottom: 0;
}

.review-detail-list dt {
    color: var(--ca-muted);
    font-weight: 600;
}

.review-detail-list dd {
    margin: 0;
    font-weight: 750;
    text-align: right;
}

.review-verdict-card p {
    margin: 1rem 0 0;
    color: #d7e2da;
    line-height: 1.75;
}

.review-points-card {
    height: 100%;
    padding: 1.5rem;
    border: 1px solid var(--ca-border);
    border-radius: 20px;
    background: rgba(8,29,15,.9);
}

.review-points-card h2 {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: 1.25rem;
}

.review-points-card.pros h2 {
    color: var(--ca-green-2);
}

.review-points-card.cons h2 {
    color: #ffb668;
}

.review-points-card ul {
    display: grid;
    gap: .7rem;
    margin: 1.1rem 0 0;
    padding-left: 1.15rem;
    color: #ccd9cf;
}

.review-admin-score {
    color: #ffd66f;
    font-weight: 850;
}

@media (max-width: 1199px) {
    .review-score-grid {
        grid-template-columns: repeat(3, minmax(0,1fr));
    }
}

@media (max-width: 991px) {
    .review-index-hero-inner,
    .review-home-contact {
        align-items: stretch;
        flex-direction: column;
    }

    .featured-review-card {
        grid-template-columns: 1fr;
    }

    .featured-review-image {
        min-height: 360px;
    }

    .review-profile-hero-grid,
    .review-content-container,
    .review-points-grid {
        grid-template-columns: 1fr;
    }

    .review-overall-panel {
        width: 150px;
        height: 150px;
    }

    .review-overall-panel > strong {
        font-size: 3.2rem;
    }
}

@media (max-width: 767px) {
    .review-filter-controls {
        width: 100%;
        flex-direction: column;
    }

    .review-filter-controls .form-select {
        width: 100%;
        min-width: 0;
    }

    .review-score-grid {
        grid-template-columns: 1fr;
    }

    .review-profile-hero {
        min-height: auto;
        padding-top: 8.5rem;
    }

    .review-profile-hero-grid {
        margin-top: 3rem;
    }

    .review-profile-hero h1 {
        font-size: clamp(3rem, 15vw, 5rem);
    }
}


/* Stage 5.6 — My Projects and cross-content relationships */
.projects-index-hero {
    padding: 9.5rem 0 4.5rem;
    background:
        radial-gradient(circle at 18% 20%, rgba(79,225,95,.15), transparent 33%),
        radial-gradient(circle at 86% 15%, rgba(75,163,255,.09), transparent 30%);
}

.projects-index-hero h1 {
    margin: 1rem 0 .8rem;
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    line-height: .92;
    letter-spacing: -.065em;
}

.projects-index-hero p {
    max-width: 760px;
    color: var(--ca-muted);
    font-size: 1.08rem;
    line-height: 1.75;
}

.project-grid-item[hidden] {
    display: none !important;
}

.project-card {
    display: flex;
    height: 100%;
    overflow: hidden;
    flex-direction: column;
    color: white;
    border: 1px solid var(--ca-border);
    border-radius: 23px;
    background: linear-gradient(155deg, rgba(10,33,18,.96), rgba(5,18,10,.97));
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.project-card:hover {
    color: white;
    transform: translateY(-5px);
    border-color: rgba(130,255,142,.4);
    box-shadow: 0 26px 70px rgba(0,0,0,.25);
}

.project-card-visual {
    position: relative;
    height: 245px;
    overflow: hidden;
    background: #061109;
}

.project-card-visual img {
    width: 100%;
    height: 100%;
    padding: .7rem;
    object-fit: cover;
    transition: transform .3s ease;
}

.project-card:hover .project-card-visual img {
    transform: scale(1.04);
}

.project-card-badges {
    position: absolute;
    top: .9rem;
    right: .9rem;
    left: .9rem;
    display: flex;
    justify-content: space-between;
    gap: .5rem;
}

.project-status,
.project-featured {
    display: inline-flex;
    width: max-content;
    padding: .42rem .6rem;
    border-radius: 999px;
    font-size: .66rem;
    font-weight: 900;
    backdrop-filter: blur(12px);
}

.project-status {
    color: #071108;
    background: var(--ca-green-2);
}

.status-concept,
.status-on-hold {
    color: #221702;
    background: #ffd66f;
}

.status-in-development,
.status-alpha,
.status-beta {
    color: #07131d;
    background: #71c9ff;
}

.status-archived,
.status-end-of-life {
    color: #d8e1da;
    background: #26342b;
}

.project-featured {
    color: white;
    background: rgba(5,17,9,.82);
}

.project-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.3rem;
}

.project-card-kicker {
    color: var(--ca-green-2);
    font-size: .7rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.project-card-body h2 {
    margin: .6rem 0;
    font-size: 1.5rem;
}

.project-card-body p {
    flex: 1;
    color: var(--ca-muted);
    line-height: 1.65;
}

.project-card-meta {
    display: flex;
    gap: .5rem;
    margin-top: .8rem;
}

.project-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .5rem;
    color: #bfcec2;
    border: 1px solid var(--ca-border);
    border-radius: 999px;
    font-size: .66rem;
}

.project-profile-hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    padding: 10rem 0 5rem;
}

.project-profile-backdrop {
    position: absolute;
    inset: 0;
}

.project-profile-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.28) saturate(.9);
}

.project-profile-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, #031008 0%, rgba(3,16,8,.5) 55%, rgba(3,16,8,.82) 100%),
        linear-gradient(to right, rgba(3,16,8,.85), transparent 78%);
}

.project-profile-grid {
    display: grid;
    align-items: end;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 3rem;
    margin-top: 5rem;
}

.project-profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.project-profile-badges > span:not(.project-status) {
    padding: .45rem .6rem;
    color: #d6e5da;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 999px;
    background: rgba(4,17,8,.7);
    font-size: .68rem;
    font-weight: 850;
}

.project-profile-hero h1 {
    max-width: 980px;
    margin: 1rem 0;
    font-size: clamp(3.5rem, 8vw, 7rem);
    line-height: .92;
    letter-spacing: -.065em;
}

.project-profile-lead {
    max-width: 840px;
    color: #d5e1d8;
    font-size: 1.1rem;
    line-height: 1.75;
}

.project-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 1.5rem;
}

.project-profile-logo {
    display: grid;
    width: 210px;
    height: 210px;
    place-items: center;
    overflow: hidden;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 32px;
    background: rgba(5,18,10,.72);
    box-shadow: 0 25px 70px rgba(0,0,0,.35);
    backdrop-filter: blur(16px);
}

.project-profile-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.project-content-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) 340px;
    gap: 2rem;
}

.project-rich-content {
    margin-top: 1.5rem;
}

.project-detail-sidebar {
    display: grid;
    align-content: start;
    gap: 1rem;
}

.project-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

.project-tech-list span {
    padding: .42rem .58rem;
    color: var(--ca-green-2);
    border: 1px solid rgba(130,255,142,.18);
    border-radius: 999px;
    background: rgba(130,255,142,.05);
    font-size: .7rem;
    font-weight: 800;
}

.relationship-panel {
    height: 100%;
}

.relationship-list {
    display: grid;
    gap: .65rem;
}

.relationship-list a {
    display: grid;
    grid-template-columns: 52px minmax(0,1fr) auto;
    align-items: center;
    gap: .8rem;
    padding: .75rem;
    color: white;
    border: 1px solid var(--ca-border);
    border-radius: 14px;
    background: rgba(255,255,255,.02);
}

.relationship-list a:hover {
    color: white;
    border-color: rgba(130,255,142,.34);
    background: rgba(130,255,142,.055);
}

.relationship-list img {
    width: 52px;
    height: 52px;
    padding: .2rem;
    object-fit: contain;
    border-radius: 12px;
    background: #061109;
}

.relationship-list strong,
.relationship-list small {
    display: block;
}

.relationship-list small {
    overflow: hidden;
    margin-top: .18rem;
    color: var(--ca-muted);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.relationship-checkbox-grid {
    display: grid;
    max-height: 280px;
    overflow-y: auto;
    gap: .45rem;
    padding: .7rem;
    border: 1px solid var(--ca-border);
    border-radius: 14px;
    background: rgba(4,17,8,.55);
}

.relationship-checkbox-grid label {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem .65rem;
    border-radius: 10px;
    cursor: pointer;
}

.relationship-checkbox-grid label:hover {
    background: rgba(130,255,142,.06);
}

@media (max-width: 991px) {
    .project-profile-grid,
    .project-content-layout {
        grid-template-columns: 1fr;
    }

    .project-profile-logo {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 767px) {
    .project-profile-hero {
        min-height: auto;
        padding-top: 8.5rem;
    }

    .project-profile-grid {
        margin-top: 3rem;
    }

    .project-profile-hero h1 {
        font-size: clamp(3rem, 15vw, 5rem);
    }

    .project-profile-logo {
        width: 120px;
        height: 120px;
    }
}


/* Stage 5.7 — Downloads, Help Docs and fixed Media Picker */
.media-picker-modal,
#tinymceMediaModal {
    z-index: 2005 !important;
}

.modal-backdrop {
    z-index: 2000 !important;
}

.media-picker-modal .modal-dialog,
#tinymceMediaModal .modal-dialog {
    position: relative;
    z-index: 2006;
}

.media-picker-modal .modal-content,
#tinymceMediaModal .modal-content {
    max-height: calc(100vh - 3rem);
    box-shadow: 0 36px 110px rgba(0,0,0,.65);
}

.download-upload-zone {
    position: relative;
    display: grid;
    min-height: 180px;
    place-items: center;
    align-content: center;
    gap: .4rem;
    padding: 1.5rem;
    border: 2px dashed rgba(130,255,142,.25);
    border-radius: 18px;
    background: rgba(130,255,142,.035);
    text-align: center;
}

.download-upload-zone > i {
    color: var(--ca-green-2);
    font-size: 2rem;
}

.download-upload-zone > span {
    color: var(--ca-muted);
    font-size: .78rem;
}

.download-upload-zone input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.project-resource-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-bottom: 1.5rem;
}

.project-resource-tabs a {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .72rem .9rem;
    color: #d7e4da;
    border: 1px solid var(--ca-border);
    border-radius: 999px;
    background: rgba(255,255,255,.025);
    font-weight: 800;
}

.project-resource-tabs a:hover {
    color: #061108;
    border-color: var(--ca-green-2);
    background: var(--ca-green-2);
}

.project-resource-tabs span {
    display: grid;
    min-width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 999px;
    background: rgba(0,0,0,.15);
    font-size: .66rem;
}

.project-downloads-panel {
    padding: clamp(1.2rem, 3vw, 2rem);
    border: 1px solid var(--ca-border);
    border-radius: 24px;
    background: rgba(8,29,15,.9);
}

.project-download-list {
    display: grid;
    gap: .8rem;
}

.project-download-card {
    display: grid;
    grid-template-columns: 58px minmax(0,1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--ca-border);
    border-radius: 17px;
    background: rgba(255,255,255,.02);
}

.project-download-card.latest {
    border-color: rgba(130,255,142,.34);
    background: linear-gradient(90deg, rgba(130,255,142,.07), rgba(255,255,255,.018));
}

.project-download-icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    color: var(--ca-green-2);
    border: 1px solid rgba(130,255,142,.18);
    border-radius: 15px;
    background: rgba(130,255,142,.055);
    font-size: 1.35rem;
}

.project-download-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
}

.project-download-title span {
    padding: .32rem .48rem;
    color: #061108;
    border-radius: 999px;
    background: var(--ca-green-2);
    font-size: .62rem;
    font-weight: 900;
    text-transform: uppercase;
}

.project-download-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    margin-top: .35rem;
    color: var(--ca-muted);
    font-size: .7rem;
}

.project-release-notes {
    max-height: 130px;
    overflow: auto;
    margin-top: .65rem;
    color: #cdd9d0;
    font-size: .78rem;
}

.project-release-notes > :last-child {
    margin-bottom: 0;
}

.docs-index-hero {
    padding: 9.5rem 0 4.5rem;
    background:
        radial-gradient(circle at 18% 20%, rgba(130,255,142,.14), transparent 32%),
        radial-gradient(circle at 85% 18%, rgba(72,150,255,.09), transparent 28%);
}

.docs-index-hero h1 {
    margin: 1rem 0 .7rem;
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    line-height: .92;
    letter-spacing: -.065em;
}

.docs-index-hero p {
    max-width: 790px;
    color: var(--ca-muted);
    font-size: 1.08rem;
    line-height: 1.75;
}

.docs-search {
    display: grid;
    max-width: 760px;
    grid-template-columns: auto minmax(0,1fr) auto;
    align-items: center;
    gap: .7rem;
    margin-top: 2rem;
    padding: .55rem;
    border: 1px solid rgba(130,255,142,.22);
    border-radius: 16px;
    background: rgba(5,20,10,.82);
}

.docs-search > i {
    margin-left: .5rem;
    color: var(--ca-green-2);
}

.docs-search input {
    min-width: 0;
    padding: .55rem;
    color: white;
    border: 0;
    outline: 0;
    background: transparent;
}

.docs-search button {
    padding: .65rem 1rem;
    color: #061108;
    border: 0;
    border-radius: 11px;
    background: var(--ca-green-2);
    font-weight: 850;
}

.docs-project-card {
    display: grid;
    height: 100%;
    grid-template-columns: 88px minmax(0,1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    color: white;
    border: 1px solid var(--ca-border);
    border-radius: 20px;
    background: rgba(8,29,15,.92);
}

.docs-project-card:hover {
    color: white;
    transform: translateY(-4px);
    border-color: rgba(130,255,142,.38);
}

.docs-project-card img {
    width: 88px;
    height: 88px;
    padding: .4rem;
    object-fit: contain;
    border-radius: 17px;
    background: #061109;
}

.docs-project-card span {
    color: var(--ca-green-2);
    font-size: .7rem;
    font-weight: 850;
}

.docs-project-card h2 {
    margin: .35rem 0 .45rem;
    font-size: 1.35rem;
}

.docs-project-card p {
    margin: 0;
    color: var(--ca-muted);
    line-height: 1.55;
}

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

.docs-category-card {
    display: flex;
    gap: .9rem;
    padding: 1rem;
    border: 1px solid var(--ca-border);
    border-radius: 17px;
    background: rgba(8,29,15,.82);
}

.docs-category-card > i {
    color: var(--ca-green-2);
    font-size: 1.35rem;
}

.docs-category-card h3 {
    margin: 0 0 .3rem;
    font-size: 1.05rem;
}

.docs-category-card p,
.docs-category-card span {
    color: var(--ca-muted);
    font-size: .75rem;
}

.docs-project-hero {
    padding: 9rem 0 4rem;
    background: radial-gradient(circle at 16% 30%, rgba(130,255,142,.12), transparent 32%);
}

.docs-project-heading {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.docs-project-heading img {
    width: 120px;
    height: 120px;
    padding: .6rem;
    object-fit: contain;
    border: 1px solid var(--ca-border);
    border-radius: 24px;
    background: #061109;
}

.docs-project-heading h1 {
    margin: .6rem 0;
    font-size: clamp(2.8rem, 6vw, 5rem);
    letter-spacing: -.055em;
}

.docs-project-heading p {
    margin: 0;
    color: var(--ca-muted);
}

.docs-page-group {
    margin-bottom: 2.2rem;
}

.docs-page-group h2 {
    margin-bottom: .8rem;
    font-size: 1.2rem;
}

.docs-page-list {
    display: grid;
    gap: .55rem;
}

.docs-page-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .95rem 1rem;
    color: white;
    border: 1px solid var(--ca-border);
    border-radius: 14px;
    background: rgba(8,29,15,.72);
}

.docs-page-list a:hover {
    color: white;
    border-color: rgba(130,255,142,.35);
}

.docs-page-list strong,
.docs-page-list small {
    display: block;
}

.docs-page-list small {
    margin-top: .2rem;
    color: var(--ca-muted);
}

.docs-reading-page {
    padding-top: 92px;
}

.docs-reading-shell {
    display: grid;
    min-height: calc(100vh - 92px);
    grid-template-columns: 300px minmax(0,1fr);
    padding: 0;
}

.docs-sidebar {
    position: sticky;
    top: 92px;
    height: calc(100vh - 92px);
    overflow-y: auto;
    padding: 1.2rem;
    border-right: 1px solid var(--ca-border);
    background: rgba(4,16,8,.96);
}

.docs-sidebar-project {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding-bottom: 1rem;
    color: white;
    border-bottom: 1px solid var(--ca-border);
}

.docs-sidebar-project:hover {
    color: white;
}

.docs-sidebar-project img {
    width: 46px;
    height: 46px;
    padding: .25rem;
    object-fit: contain;
    border-radius: 11px;
    background: #061109;
}

.docs-sidebar-project small,
.docs-sidebar-project strong {
    display: block;
}

.docs-sidebar-project small {
    color: var(--ca-muted);
    font-size: .65rem;
}

.docs-sidebar nav {
    display: grid;
    gap: .15rem;
    margin-top: 1rem;
}

.docs-sidebar-category {
    margin: 1rem .55rem .35rem;
    color: var(--ca-green-2);
    font-size: .65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.docs-sidebar nav a {
    padding: .55rem .65rem;
    color: #aebdb2;
    border-radius: 9px;
    font-size: .8rem;
}

.docs-sidebar nav a:hover,
.docs-sidebar nav a.active {
    color: white;
    background: rgba(130,255,142,.08);
}

.docs-article {
    width: min(920px, calc(100% - 3rem));
    margin: 0 auto;
    padding: 3.2rem 0 6rem;
}

.docs-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    margin-bottom: 2rem;
    color: var(--ca-muted);
    font-size: .72rem;
}

.docs-article h1 {
    margin: 1rem 0;
    font-size: clamp(2.8rem, 6vw, 5rem);
    letter-spacing: -.055em;
}

.docs-article-lead {
    color: #cbd8ce;
    font-size: 1.08rem;
    line-height: 1.75;
}

.docs-rich-content {
    margin-top: 2rem;
}

.docs-updated {
    margin-top: 3rem;
    padding-top: 1rem;
    color: var(--ca-muted);
    border-top: 1px solid var(--ca-border);
    font-size: .72rem;
}

.docs-category-admin-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .75rem;
    border-bottom: 1px solid var(--ca-border);
}

.docs-category-admin-row > span {
    display: flex;
    align-items: center;
    gap: .6rem;
}

@media (max-width: 991px) {
    .docs-category-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .docs-reading-shell {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        position: relative;
        top: auto;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--ca-border);
    }
}

@media (max-width: 767px) {
    .project-download-card {
        grid-template-columns: 48px minmax(0,1fr);
    }

    .project-download-card > .btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .docs-category-grid {
        grid-template-columns: 1fr;
    }

    .docs-project-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .docs-search button {
        grid-column: 1 / -1;
    }
}


/* Stage 5.8 — Project-specific documentation platform */
.docs-admin-project-grid {
    display: grid;
    gap: .8rem;
}

.docs-admin-project-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--ca-border);
    border-radius: 17px;
    background: rgba(255,255,255,.02);
}

.docs-admin-project-card img {
    width: 72px;
    height: 72px;
    padding: .35rem;
    object-fit: contain;
    border-radius: 15px;
    background: #061109;
}

.docs-admin-project-card h3 {
    margin: 0 0 .25rem;
    font-size: 1.08rem;
}

.docs-admin-project-card p {
    margin: 0;
    color: var(--ca-muted);
    font-size: .76rem;
}

.docs-admin-project-stats {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .55rem;
}

.docs-admin-project-stats span {
    padding: .3rem .45rem;
    color: #becdc1;
    border: 1px solid var(--ca-border);
    border-radius: 999px;
    font-size: .64rem;
}

.docs-admin-project-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .4rem;
}

.docs-popular-rank {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: var(--ca-green-2);
    border-radius: 11px;
    background: rgba(130,255,142,.06);
}

.docs-section-admin-list {
    display: grid;
    gap: .65rem;
}

.docs-section-admin-list article {
    display: grid;
    grid-template-columns: 52px minmax(0,1fr) auto;
    align-items: center;
    gap: .8rem;
    padding: .8rem;
    border: 1px solid var(--ca-border);
    border-radius: 14px;
    background: rgba(255,255,255,.018);
}

.docs-section-icon {
    --section-colour: var(--ca-green-2);
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    color: var(--section-colour);
    border: 1px solid color-mix(in srgb, var(--section-colour) 28%, transparent);
    border-radius: 13px;
    background: color-mix(in srgb, var(--section-colour) 8%, transparent);
    font-size: 1.25rem;
}

.docs-section-admin-list strong,
.docs-section-admin-list small,
.docs-section-admin-list article > div > span {
    display: block;
}

.docs-section-admin-list small {
    margin-top: .15rem;
    color: var(--ca-muted);
}

.docs-section-admin-list article > div > span {
    margin-top: .35rem;
    color: var(--ca-green-2);
    font-size: .65rem;
}

.docs-section-admin-list article > div:last-child {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .35rem;
}

.docs-version-list {
    display: grid;
    gap: .6rem;
}

.docs-version-list > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .7rem;
    padding: .8rem;
    border: 1px solid var(--ca-border);
    border-radius: 13px;
}

.docs-version-list strong,
.docs-version-list small {
    display: block;
}

.docs-version-list small {
    color: var(--ca-muted);
}

.docs-version-list > div > div {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.docs-version-switcher {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.docs-version-switcher > span {
    color: var(--ca-muted);
    font-size: .72rem;
}

.docs-version-switcher > div {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.docs-version-switcher a {
    padding: .42rem .6rem;
    color: #c4d2c7;
    border: 1px solid var(--ca-border);
    border-radius: 999px;
    font-size: .7rem;
}

.docs-version-switcher a.active,
.docs-version-switcher a:hover {
    color: #061108;
    border-color: var(--ca-green-2);
    background: var(--ca-green-2);
}

.docs-project-section {
    --section-colour: var(--ca-green-2);
    margin-bottom: 2rem;
    padding: 1.2rem;
    border: 1px solid var(--ca-border);
    border-radius: 21px;
    background: rgba(8,29,15,.78);
}

.docs-project-section-heading {
    display: grid;
    grid-template-columns: 58px minmax(0,1fr) auto;
    align-items: center;
    gap: .9rem;
    margin-bottom: 1rem;
}

.docs-project-section-heading .docs-section-icon {
    width: 58px;
    height: 58px;
}

.docs-project-section-heading h2 {
    margin: 0 0 .25rem;
    font-size: 1.35rem;
}

.docs-project-section-heading p {
    margin: 0;
    color: var(--ca-muted);
}

.docs-project-section-heading > span:last-child {
    color: var(--section-colour);
    font-size: .7rem;
    font-weight: 850;
}

.docs-tree-list {
    gap: .45rem;
}

.docs-tree-page.depth-1 {
    margin-left: 1.3rem;
    border-left: 2px solid rgba(130,255,142,.16);
}

.docs-tree-page.depth-2 {
    margin-left: 2.6rem;
}

.docs-sidebar nav a.child {
    padding-left: 1.35rem;
    font-size: .74rem;
}

.docs-reading-shell.has-toc {
    grid-template-columns: 300px minmax(0,1fr) 230px;
}

.docs-toc {
    position: sticky;
    top: 110px;
    height: max-content;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    margin: 2.5rem 1rem 0 0;
    padding: 1rem;
    border-left: 1px solid var(--ca-border);
}

.docs-toc > strong {
    display: block;
    margin-bottom: .65rem;
    font-size: .75rem;
}

.docs-toc nav {
    display: grid;
    gap: .28rem;
}

.docs-toc a {
    color: var(--ca-muted);
    font-size: .7rem;
    line-height: 1.35;
}

.docs-toc a:hover {
    color: var(--ca-green-2);
}

.docs-toc a.level-3 {
    padding-left: .8rem;
}

.docs-toc a.level-4 {
    padding-left: 1.5rem;
}

.docs-rich-content h2,
.docs-rich-content h3,
.docs-rich-content h4 {
    scroll-margin-top: 120px;
}

.docs-page-labels {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-bottom: 1rem;
}

.docs-page-labels > span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .36rem .5rem;
    color: #bfcfc2;
    border: 1px solid var(--ca-border);
    border-radius: 999px;
    font-size: .65rem;
    font-weight: 750;
}

.docs-difficulty.difficulty-beginner {
    color: #071108;
    border-color: #6dff75;
    background: #6dff75;
}

.docs-difficulty.difficulty-intermediate {
    color: #221702;
    border-color: #ffd66f;
    background: #ffd66f;
}

.docs-difficulty.difficulty-advanced {
    color: white;
    border-color: #e74f62;
    background: #b62d40;
}

.docs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 1.1rem 0 0;
}

.docs-tags span {
    padding: .35rem .5rem;
    color: var(--ca-green-2);
    border: 1px solid rgba(130,255,142,.18);
    border-radius: 999px;
    background: rgba(130,255,142,.04);
    font-size: .65rem;
}

.docs-page-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--ca-border);
}

.docs-page-footer span,
.docs-page-footer strong {
    display: block;
}

.docs-page-footer span {
    color: var(--ca-muted);
    font-size: .65rem;
}

.docs-page-footer strong {
    margin-top: .15rem;
    font-size: .78rem;
}

@media (max-width: 1199px) {
    .docs-reading-shell.has-toc {
        grid-template-columns: 270px minmax(0,1fr);
    }

    .docs-toc {
        display: none;
    }
}

@media (max-width: 991px) {
    .docs-admin-project-card {
        grid-template-columns: 64px minmax(0,1fr);
    }

    .docs-admin-project-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .docs-reading-shell.has-toc {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .docs-section-admin-list article,
    .docs-project-section-heading {
        grid-template-columns: 48px minmax(0,1fr);
    }

    .docs-section-admin-list article > div:last-child,
    .docs-project-section-heading > span:last-child {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .docs-version-switcher {
        align-items: flex-start;
        flex-direction: column;
    }

    .docs-tree-page.depth-1,
    .docs-tree-page.depth-2 {
        margin-left: .6rem;
    }

    .docs-page-footer {
        flex-direction: column;
    }
}


/* Stage 5.8.1 — one-time database migrations */
.migration-list {
    display: grid;
    gap: .65rem;
}

.migration-list > div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .7rem;
    padding: .75rem;
    border: 1px solid var(--ca-border);
    border-radius: 13px;
    background: rgba(255,255,255,.02);
}

.migration-list strong,
.migration-list small {
    display: block;
}

.migration-list small {
    margin-top: .15rem;
    color: var(--ca-muted);
}


/* Stage 5.8.3 — Migration action button */
.migration-run-form {
    flex: 0 0 auto;
    margin: 0;
}

.migration-run-button {
    display: inline-flex;
    min-width: 238px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    white-space: nowrap;
    border: 1px solid rgba(164, 255, 88, .34);
    background: linear-gradient(135deg, #4fe15f 0%, #a4ff58 100%);
    color: #061108;
    box-shadow:
        0 12px 32px rgba(79, 225, 95, .18),
        inset 0 1px 0 rgba(255, 255, 255, .25);
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        filter .18s ease,
        opacity .18s ease;
}

.migration-run-button:not(:disabled):hover,
.migration-run-button:not(:disabled):focus-visible {
    color: #061108;
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow:
        0 16px 38px rgba(79, 225, 95, .28),
        inset 0 1px 0 rgba(255, 255, 255, .3);
}

.migration-run-button:disabled {
    opacity: 1;
    color: #a8baa9;
    border-color: rgba(130, 255, 142, .12);
    background: linear-gradient(
        135deg,
        rgba(54, 88, 60, .76),
        rgba(75, 112, 61, .76)
    );
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.migration-run-button:disabled .bi {
    color: #8ea68f;
}

@media (max-width: 991px) {
    .migration-run-form,
    .migration-run-button {
        width: 100%;
    }
}


/* Stage 6.1 — expanded documentation */
.docs-editor-toolbox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: .85rem 0 1rem;
    padding: .85rem;
    border: 1px solid rgba(130,255,142,.14);
    border-radius: 14px;
    background: rgba(130,255,142,.035);
}
.docs-editor-toolbox strong,
.docs-editor-toolbox span { display: block; }
.docs-editor-toolbox span { margin-top: .15rem; color: var(--ca-muted); font-size: .7rem; }
.docs-editor-toolbox-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }

.docs-callout {
    display: grid;
    grid-template-columns: 38px minmax(0,1fr);
    gap: .8rem;
    margin: 1.4rem 0;
    padding: 1rem;
    border: 1px solid;
    border-radius: 15px;
}
.docs-callout-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 11px;
    background: rgba(255,255,255,.06);
    font-weight: 900;
}
.docs-callout strong { display: block; margin-bottom: .28rem; }
.docs-callout p { margin: 0; color: #c8d5ca; }
.docs-callout-note { border-color: rgba(89,169,255,.34); background: rgba(43,113,190,.09); }
.docs-callout-tip { border-color: rgba(120,255,85,.3); background: rgba(120,255,85,.065); }
.docs-callout-warning { border-color: rgba(255,187,72,.38); background: rgba(255,174,43,.08); }
.docs-callout-information { border-color: rgba(173,115,255,.35); background: rgba(132,72,210,.08); }

.docs-version-badge {
    display: inline-flex;
    align-items: center;
    padding: .38rem .58rem;
    color: #071108;
    border-radius: 999px;
    background: linear-gradient(135deg, #55e769, #a4ff58);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .02em;
}

.docs-screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: .85rem;
    margin: 1.5rem 0;
}
.docs-screenshot-gallery figure,
.docs-gif-demo {
    overflow: hidden;
    margin: 0;
    border: 1px solid var(--ca-border);
    border-radius: 16px;
    background: #07120b;
}
.docs-screenshot-gallery img,
.docs-gif-demo img {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    cursor: zoom-in;
    background: #050d08;
}
.docs-screenshot-gallery figcaption,
.docs-gif-demo figcaption {
    padding: .72rem .85rem;
    color: var(--ca-muted);
    border-top: 1px solid var(--ca-border);
    font-size: .7rem;
}

.docs-rich-content pre {
    position: relative;
    overflow-x: auto;
    margin: 1.25rem 0;
    padding: 1.15rem 1rem;
    padding-top: 3rem;
    color: #e9f4eb;
    border: 1px solid rgba(130,255,142,.14);
    border-radius: 14px;
    background: #030a06;
}
.docs-rich-content pre code {
    font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
    font-size: .82rem;
}
.docs-copy-button {
    position: absolute;
    top: .55rem;
    right: .55rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .55rem;
    color: #b8c8bb;
    border: 1px solid var(--ca-border);
    border-radius: 9px;
    background: #0b1d11;
    font-size: .65rem;
    font-weight: 800;
}
.docs-copy-button:hover { color: #071108; border-color: var(--ca-green-2); background: var(--ca-green-2); }

.docs-toc a.active {
    color: var(--ca-green-2);
    font-weight: 850;
}

.docs-project-search {
    display: grid;
    max-width: 720px;
    grid-template-columns: auto minmax(0,1fr) auto;
    align-items: center;
    gap: .65rem;
    margin-top: 1.8rem;
    padding: .48rem;
    border: 1px solid var(--ca-border);
    border-radius: 14px;
    background: rgba(5,17,9,.82);
}
.docs-project-search > i { margin-left: .5rem; color: var(--ca-green-2); }
.docs-project-search input { min-width: 0; padding: .55rem; color: white; border: 0; outline: 0; background: transparent; }
.docs-project-search button { padding: .58rem .85rem; color: #071108; border: 0; border-radius: 10px; background: var(--ca-green-2); font-weight: 850; }

.docs-lightbox[hidden] { display: none; }
.docs-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    grid-template-columns: 60px minmax(0,1fr) 60px;
    align-items: center;
    padding: 1.5rem;
    background: rgba(0,0,0,.9);
    backdrop-filter: blur(10px);
}
.docs-lightbox figure { max-width: 1200px; max-height: 90vh; margin: auto; text-align: center; }
.docs-lightbox img { max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: 12px; }
.docs-lightbox figcaption { margin-top: .7rem; color: #c7d3c9; }
.docs-lightbox button {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: white;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
    background: rgba(255,255,255,.07);
}
.docs-lightbox-close { position: absolute; top: 1rem; right: 1rem; }
body.docs-lightbox-open { overflow: hidden; }

@media (max-width: 767px) {
    .docs-editor-toolbox { align-items: flex-start; flex-direction: column; }
    .docs-editor-toolbox-actions { justify-content: flex-start; }
    .docs-screenshot-gallery { grid-template-columns: 1fr; }
    .docs-project-search { grid-template-columns: auto minmax(0,1fr); }
    .docs-project-search button { grid-column: 1 / -1; }
    .docs-lightbox { grid-template-columns: 42px minmax(0,1fr) 42px; padding: .7rem; }
    .docs-lightbox button { width: 38px; height: 38px; }
}


/* Stage 6.1.2 — documentation previous/next navigation and progress */
.docs-page-navigation {
    margin-top: 3rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--ca-border);
}

.docs-progress-panel {
    margin-bottom: 1rem;
    padding: .9rem 1rem;
    border: 1px solid var(--ca-border);
    border-radius: 14px;
    background: rgba(130,255,142,.025);
}

.docs-progress-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .65rem;
}

.docs-progress-heading span {
    color: var(--ca-muted);
    font-size: .68rem;
    font-weight: 750;
}

.docs-progress-heading strong {
    color: #dce8de;
    font-size: .7rem;
}

.docs-progress-track {
    position: relative;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
}

.docs-progress-track > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--ca-green), var(--ca-green-2));
    box-shadow: 0 0 18px rgba(120,255,85,.28);
    transition: width .3s ease;
}

.docs-page-navigation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: .85rem;
}

.docs-page-navigation-card {
    position: relative;
    display: flex;
    min-height: 150px;
    flex-direction: column;
    justify-content: center;
    gap: .42rem;
    padding: 1rem 1.1rem;
    color: white;
    border: 1px solid var(--ca-border);
    border-radius: 17px;
    background:
        radial-gradient(circle at 12% 15%, rgba(120,255,85,.065), transparent 10rem),
        rgba(8,29,15,.82);
    text-decoration: none;
    transition:
        transform .18s ease,
        border-color .18s ease,
        background .18s ease,
        box-shadow .18s ease;
}

.docs-page-navigation-card.next {
    align-items: flex-end;
    text-align: right;
    background:
        radial-gradient(circle at 88% 15%, rgba(120,255,85,.075), transparent 10rem),
        rgba(8,29,15,.82);
}

.docs-page-navigation-card:hover {
    color: white;
    border-color: rgba(130,255,142,.38);
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(0,0,0,.15);
}

.docs-page-navigation-card.previous:hover {
    transform: translate(-3px, -3px);
}

.docs-page-navigation-card.next:hover {
    transform: translate(3px, -3px);
}

.docs-page-navigation-label {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    color: var(--ca-green-2);
    font-size: .67rem;
    font-weight: 900;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.docs-page-navigation-card strong {
    font-family: Outfit, Inter, sans-serif;
    font-size: 1.12rem;
    line-height: 1.25;
}

.docs-page-navigation-card small {
    max-width: 520px;
    color: var(--ca-muted);
    font-size: .72rem;
    line-height: 1.5;
}

.docs-page-navigation-card.disabled {
    cursor: default;
    opacity: .58;
    background: rgba(255,255,255,.015);
}

.docs-page-navigation-card.disabled:hover {
    border-color: var(--ca-border);
    transform: none;
    box-shadow: none;
}

.docs-page-navigation + .docs-page-footer {
    margin-top: 1.2rem;
    padding-top: 1rem;
}

.docs-page-footer span {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.docs-page-footer span i {
    color: var(--ca-green-2);
}

@media (max-width: 767px) {
    .docs-page-navigation-grid {
        grid-template-columns: 1fr;
    }

    .docs-page-navigation-card {
        min-height: 132px;
    }

    .docs-progress-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: .2rem;
    }

    .docs-page-navigation-card.next {
        align-items: flex-start;
        text-align: left;
    }

    .docs-page-navigation-card.previous:hover,
    .docs-page-navigation-card.next:hover {
        transform: translateY(-3px);
    }
}
