/* Generated public CSS bundle; regenerate from source files in this order. */

/* ===== base.css ===== */

.brand-name {
    display: inline-flex;
    align-items: baseline;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -.045em;
    line-height: 1.1;
    text-transform: uppercase;
}
.brand-name-main {
    color: #f8fbff;
    text-shadow: 0 0 12px rgb(255 255 255 / 12%);
}
.brand-name-accent {
    background: linear-gradient(105deg, #00eaff 0%, #168bff 48%, #c026ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
}
@media (max-width: 700px) {
    .brand-name {
        font-size: 1.1rem;
    }
}


/* Official Projectabe image wordmark */
.brand-with-logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
    gap: 10px;
    padding: 5px 0;
}
.brand-logo {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 11px;
}
.brand-wordmark {
    display: block;
    width: 190px;
    max-width: 24vw;
    height: 50px;
    object-fit: contain;
    object-position: left center;
}
.brand-with-logo:hover {
    background: transparent;
}
@media (max-width: 700px) {
    .brand-logo {
        width: 40px;
        height: 40px;
    }
    .brand-wordmark {
        width: 155px;
        max-width: 38vw;
        height: 42px;
    }
}
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--color-background);
    color: var(--color-text);
    font-family:
        Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-link);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
    padding: 10px 14px;
    border: 2px solid var(--color-focus);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--color-text);
    font-weight: 750;
    text-decoration: none;
    transform: translateY(-180%);
    transition: transform .18s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
.btn {
    transition:
        background-color .18s ease,
        border-color .18s ease,
        color .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--color-surface);
    outline-offset: 2px;
    box-shadow: 0 0 0 5px var(--color-focus);
}

button:disabled:focus-visible,
.btn:disabled:focus-visible,
input:disabled:focus-visible,
select:disabled:focus-visible,
textarea:disabled:focus-visible {
    outline: none;
    box-shadow: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-header);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-header);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
}

.brand {
    color: var(--color-text);
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: -.03em;
    text-decoration: none;
    white-space: nowrap;
}

nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 4px;
}

nav a {
    color: var(--color-text-muted);
    font-size: .93rem;
    font-weight: 650;
    padding: 8px 10px;
    border-radius: 9px;
    text-decoration: none;
}

nav a:hover {
    color: var(--color-text);
    background: var(--color-surface-alt);
}

main.container {
    min-height: 70vh;
    padding-block: 40px 64px;
}

h1,
h2,
h3 {
    color: var(--color-heading);
    letter-spacing: -.025em;
    line-height: 1.2;
}

h1 {
    margin: 0 0 24px;
    font-size: clamp(2rem, 4vw, 2.75rem);
}

h2 {
    margin-top: 32px;
}

.hero {
    padding: 64px 0 40px;
}

.hero h1 {
    max-width: 760px;
    margin-bottom: 16px;
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    line-height: 1.02;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.page-hero {
    max-width: 920px;
    margin-bottom: 32px;
}

.page-hero-compact {
    padding: 24px 0 8px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--color-primary);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.page-hero h1 {
    margin-bottom: 10px;
}

.page-hero-text {
    max-width: 720px;
    margin: 0;
    color: var(--color-text-muted);
    font-size: 1.05rem;
}

.empty-state {
    display: flex;
    align-items: center;
    flex-direction: column;
    max-width: 720px;
    margin: 18px auto 20px;
    padding: 56px 32px;
    text-align: center;
    border: 1px dashed var(--color-border);
    border-radius: 20px;
    background: var(--color-surface);
}

.empty-state-icon {
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 16px;
    background: var(--color-surface-alt);
    color: var(--color-primary);
    font-size: 2rem;
    font-weight: 500;
}

.empty-state h2 {
    margin: 0 0 10px;
    font-size: 1.5rem;
}

.empty-state p {
    max-width: 560px;
    margin: 0 0 24px;
    color: var(--color-text-muted);
}

.site-footer {
    margin-top: 20px;
    padding: 56px 0 22px;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

.footer-main {
    display: grid;
    grid-template-columns: minmax(260px, .9fr) minmax(0, 1.6fr);
    gap: 70px;
    padding-bottom: 42px;
}

.footer-brand {
    max-width: 390px;
}

.footer-logo {
    display: inline-block;
    color: var(--color-heading);
    font-size: 1.45rem;
    font-weight: 850;
    letter-spacing: -.035em;
    text-decoration: none;
}

.footer-brand p {
    margin: 12px 0 20px;
    color: var(--color-text-muted);
    line-height: 1.65;
}

.footer-submit-link {
    color: var(--color-primary);
    font-weight: 750;
    text-decoration: none;
}

.footer-submit-link:hover {
    color: var(--color-primary-hover);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
}

.footer-column h2 {
    margin: 0 0 7px;
    color: var(--color-heading);
    font-size: .82rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.footer-column a {
    color: var(--color-text-muted);
    font-size: .9rem;
    text-decoration: none;
}

.footer-column a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: .82rem;
}

.muted,
.stats {
    color: var(--color-text-muted);
    font-size: .92rem;
}

@media (max-width: 900px) {
    .nav-wrap {
        align-items: flex-start;
        flex-direction: column;
        padding-block: 14px;
    }

    nav {
        justify-content: flex-start;
    }

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    main.container {
        padding-block: 28px 44px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .footer-links {
        gap: 24px;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .empty-state {
        padding: 42px 22px;
    }
}

nav a.is-active {
    color: var(--color-primary);
    background: var(--color-surface-alt);
}

nav > a[href="/submit.php"] {
    color: var(--color-surface);
    background: var(--color-primary);
    box-shadow: var(--shadow-button);
}

nav > a[href="/submit.php"]:hover,
nav > a[href="/submit.php"].is-active {
    color: var(--color-surface);
    background: var(--color-primary-hover);
}

nav > a[href="/submit.php"]:focus-visible {
    color: var(--color-surface);
}

.hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 34px;
    padding: 58px 42px 46px;
    border: 1px solid var(--color-border);
    border-radius: 22px;
    background:
        linear-gradient(
            135deg,
            var(--color-surface) 0%,
            var(--color-surface-alt) 100%
        );
    box-shadow: var(--shadow-card);
}

.hero p {
    max-width: 700px;
    color: var(--color-text-muted);
    font-size: 1.08rem;
}

.hero p:last-child {
    margin-top: 26px;
}

.page-section {
    margin-top: 44px;
}

.page-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.page-section-header h2 {
    margin: 0;
}

.page-section-header p {
    margin: 4px 0 0;
    color: var(--color-text-muted);
}

@media (max-width: 640px) {
    .hero {
        padding: 36px 24px 30px;
        border-radius: 16px;
    }

    .page-section-header {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* Compact account navigation */
.account-nav {
    position: relative;
    display: flex;
    align-items: center;
}

.account-nav-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    color: var(--color-text-muted);
    background: transparent;
    font-size: .93rem;
    font-weight: 650;
    padding: 8px 10px;
    border-radius: 9px;
    cursor: pointer;
}

.account-nav-button:hover,
.account-nav-button.is-active {
    color: var(--color-text);
    background: var(--color-surface-alt);
}

.account-nav-button.is-active {
    color: var(--color-primary);
}

.account-nav-chevron {
    font-size: .8rem;
    line-height: 1;
    transition: transform .18s ease;
}

.account-nav-button[aria-expanded="true"] .account-nav-chevron {
    transform: rotate(180deg);
}

.account-nav-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 250;
    min-width: 190px;
    padding: 7px;
    border: 1px solid var(--color-border);
    border-radius: 13px;
    background: var(--color-surface);
    box-shadow: 0 18px 45px var(--color-overlay);
}

.account-nav-menu[hidden] {
    display: none;
}

.account-nav-menu a {
    display: block;
    padding: 9px 11px;
    border-radius: 8px;
    color: var(--color-text-muted);
    font-size: .9rem;
    font-weight: 650;
}

.account-nav-menu a:hover,
.account-nav-menu a.is-active {
    color: var(--color-text);
    background: var(--color-surface-alt);
}

.account-nav-menu a.is-active {
    color: var(--color-primary);
}

.account-nav-divider {
    height: 1px;
    margin: 6px 4px;
    background: var(--color-border);
}

@media (max-width: 900px) {
    .account-nav-menu {
        left: 0;
        right: auto;
    }
}

@media (max-width: 640px) {
    .account-nav-menu {
        position: fixed;
        top: 116px;
        left: 12px;
        right: 12px;
        width: auto;
    }
}


/* Compact Explore navigation */
.explore-nav {
    position: relative;
    display: flex;
    align-items: center;
}

.explore-nav-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    color: var(--color-text-muted);
    background: transparent;
    font-size: .93rem;
    font-weight: 650;
    padding: 8px 10px;
    border-radius: 9px;
    cursor: pointer;
}

.explore-nav-button:hover,
.explore-nav-button.is-active {
    color: var(--color-text);
    background: var(--color-surface-alt);
}

.explore-nav-button.is-active {
    color: var(--color-primary);
}

.explore-nav-chevron {
    font-size: .8rem;
    line-height: 1;
    transition: transform .18s ease;
}

.explore-nav-button[aria-expanded="true"] .explore-nav-chevron {
    transform: rotate(180deg);
}

.explore-nav-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 250;
    min-width: 180px;
    padding: 7px;
    border: 1px solid var(--color-border);
    border-radius: 13px;
    background: var(--color-surface);
    box-shadow: 0 18px 45px var(--color-overlay);
}

.explore-nav-menu[hidden] {
    display: none;
}

.explore-nav-menu a {
    display: block;
    padding: 9px 11px;
    border-radius: 8px;
    color: var(--color-text-muted);
    font-size: .9rem;
    font-weight: 650;
}

.explore-nav-menu a:hover,
.explore-nav-menu a.is-active {
    color: var(--color-text);
    background: var(--color-surface-alt);
}

.explore-nav-menu a.is-active {
    color: var(--color-primary);
}

@media (max-width: 900px) {
    .explore-nav-menu {
        left: 0;
        right: auto;
    }
}

@media (max-width: 640px) {
    .explore-nav-menu {
        position: fixed;
        top: 116px;
        left: 12px;
        right: 12px;
        width: auto;
    }
}


/* Keep Explore and Account dropdowns visually consistent */
.explore-nav-menu,
.account-nav-menu {
    min-width: 190px;
    padding: 7px;
    border: 1px solid var(--color-border);
    border-radius: 13px;
    background: var(--color-surface);
    box-shadow: 0 18px 45px var(--color-overlay);
}

.explore-nav-menu a,
.account-nav-menu a {
    display: block;
    padding: 9px 11px;
    border-radius: 8px;
    color: var(--color-text-muted);
    font-size: .9rem;
    font-weight: 650;
}

.explore-nav-menu a:hover,
.explore-nav-menu a.is-active,
.account-nav-menu a:hover,
.account-nav-menu a.is-active {
    color: var(--color-text);
    background: var(--color-surface-alt);
}

.explore-nav-menu a.is-active,
.account-nav-menu a.is-active {
    color: var(--color-primary);
}


.account-nav-menu form {
    margin: 0;
}

.account-nav-menu form button {
    display: block;
    width: 100%;
    padding: 9px 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--color-text-muted);
    font: inherit;
    font-size: .9rem;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
}

.account-nav-menu form button:hover {
    color: var(--color-text);
    background: var(--color-surface-alt);
}


/* ===== assets/css/components.css ===== */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.card-body {
    padding: 22px;
}

.project-card h2 {
    margin: 8px 0;
    font-size: 1.25rem;
}

.project-logo {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    background: var(--color-surface-alt);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 9px 16px;
    background: var(--color-primary);
    color: var(--color-surface);
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-button);
}

.btn:hover {
    background: var(--color-primary-hover);
    color: var(--color-surface);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--color-surface-alt);
    border-color: var(--color-border);
    color: var(--color-text);
    box-shadow: none;
}

.btn-danger {
    background: var(--color-danger);
    border-color: var(--color-danger);
    color: var(--color-surface);
    box-shadow: none;
}

.btn-danger:hover {
    background: var(--color-danger);
    border-color: var(--color-danger);
    color: var(--color-surface);
    filter: brightness(.92);
}

.btn:disabled,
.btn.is-disabled {
    cursor: not-allowed;
    opacity: .58;
    box-shadow: none;
    transform: none;
}

.btn:disabled:hover,
.btn.is-disabled:hover {
    transform: none;
}

.btn-secondary:hover {
    background: var(--color-border);
    color: var(--color-text);
}

.alert {
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 13px 16px;
    margin: 18px 0;
}

.alert-success {
    background: var(--color-success-bg);
    border-color: var(--color-success-border);
    color: var(--color-success);
}

.alert-error {
    background: var(--color-danger-bg);
    border-color: var(--color-danger-border);
    color: var(--color-danger);
}


.error-state {
    display: flex;
    align-items: center;
    flex-direction: column;
    max-width: 720px;
    margin: 18px auto 20px;
    padding: 56px 32px;
    text-align: center;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
}

.error-state-icon {
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 16px;
    background: var(--color-danger-bg);
    color: var(--color-danger);
    font-size: 1.7rem;
    font-weight: 800;
}

.error-state h1 {
    margin: 0 0 10px;
}

.error-state p {
    max-width: 560px;
    margin: 0 0 24px;
    color: var(--color-text-muted);
}

.loading-state {
    position: relative;
    opacity: .72;
    pointer-events: none;
}

.loading-state::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: projectabe-spin .7s linear infinite;
}

@keyframes projectabe-spin {
    to { transform: rotate(360deg); }
}

.project-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 22px 0;
}

.inline-form {
    display: inline;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    background: var(--color-surface-alt);
    color: var(--color-text-muted);
    font-size: .78rem;
    font-weight: 700;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface);
}

.project-card {
    position: relative;
    height: 100%;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-border-strong);
    box-shadow: 0 12px 30px var(--color-overlay);
}

.project-card h2 a {
    color: var(--color-heading);
    text-decoration: none;
}

.project-card h2 a:hover {
    color: var(--color-primary);
}

.project-card .stats {
    margin-top: 16px;
}

.project-card .card-body {
    display: flex;
    min-height: 190px;
    flex-direction: column;
}

.project-card .card-body > .stats {
    margin-top: auto;
}

.project-logo {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.btn-secondary {
    box-shadow: none;
}


/* Creator profile */
.profile-page {
    padding: 42px 0 64px;
}

.profile-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    padding: 34px;
    margin-bottom: 42px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
}

.profile-avatar {
    width: 104px;
    height: 104px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 28px;
    background: var(--color-surface);
    color: var(--color-primary);
    font-size: 2.5rem;
    font-weight: 800;
    box-shadow: var(--shadow-button);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.profile-owner-actions {
    margin-top: 18px;
}

.profile-eyebrow {
    margin: 0 0 7px;
    color: var(--color-primary);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .09em;
}

.profile-hero h1 {
    margin: 0;
    color: var(--color-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.05;
}

.profile-username {
    margin: 7px 0 0;
    color: var(--color-text-muted);
    font-weight: 600;
}

.profile-bio {
    max-width: 700px;
    margin: 18px 0 0;
    color: var(--color-text);
    font-size: 1.05rem;
    line-height: 1.7;
}

.profile-bio-empty {
    color: var(--color-text-muted);
    font-style: italic;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 18px;
    margin-top: 20px;
    color: var(--color-text-muted);
    font-size: .9rem;
}

.profile-meta a {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
}

.profile-meta a:hover {
    color: var(--color-primary-hover);
}

.profile-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-section-heading h2 {
    margin: 0;
    color: var(--color-heading);
    font-size: 1.65rem;
}

.profile-project-count {
    min-width: 38px;
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--color-surface-alt);
    color: var(--color-text-muted);
    text-align: center;
    font-weight: 800;
}

.profile-activity {
    display: grid;
    gap: 10px;
    margin: 34px 0;
}

.profile-activity-item {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
    overflow: hidden;
}

.profile-activity-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 18px;
    cursor: pointer;
    list-style: none;
    color: var(--color-heading);
    font-weight: 800;
}

.profile-activity-item summary::-webkit-details-marker {
    display: none;
}

.profile-activity-item summary::after {
    content: '›';
    color: var(--color-text-muted);
    font-size: 1.25rem;
    transition: transform .15s ease;
}

.profile-activity-item[open] summary::after {
    transform: rotate(90deg);
}

.profile-activity-item summary strong {
    margin-left: auto;
    min-width: 30px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--color-surface-alt);
    color: var(--color-text-muted);
    text-align: center;
    font-size: .85rem;
}

.profile-activity-content {
    padding: 0 18px 18px;
}

.profile-empty {
    display: flex;
    align-items: center;
    flex-direction: column;
    max-width: 720px;
    margin: 18px auto 20px;
    padding: 56px 32px;
    border: 1px dashed var(--color-border);
    border-radius: 20px;
    background: var(--color-surface);
    text-align: center;
}

.profile-empty-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border-radius: 14px;
    background: var(--color-surface-alt);
    color: var(--color-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.profile-empty h3 {
    margin: 0;
    color: var(--color-heading);
}

.profile-empty p {
    max-width: 560px;
    margin: 8px 0 0;
    color: var(--color-text-muted);
}

.profile-empty .btn {
    margin-top: 20px;
}

.profile-empty p .btn {
    margin-top: 0;
}

@media (max-width: 640px) {
    .profile-page {
        padding-top: 24px;
    }

    .profile-empty {
        margin-top: 12px;
        padding: 42px 22px;
    }

    .profile-hero {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 24px;
    }

    .profile-avatar {
        width: 78px;
        height: 78px;
        border-radius: 22px;
        font-size: 2rem;
    }

    .profile-meta {
        flex-direction: column;
        gap: 7px;
    }
}


/* Account profile editor */
.account-page {
    padding: 42px 0 64px;
}

.account-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.account-heading h1 {
    margin: 0;
    color: var(--color-heading);
    font-size: clamp(2rem, 4vw, 2.6rem);
}

.account-heading > div > p:last-child {
    margin: 8px 0 0;
    color: var(--color-text-muted);
}

.account-grid {
    display: grid;
    grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
    gap: 22px;
}

.account-panel {
    padding: 28px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
}

.account-panel-heading {
    margin-bottom: 24px;
}

.account-panel-heading h2 {
    margin: 0;
    color: var(--color-heading);
    font-size: 1.35rem;
}

.account-panel-heading p:last-child {
    margin: 7px 0 0;
    color: var(--color-text-muted);
    line-height: 1.55;
}

.account-avatar-area {
    display: grid;
    gap: 24px;
    justify-items: start;
}

.account-avatar-preview {
    width: 132px;
    height: 132px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 32px;
    background: var(--color-surface);
    color: var(--color-primary);
    font-size: 3rem;
    font-weight: 800;
}

.account-avatar-preview img,
.profile-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.account-avatar-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.account-avatar-area form {
    display: grid;
    gap: 10px;
    width: 100%;
}

.account-avatar-area .btn {
    width: fit-content;
    margin-top: 4px;
}

.account-remove-avatar {
    margin-top: 10px;
}

.account-form {
    display: grid;
    gap: 20px;
}

.account-form .form-group {
    display: grid;
    gap: 7px;
}

.account-form textarea {
    resize: vertical;
    min-height: 150px;
}

@media (max-width: 760px) {
    .account-grid {
        grid-template-columns: 1fr;
    }

    .account-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .account-page {
        padding-top: 24px;
    }

    .account-panel {
        padding: 22px;
    }
}


/* Navigation notifications */
.notification-nav {
    position: relative;
    display: flex;
    align-items: center;
}

.notification-bell-button {
    position: relative;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
}

.notification-bell-button:hover,
.notification-bell-button.is-active {
    color: var(--color-text);
    background: var(--color-surface-alt);
}

.notification-bell-button svg {
    width: 21px;
    height: 21px;
}

.notification-nav-badge {
    position: absolute;
    top: 1px;
    right: 0;
    min-width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    padding: 0 4px;
    border: 2px solid var(--color-header);
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-surface);
    font-size: .62rem;
    font-weight: 800;
    line-height: 1;
}

.notification-popover {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 200;
    width: min(390px, calc(100vw - 24px));
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface);
    box-shadow: 0 18px 45px var(--color-overlay);
}

.notification-popover[hidden] {
    display: none;
}

.notification-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 17px;
    border-bottom: 1px solid var(--color-border);
}

.notification-popover-header strong {
    color: var(--color-heading);
}

.notification-mark-read {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-primary);
    font-size: .78rem;
    font-weight: 750;
    cursor: pointer;
}

.notification-mark-read:hover {
    color: var(--color-primary-hover);
}

.notification-popover-list {
    max-height: 360px;
    overflow-y: auto;
}

.notification-popover-item {
    display: flex;
    gap: 10px;
    padding: 14px 17px;
    border-bottom: 1px solid var(--color-border);
}

.notification-popover-item.is-unread {
    background: var(--color-surface-alt);
}

.notification-unread-dot {
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    margin-top: 8px;
    border-radius: 50%;
    background: var(--color-primary);
}

.notification-popover-item p {
    margin: 0;
    color: var(--color-text);
    font-size: .88rem;
    line-height: 1.45;
}

.notification-popover-item time {
    display: block;
    margin-top: 4px;
    color: var(--color-text-muted);
    font-size: .73rem;
}

.notification-empty {
    margin: 0;
    padding: 24px 17px;
    color: var(--color-text-muted);
    font-size: .9rem;
    text-align: center;
}

.notification-view-all {
    display: block;
    padding: 13px 17px;
    color: var(--color-primary);
    font-size: .85rem;
    font-weight: 750;
    text-align: center;
    text-decoration: none;
    background: var(--color-surface);
}

.notification-view-all:hover {
    background: var(--color-surface-alt);
    color: var(--color-primary-hover);
}

@media (max-width: 900px) {
    .notification-nav {
        position: static;
    }

    .notification-popover {
        position: fixed;
        top: 124px;
        right: 12px;
    }
}

@media (max-width: 640px) {
    .notification-popover {
        top: 116px;
    }
}


.account-pending-email {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.account-pending-email form {
    flex: 0 0 auto;
}

.btn-small {
    min-height: 36px;
    padding: 7px 12px;
    font-size: .85rem;
}

@media (max-width: 520px) {
    .account-pending-email {
        align-items: flex-start;
        flex-direction: column;
    }
}


.project-card {
    position: relative;
}

.project-card-featured {
    border: 2px solid var(--color-primary);
    box-shadow: 0 14px 36px var(--color-overlay);
}

.project-card-featured:hover {
    border-color: var(--color-primary);
    box-shadow: 0 18px 42px var(--color-overlay);
}

.project-featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-surface);
    font-size: .76rem;
    font-weight: 800;
    box-shadow: var(--shadow-button);
}

.project-screenshot {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--color-surface-alt);
}

.scan-preview {
    display: grid;
    gap: 8px;
    margin: 12px 0 20px;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface-alt);
}

.scan-preview img {
    display: block;
    width: min(100%, 720px);
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 9px;
    border: 1px solid var(--color-border);
}


.project-detail-featured-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-surface);
    font-size: .78rem;
    font-weight: 800;
    box-shadow: var(--shadow-button);
}

.project-detail-screenshot {
    display: block;
    width: 100%;
    max-height: 620px;
    margin: 24px 0;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    object-fit: cover;
    background: var(--color-surface-alt);
}


.project-actions .btn.is-voted,
.project-actions .btn.is-voted:hover,
.project-actions .btn.is-followed,
.project-actions .btn.is-followed:hover {
    cursor: default;
    border-color: var(--color-primary);
    background: var(--color-surface-alt);
    color: var(--color-primary);
    opacity: 1;
    box-shadow: none;
    transform: none;
}

.project-actions .btn.is-voted:disabled {
    opacity: 1;
}


.comment-edit {
    margin-top: 14px;
}

.comment-edit summary {
    color: var(--color-primary);
    font-weight: 700;
    cursor: pointer;
}

.comment-edit form {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.comment-edit textarea {
    min-height: 110px;
}

.comment-delete-form {
    display: inline-block;
    margin-top: 8px;
}

/* Public profile activity */
.profile-stats {
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:14px;
    margin:24px 0 36px;
}
.profile-stat {
    padding:20px;
    border:1px solid var(--color-border);
    border-radius:16px;
    background:var(--color-surface);
    text-align:center;
}
.profile-stat strong { display:block; font-size:1.6rem; }
.profile-stat span { color:var(--color-muted); font-size:.9rem; }
.profile-comments { margin-top:42px; }
.profile-comment-list { display:grid; gap:14px; }
.profile-comment {
    padding:18px;
    border:1px solid var(--color-border);
    border-radius:14px;
    background:var(--color-surface);
}
.profile-comment p { margin:0 0 10px; white-space:normal; }
.profile-comment .muted { font-size:.88rem; }
@media (max-width:700px) {
    .profile-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Profile people lists */
.profile-list-link {
    color: var(--color-primary);
    font-size: .88rem;
    font-weight: 750;
    text-decoration: none;
}
.profile-list-link:hover { color: var(--color-primary-hover); }
.profile-people { margin-top: 42px; }
.profile-people-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.profile-person {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
}
.profile-person:hover {
    border-color: var(--color-border-strong);
    box-shadow: var(--shadow-card);
}
.profile-person-avatar {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 16px;
    background: var(--color-primary);
    color: var(--color-surface);
    font-size: 1.15rem;
    font-weight: 800;
}
.profile-person-avatar img { width:100%; height:100%; object-fit:cover; }
.profile-person-content { min-width:0; display:grid; gap:3px; }
.profile-person-content strong { color:var(--color-heading); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.profile-person-content span { color:var(--color-text-muted); font-size:.82rem; }
.profile-person-content small { color:var(--color-text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media (max-width: 800px) { .profile-people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .profile-people-grid { grid-template-columns: 1fr; } }

.profile-stat-link { display:block; color:inherit; text-decoration:none; transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease; }
.profile-stat-link:hover { color:inherit; border-color:var(--color-border-strong); transform:translateY(-2px); box-shadow:var(--shadow-card); }

/* Community activity feed */
.feed-page { padding: 42px 0 64px; }
.feed-tabs { display:flex; gap:8px; flex-wrap:wrap; margin:0 0 22px; }
.feed-tabs a { padding:9px 14px; border:1px solid var(--color-border); border-radius:999px; background:var(--color-surface); color:var(--color-text-muted); text-decoration:none; font-size:.86rem; font-weight:750; }
.feed-tabs a:hover,.feed-tabs a.is-active { border-color:var(--color-primary); color:var(--color-primary); background:var(--color-surface-alt); }
.feed-list { display:grid; gap:12px; max-width:850px; }
.feed-item { display:flex; gap:14px; padding:17px; border:1px solid var(--color-border); border-radius:16px; background:var(--color-surface); }
.feed-avatar { flex:0 0 48px; width:48px; height:48px; display:grid; place-items:center; overflow:hidden; border-radius:15px; background:var(--color-primary); color:var(--color-surface); font-weight:800; text-decoration:none; }
.feed-avatar img { width:100%; height:100%; object-fit:cover; }
.feed-content { min-width:0; }
.feed-content p { margin:0; line-height:1.55; }
.feed-content a { color:var(--color-primary); text-decoration:none; }
.feed-content a:hover { color:var(--color-primary-hover); }
.feed-meta,.feed-content time { display:block; margin-top:5px; color:var(--color-text-muted); font-size:.78rem; }


/* Social connections and threaded comments */
.profile-person { position: relative; }
.profile-person-follow { margin-left: auto; flex: 0 0 auto; }
.profile-person-follow .btn { white-space: nowrap; }
.comment-author-row { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.comment-avatar { flex:0 0 38px; width:38px; height:38px; display:grid; place-items:center; overflow:hidden; border-radius:12px; background:var(--color-primary); color:var(--color-surface); font-weight:800; text-decoration:none; }
.comment-avatar img { width:100%; height:100%; object-fit:cover; }
.comment-author { color:var(--color-heading); text-decoration:none; }
.comment-author:hover { color:var(--color-primary); }
.comment-author-row .muted { display:block; font-size:.78rem; margin-top:2px; }
.comment-reply { margin:12px 0 0 48px; }
.comment-reply form { display:grid; gap:9px; margin-top:10px; }
.comment-reply textarea { min-height:90px; }
.comment-reply-card { margin-left:42px; border-left:3px solid var(--color-primary); }
.feed-excerpt { margin-top:7px; padding:9px 11px; border-radius:10px; background:var(--color-surface-alt); color:var(--color-text-muted); font-size:.86rem; }
@media (max-width:640px) { .profile-person { align-items:flex-start; flex-wrap:wrap; } .profile-person-follow { width:100%; margin-left:65px; } .comment-reply-card { margin-left:18px; } .comment-reply { margin-left:0; } }


/* Creator discovery and dashboard */
.creator-search { display:flex; gap:10px; max-width:760px; margin:0 0 28px; }
.creator-search input { flex:1; min-width:0; }
.creator-dashboard-stats { margin-top:0; }
.creator-dashboard-table { display:grid; gap:10px; }
.creator-dashboard-row { display:grid; grid-template-columns:minmax(180px,1fr) minmax(260px,1.4fr) auto; align-items:center; gap:18px; padding:16px; border:1px solid var(--color-border); border-radius:14px; background:var(--color-surface); }
.creator-dashboard-row > div:first-child { display:grid; gap:4px; }
.creator-dashboard-row > div:first-child span { color:var(--color-text-muted); font-size:.82rem; }
.creator-dashboard-row > div:nth-child(2) { display:flex; gap:14px; flex-wrap:wrap; color:var(--color-text-muted); font-size:.86rem; }
@media (max-width:760px) { .creator-search { flex-wrap:wrap; } .creator-search input { flex-basis:100%; } .creator-dashboard-row { grid-template-columns:1fr; } }


.creator-dashboard-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    min-height: 180px;
    padding: 20px 8px 8px;
    overflow-x: auto;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 12px;
}
.creator-dashboard-chart-bar {
    flex: 1 0 22px;
    min-width: 22px;
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
}
.creator-dashboard-chart-bar span {
    display: block;
    width: 100%;
    min-height: 4px;
    background: var(--accent-color, #333);
    border-radius: 5px 5px 2px 2px;
}
.creator-dashboard-chart-bar small {
    white-space: nowrap;
    font-size: 11px;
}
.notification-page-item.is-unread {
    border-left: 4px solid var(--accent-color, #333);
}
.notification-page-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.profile-activity-link-content {
    padding-top: 2px;
}

.profile-activity-link-content .profile-list-link {
    display: inline-block;
    padding-bottom: 2px;
}

.profile-activity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 10px;
    margin: 34px 0;
}

.profile-activity-grid .profile-activity {
    margin: 0;
}

@media (max-width: 700px) {
    .profile-activity-grid {
        grid-template-columns: 1fr;
    }
}

.profile-project-links {
    display: grid;
    gap: 6px;
}

.profile-project-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--color-heading);
    font-weight: 700;
    text-decoration: none;
}

.profile-project-link:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.profile-activity-empty {
    margin: 0;
    color: var(--color-text-muted);
    font-size: .95rem;
}

.settings-option {
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface-alt);
}

.settings-option .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
}

.settings-option .checkbox-label span {
    display: grid;
    gap: 3px;
}

.settings-option .checkbox-label strong {
    color: var(--color-heading);
}

.settings-option .checkbox-label small {
    color: var(--color-text-muted);
    line-height: 1.4;
}

.security-block + .security-block {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
}

.security-block h3 {
    margin: 0 0 7px;
    color: var(--color-heading);
    font-size: 1.05rem;
}

.notification-page-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.notification-page-content {
    flex: 1;
    min-width: 0;
}
.notification-delete {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}
.notification-delete:hover {
    background: var(--color-surface-alt);
    color: var(--color-danger, #c62828);
}
.notification-delete:disabled {
    opacity: .5;
    cursor: wait;
}
.notification-popover-item {
    align-items: flex-start;
}
.notification-popover-link {
    flex: 1;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}
.notification-popover-delete {
    margin-left: auto;
}
.notification-load-more-wrap {
    display: flex;
    justify-content: center;
    margin: 18px 0 36px;
}


/* Feed presentation and activity grouping */
.feed-list { gap: 0; }
.feed-day-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 10px;
    color: var(--color-text-muted);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.feed-day-heading:first-child { margin-top: 0; }
.feed-day-heading::after { content: ''; height: 1px; flex: 1; background: var(--color-border); }
.feed-day-heading span { white-space: nowrap; }
.feed-item { transition: border-color .15s ease, box-shadow .15s ease; }
.feed-item:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-card); }
.feed-item-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 5px;
}
.feed-item-topline time { margin-top: 0; white-space: nowrap; }
.feed-type {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--color-surface-alt);
    color: var(--color-text-muted);
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}
@media (max-width: 640px) {
    .feed-item-topline { align-items: flex-start; }
    .feed-item-topline time { font-size: .7rem; }
}


/* Following management */
.following-count { display:inline-flex; margin-top:14px; padding:6px 10px; border-radius:999px; background:var(--color-surface-alt); color:var(--color-text-muted); font-size:.8rem; font-weight:750; }
.following-person .profile-person-avatar { text-decoration:none; }
.following-person .profile-person-content { text-decoration:none; }
.following-person .profile-person-content strong { color:var(--color-heading); }
.following-person .profile-person-content span,
.following-person .profile-person-content small { color:var(--color-text-muted); }


/* Creator analytics */
.creator-dashboard-analytics-heading {
    align-items: flex-end;
}
.creator-dashboard-analytics-heading > div:first-child {
    min-width: 0;
}
.creator-dashboard-analytics-heading .muted {
    margin: 7px 0 0;
    max-width: 760px;
    font-size: .85rem;
    line-height: 1.5;
}
.creator-dashboard-periods {
    display: flex;
    flex: 0 0 auto;
    gap: 5px;
    padding: 4px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface-alt);
}
.creator-dashboard-periods a {
    padding: 7px 12px;
    border-radius: 8px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 750;
}
.creator-dashboard-periods a:hover,
.creator-dashboard-periods a.is-active {
    background: var(--color-surface);
    color: var(--color-primary);
    box-shadow: var(--shadow-button);
}
.creator-dashboard-legend {
    display: flex;
    gap: 18px;
    margin: -6px 0 10px;
    color: var(--color-text-muted);
    font-size: .78rem;
    font-weight: 700;
}
.creator-dashboard-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.creator-dashboard-legend i {
    width: 9px;
    height: 9px;
    display: inline-block;
    border-radius: 3px;
    background: var(--color-primary);
}
.creator-dashboard-legend-total {
    opacity: .42;
}
.creator-dashboard-chart-comparison {
    align-items: stretch;
    min-height: 220px;
}
.creator-dashboard-chart-group {
    flex: 1 0 30px;
    min-width: 30px;
    height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 7px;
}
.creator-dashboard-chart-bars {
    width: 100%;
    min-width: 22px;
    height: 165px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
}
.creator-dashboard-chart-bars > span {
    display: block;
    width: calc(50% - 2px);
    min-width: 8px;
    min-height: 4px;
    border-radius: 4px 4px 1px 1px;
}
.creator-dashboard-chart-bar-unique {
    background: var(--color-primary);
}
.creator-dashboard-chart-bar-total {
    background: var(--color-primary);
    opacity: .42;
}
.creator-dashboard-chart-group small {
    white-space: nowrap;
    color: var(--color-text-muted);
    font-size: 10px;
}
@media (max-width: 760px) {
    .creator-dashboard-analytics-heading {
        align-items: flex-start;
        flex-direction: column;
    }
    .creator-dashboard-periods {
        width: 100%;
    }
    .creator-dashboard-periods a {
        flex: 1;
        text-align: center;
    }
}


.project-analytics-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.creator-dashboard-row-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.project-analytics-engagement {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.project-analytics-engagement .account-panel {
    display: grid;
    gap: 5px;
    margin: 0;
    box-shadow: none;
}
.project-analytics-engagement strong {
    color: var(--color-heading);
    font-size: 1.5rem;
}
.project-analytics-engagement span {
    color: var(--color-text-muted);
    font-size: .88rem;
}
@media (max-width: 640px) {
    .project-analytics-engagement {
        grid-template-columns: 1fr;
    }
    .project-analytics-actions {
        width: 100%;
    }
    .project-analytics-actions .btn {
        flex: 1;
    }
    .creator-dashboard-row-actions {
        justify-content: flex-start;
    }
}


.project-analytics-rate-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.project-analytics-rate-grid .account-panel {
    min-height: 126px;
}
.project-analytics-rate-grid .account-panel small {
    color: var(--color-text-muted);
    font-size: .78rem;
    line-height: 1.45;
}
.project-analytics-totals {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 900px) {
    .project-analytics-rate-grid,
    .project-analytics-totals {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 520px) {
    .project-analytics-rate-grid,
    .project-analytics-totals {
        grid-template-columns: 1fr;
    }
}


/* Project analytics event chart */
.project-analytics-event-chart .creator-dashboard-chart-bars > span {
    width: calc(50% - 2px);
}
.project-analytics-chart-votes,
.creator-dashboard-chart-bar-votes {
    background: var(--color-primary);
}
.creator-dashboard-chart-bar-comments {
    background: var(--color-primary);
    opacity: .42;
}


/* Payment history */
.payment-history-card {
    margin-top: 2rem;
}

.payment-history-wrap {
    margin-top: 18px;
    border-radius: 14px;
}

.payment-history-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.payment-history-table th,
.payment-history-table td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--color-border);
}

.payment-history-table th {
    color: var(--color-heading);
    font-size: .82rem;
    font-weight: 800;
    white-space: nowrap;
}

.payment-history-table td {
    color: var(--color-text);
    font-size: .9rem;
}

.payment-history-table tbody tr:last-child td {
    border-bottom: 0;
}

.payment-history-date {
    width: 145px;
    white-space: nowrap;
}

.payment-history-type {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--color-surface-alt);
    color: var(--color-heading);
    font-size: .78rem;
    font-weight: 800;
}

.payment-history-project {
    width: auto;
    max-width: 420px;
    overflow-wrap: anywhere;
}

.payment-history-amount {
    width: 92px;
    text-align: right;
    white-space: nowrap;
}

.payment-history-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--color-surface-alt);
    color: var(--color-text-muted);
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.payment-history-status-paid {
    color: var(--color-success);
}

.payment-history-status-refunded {
    color: var(--color-primary);
}

.payment-history-status-failed {
    color: var(--color-danger);
}

.payment-history-status-cancelled {
    color: var(--color-text-muted);
}

.payment-history-status-pending {
    color: var(--color-warning);
}

.payment-history-refunded {
    margin-top: 4px;
    font-size: .76rem;
}

@media (max-width: 700px) {
    .payment-history-table {
        min-width: 640px;
    }

    .payment-history-wrap {
        margin-right: -2px;
    }

    .payment-history-card {
        overflow: hidden;
    }
}

.project-share {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
}

.project-share > strong {
    display: block;
    margin-bottom: 9px;
    color: var(--color-heading);
    font-size: .9rem;
}

.project-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-share-status {
    display: block;
    min-height: 1.3em;
    margin-top: 8px;
    color: var(--color-text-muted);
    font-size: .82rem;
}

/* Launch / marketing page */
.launch-hero {
    padding: 64px 0 42px;
    max-width: 850px;
}
.launch-hero h1 {
    margin: 12px 0 16px;
    max-width: 780px;
    font-size: clamp(2.4rem, 6vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: -.045em;
}
.launch-hero > p {
    max-width: 720px;
    color: var(--color-text-muted);
    font-size: 1.12rem;
    line-height: 1.7;
}
.launch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}
.launch-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 20px 0 28px;
}
.launch-grid .card {
    height: 100%;
}
.launch-number {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--color-primary);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .08em;
}
.launch-grid h2 {
    margin-top: 0;
}
.launch-grid p,
.launch-section p {
    color: var(--color-text-muted);
    line-height: 1.65;
}
.launch-section {
    margin: 28px 0;
}
.launch-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.launch-cta {
    text-align: center;
}
.launch-cta p {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 760px) {
    .launch-hero {
        padding-top: 38px;
    }
    .launch-grid {
        grid-template-columns: 1fr;
    }
}


/* Desktop consistency polish */
.card,
.form-card,
.account-panel,
.profile-hero,
.profile-stat,
.profile-person,
.profile-activity-item {
    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}

.card:focus-within,
.form-card:focus-within,
.account-panel:focus-within {
    border-color: var(--color-border-strong);
}

.btn:disabled,
button:disabled {
    cursor: not-allowed;
    opacity: .6;
    transform: none;
}

.page-section + .page-section {
    margin-top: 52px;
}

.project-share-actions .btn {
    min-width: 88px;
}

@media (min-width: 901px) {
    .grid {
        gap: 20px;
    }

    .page-hero-compact {
        padding-top: 18px;
    }
}


/* ===== assets/css/forms.css ===== */
form {
    margin: 0;
}

label {
    display: block;
    margin: 0 0 18px;
    color: var(--color-heading);
    font-weight: 700;
}

input,
select,
textarea {
    display: block;
    width: 100%;
    margin-top: 7px;
    padding: 11px 13px;
    border: 1px solid var(--color-border-strong);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: inset 0 1px 2px var(--color-overlay);
    transition: border-color .18s ease, box-shadow .18s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--color-border-strong);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-focus);
    outline: none;
}

textarea {
    min-height: 130px;
    resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
    display: inline-block;
    width: auto;
    margin: 0 8px 0 0;
    accent-color: var(--color-primary);
}

fieldset {
    margin: 0 0 24px;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface);
}

legend {
    padding: 0 8px;
    color: var(--color-heading);
    font-weight: 800;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.help-text {
    display: block;
    margin: 6px 0 0;
    color: var(--color-text-muted);
    font-size: .88rem;
    font-weight: 400;
}

.form-card {
    max-width: 760px;
    padding: 26px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
}

.submit-ownership-card {
    max-width: 760px;
    margin-inline: auto;
}

.submit-project-card {
    max-width: none;
}

.submit-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 26px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.submit-step > span {
    display: grid;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: .9rem;
    font-weight: 800;
}

.submit-step strong {
    display: block;
    color: var(--color-heading);
    font-size: 1.05rem;
}

.submit-step .help-text {
    margin-top: 2px;
}

.submit-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 20px;
}

.submit-form-grid label {
    min-width: 0;
}

.form-field-full {
    grid-column: 1 / -1;
}

.ownership-verified {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    padding: 16px 20px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
}

.ownership-verified > div {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ownership-verified strong,
.ownership-verified span {
    display: block;
}

.ownership-verified > div > div span {
    overflow: hidden;
    color: var(--color-text-muted);
    font-size: .88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ownership-check {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 50%;
    background: var(--color-success);
    color: #fff;
    font-weight: 900;
}

.ownership-verified a {
    color: var(--color-primary);
    font-size: .9rem;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .submit-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-field-full {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .submit-form-grid {
        grid-template-columns: 1fr;
    }

    .form-field-full {
        grid-column: auto;
    }

    .ownership-verified {
        align-items: flex-start;
        flex-direction: column;
    }
}


.submit-scan-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 20px;
    padding: 16px 18px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-background);
}

.submit-scan-bar strong,
.submit-scan-bar span {
    display: block;
}

.submit-scan-bar strong {
    color: var(--color-heading);
}

.submit-scan-bar span {
    margin-top: 3px;
    color: var(--color-text-muted);
    font-size: .88rem;
}

.scan-status {
    min-height: 0;
    margin: -8px 0 18px;
    color: var(--color-text-muted);
    font-size: .9rem;
}

.scan-status-success {
    color: var(--color-success);
}

.scan-status-error {
    color: var(--color-danger);
}

@media (max-width: 640px) {
    .submit-scan-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .submit-scan-bar .btn {
        width: 100%;
    }
}


.submit-featured-option {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-background);
}

.submit-featured-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex: 0 0 auto;
}

.submit-featured-option > span {
    display: block;
}

.submit-featured-option .help-text {
    display: block;
    margin-top: 4px;
}


/* Clean, centred authentication pages */
.auth-page {
    display: flex;
    justify-content: center;
    padding: 12px 0 36px;
}

.auth-card {
    width: 100%;
    max-width: 520px;
    padding: clamp(24px, 5vw, 38px);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
}

.auth-heading {
    margin-bottom: 26px;
    text-align: center;
}

.auth-heading .eyebrow {
    margin-bottom: 10px;
}

.auth-heading h1 {
    margin: 0 0 10px;
    font-size: clamp(1.9rem, 5vw, 2.35rem);
}

.auth-heading p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: .98rem;
}

.auth-form label {
    margin-bottom: 17px;
}

.auth-form input {
    min-height: 46px;
    margin-top: 6px;
}

.auth-submit {
    width: 100%;
    justify-content: center;
    min-height: 47px;
    margin-top: 4px;
}

.auth-switch {
    margin: 24px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    text-align: center;
    font-size: .93rem;
}

.auth-switch a,
.auth-forgot a {
    color: var(--color-primary);
    font-weight: 750;
    text-decoration: none;
}

.auth-switch a:hover,
.auth-forgot a:hover {
    text-decoration: underline;
}

.auth-forgot {
    margin: -5px 0 18px;
    text-align: right;
    font-size: .9rem;
}

.auth-social-buttons {
    display: grid;
    gap: 10px;
}

.auth-social-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 47px;
    padding: 10px 16px;
    border: 1px solid var(--color-border-strong);
    border-radius: 11px;
    background: var(--color-surface);
    color: var(--color-heading);
    font-weight: 750;
    text-decoration: none;
    transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.auth-social-button:hover {
    border-color: var(--color-primary);
    background: var(--color-surface-alt);
    transform: translateY(-1px);
}

.auth-social-icon {
    display: inline-grid;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    place-items: center;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 850;
}

.auth-social-google .auth-social-icon {
    color: #4285f4;
}

.auth-social-facebook .auth-social-icon {
    background: #1877f2;
    color: #fff;
    font-family: Arial, sans-serif;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    color: var(--color-text-muted);
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--color-border);
}

.auth-card .alert {
    margin-bottom: 18px;
}

@media (max-width: 640px) {
    .auth-page {
        padding-top: 0;
    }

    .auth-card {
        border-radius: 16px;
    }
}


/* Shared form layout and control consistency */
label {
    line-height: 1.35;
}

input:not([type="checkbox"]):not([type="radio"]),
select {
    min-height: 44px;
}

input::placeholder,
textarea::placeholder {
    color: var(--color-text-muted);
    opacity: .8;
}

input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
    opacity: .7;
    background: var(--color-surface-alt);
}

.search-form {
    max-width: 980px;
    margin-bottom: 36px;
    padding: 22px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
}

.search-form > label {
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
}

.form-grid > div {
    min-width: 0;
}

.form-grid label {
    margin-bottom: 18px;
}

.form-actions .btn {
    min-width: 120px;
}

.form-actions .btn:only-child {
    min-width: 0;
}

@media (max-width: 640px) {
    .search-form {
        padding: 18px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}


/* ===== assets/css/responsive.css ===== */
@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .project-actions,
    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .project-actions .btn,
    .form-actions .btn {
        width: 100%;
    }

    .table-wrap {
        border-radius: 12px;
    }
}


/* Mobile UI polish */
@media (max-width: 900px) {
    .nav-wrap {
        width: min(100% - 24px, 1180px);
    }

    nav {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 4px;
    }

    nav > a,
    .explore-nav-button,
    .account-nav-button {
        padding: 7px 8px;
        font-size: .88rem;
    }

    .notification-nav {
        margin-left: 2px;
    }
}

@media (max-width: 640px) {
    nav {
        row-gap: 3px;
    }

    .nav-wrap {
        gap: 8px;
    }

    .brand {
        font-size: 1.25rem;
    }

    .page-hero {
        margin-bottom: 24px;
    }

    .page-hero-compact {
        padding-top: 8px;
    }

    .empty-state {
        margin-top: 12px;
        padding: 36px 18px;
    }

    .project-actions,
    .form-actions {
        gap: 8px;
    }

    .project-share-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-share-actions .btn {
        width: 100%;
        min-width: 0;
    }

    .creator-search {
        align-items: stretch;
        flex-direction: column;
    }

    .creator-search .btn {
        width: 100%;
    }

    .footer-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-column:last-child {
        grid-column: 1 / -1;
    }

    .notification-popover,
    .account-nav-menu,
    .explore-nav-menu {
        top: 132px;
    }
}

@media (max-width: 420px) {
    .project-share-actions {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .footer-column:last-child {
        grid-column: auto;
    }
}


/* ===== assets/css/themes/default.css ===== */
:root {
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-secondary: #7c3aed;
    --color-background: #f8fafc;
    --color-surface: #ffffff;
    --color-surface-alt: #f1f5f9;
    --color-surface-raised: #ffffff;
    --color-text: #0f172a;
    --color-heading: #0b1f3a;
    --color-text-muted: #475569;
    --color-border: #e2e8f0;
    --color-border-strong: #cbd5e1;
    --color-success: #15803d;
    --color-success-bg: #ecfdf3;
    --color-success-border: #bbf7d0;
    --color-warning: #b45309;
    --color-warning-bg: #fffbeb;
    --color-warning-border: #fde68a;
    --color-danger: #dc2626;
    --color-danger-bg: #fef2f2;
    --color-danger-border: #fecaca;
    --color-link: #2563eb;
    --color-focus: #1d4ed8;
    --color-header: rgba(255, 255, 255, 0.94);
    --color-overlay: rgba(15, 23, 42, 0.04);
    --shadow-card: 0 6px 22px rgba(15, 23, 42, 0.04);
    --shadow-header: 0 1px 12px rgba(15, 23, 42, 0.04);
    --shadow-button: 0 4px 12px rgba(37, 99, 235, 0.16);
}

/* Reliable dropdown fallback: keep menus usable if client-side JavaScript is delayed or unavailable. */
.explore-nav:hover > .explore-nav-menu,
.explore-nav:focus-within > .explore-nav-menu,
.account-nav:hover > .account-nav-menu,
.account-nav:focus-within > .account-nav-menu {
    display: block;
}

.explore-nav-menu[hidden],
.account-nav-menu[hidden] {
    display: none;
}

.explore-nav:hover > .explore-nav-menu:not([hidden]),
.explore-nav:focus-within > .explore-nav-menu,
.account-nav:hover > .account-nav-menu:not([hidden]),
.account-nav:focus-within > .account-nav-menu {
    display: block;
}



/* Dropdown positioning and overflow fix */
@media (max-width: 640px) {
    .notification-popover {
        top: 132px;
    }

    .account-nav-menu,
    .explore-nav-menu {
        top: calc(100% + 8px);
        left: 0;
        right: auto;
        position: absolute;
        width: min(280px, calc(100vw - 24px));
        max-height: calc(100vh - 160px);
        overflow-y: auto;
    }
}

/* Respect the HTML hidden attribute despite component display rules. */
.scan-preview[hidden],
.scan-preview img[hidden],
#project-image-preview-wrap[hidden],
#project-image-preview[hidden] {
    display: none;
}


/* Project image upload previews and public project gallery */
.project-image-previews {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.project-image-preview-card {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
}
.project-image-preview-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: var(--color-surface-alt);
    border-radius: 6px;
}
.project-image-preview-card label,
.project-main-image-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.project-main-image-options {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
}
.project-detail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 16px 0;
}
.project-detail-gallery img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid var(--color-border);
    border-radius: 10px;
}
.project-detail-gallery img[hidden] { display: none; }

.project-image-upload-slots { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:10px 0; }
.project-image-upload-slots label { display:flex; flex-direction:column; gap:7px; min-width:0; padding:10px; border:1px solid var(--color-border); border-radius:9px; }
.project-image-upload-slots input[type="file"] { width:100%; min-width:0; font-size:13px; }
.project-image-preview-card img { width:100%; height:150px; max-height:150px; aspect-ratio:4/3; object-fit:contain; }
.project-image-previews { grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); }
@media (max-width:600px) { .project-image-upload-slots { grid-template-columns:1fr; } }

/* Short project pitch: larger editing area with a clear character limit. */
.project-short-description-field textarea {
    display: block;
    width: 100%;
    min-height: 92px;
    resize: vertical;
    line-height: 1.5;
}
#short-description-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
#short-description-count.is-near-limit { font-weight: 700; color: var(--color-danger, #b42318); }

/* AJAX project submission feedback and upload progress */
.project-submit-feedback {
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface-alt);
    overflow-wrap: anywhere;
}
.project-submit-feedback.success { border-color: #16804a; background: #edf9f1; color: #14532d; }
.project-submit-feedback.error { border-color: #c62828; background: #fff1f1; color: #8f1d1d; }
.project-submit-feedback.info { border-color: var(--color-primary); }
.project-submit-progress { margin: 12px 0 18px; }
.project-submit-progress-track { height: 8px; overflow: hidden; border-radius: 99px; background: var(--color-border); }
#project-submit-progress-bar { display:block; width:0; height:100%; border-radius:inherit; background:var(--color-primary); transition:width .15s ease; }
#project-submit-progress-label { display:block; margin-top:6px; font-size:.9rem; color:var(--color-text-muted); }

/* Extra submission form guidance */
.project-submit-draft-actions {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin:20px 0 12px;
    padding:12px 14px;
    border:1px solid var(--color-border);
    border-radius:10px;
}
.project-completion-summary {
    position:sticky;
    top:84px;
    z-index:4;
    margin:0 0 16px;
    padding:10px 12px;
    border:1px solid var(--color-border);
    border-radius:10px;
    background:var(--color-surface, #fff);
    font-size:.92rem;
}
.project-completion-summary::after {
    content:"";
    display:block;
    height:4px;
    margin-top:8px;
    border-radius:99px;
    background:linear-gradient(to right, var(--color-primary, #3155d9) var(--completion, 0%), var(--color-border) var(--completion, 0%));
}
#project-submit-form [aria-invalid="true"] {
    border-color:#c62828;
    box-shadow:0 0 0 2px rgb(198 40 40 / 12%);
}
@media (max-width:600px) {
    .project-completion-summary { top:72px; }
    .project-submit-draft-actions { align-items:flex-start; }
}

/* Clear required and optional field labels on project submission. */

.field-requirement,
.field-optional {
    display:inline-flex;
    align-items:center;
    margin-left:6px;
    padding:2px 7px;
    border-radius:999px;
    font-size:.72rem;
    font-weight:600;
    line-height:1.5;
    vertical-align:middle;
}
.field-requirement { background:#eaf1ff; color:#2349a8; }
.field-optional { background:var(--color-surface-alt, #f1f5f9); color:var(--color-text-muted, #526174); }


/* Project card layout polish: consistent image geometry, readable text and calmer hover states. */
.project-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 18px;
}

.project-card > .project-screenshot,
.project-card > .project-logo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--color-surface-alt);
}

.project-card > .project-screenshot {
    border-bottom: 1px solid var(--color-border);
    transition: transform .22s ease;
}

.project-card .card-body {
    flex: 1;
    min-height: 0;
    padding: 20px 22px 22px;
}

.project-card .muted {
    font-size: .82rem;
    line-height: 1.45;
}

.project-card h2 {
    margin: 9px 0 10px;
    font-size: clamp(1.12rem, 1.4vw, 1.3rem);
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.project-card .card-body > p:not(.muted) {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.project-card .stats {
    padding-top: 16px;
    font-size: .84rem;
}

.project-card:hover .project-screenshot {
    transform: scale(1.015);
}

@media (max-width: 640px) {
    .grid {
        gap: 16px;
    }

    .project-card .card-body {
        padding: 18px;
    }

    .project-card h2 {
        font-size: 1.18rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-card,
    .project-card > .project-screenshot {
        transition: none;
    }

    .project-card:hover {
        transform: none;
    }

    .project-card:hover .project-screenshot {
        transform: none;
    }
}


/* ===== Homepage layout overrides ===== */

/* Homepage hierarchy and spacing polish */
.homepage-hero { padding-top: 48px; }
.homepage-hero > .eyebrow { margin-bottom: 14px; }
.homepage-hero h1 { max-width: 790px; }
.homepage-hero > p:not(.eyebrow) { max-width: 660px; }
.homepage-hero .btn { margin: 0 8px 8px 0; }
.homepage-curated-heading { margin: 8px 0 18px; }
.homepage-curated-heading h2 { margin: 0; }
.homepage-discovery-copy { margin: 0 0 22px; padding: 24px 28px; border: 1px solid var(--color-border); border-radius: 16px; background: var(--color-surface); }
.homepage-discovery-copy-inner { max-width: 900px; margin-inline: auto; }
.homepage-discovery-copy .eyebrow { margin-bottom: 8px; }
.homepage-discovery-copy h2 { margin: 0 0 12px; font-size: clamp(1.35rem, 2.5vw, 1.75rem); }
.homepage-discovery-copy p:not(.eyebrow) { margin: 0 0 10px; color: var(--color-text-muted); line-height: 1.7; }
.homepage-discovery-copy p:last-child { margin-bottom: 0; }
.homepage-curated-grid { margin-bottom: 12px; }
.homepage-curated-grid .card { display: flex; flex-direction: column; min-width: 0; padding: 24px; border-radius: 18px; }
.homepage-curated-grid .card h3 { margin: 4px 0 10px; font-size: 1.2rem; overflow-wrap: anywhere; }
.homepage-curated-grid .card p:not(.eyebrow) { color: var(--color-text-muted); line-height: 1.6; }
.homepage-curated-grid .card p:last-child { margin-top: auto; padding-top: 8px; }
.homepage-project-section { margin-top: 42px; }
.homepage-project-section .page-section-header { margin-bottom: 20px; }
.homepage-project-section .page-section-header .eyebrow { margin-bottom: 7px; }
.homepage-project-section .page-section-header p:not(.eyebrow) { max-width: 620px; }
.homepage-share { margin-top: 48px; }
.homepage-share h2 { margin-top: 0; }
.homepage-share-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
@media (max-width: 640px) {
 .homepage-hero { padding: 30px 20px 26px; }
 .homepage-hero .btn { margin-right: 5px; }
 .homepage-curated-heading { align-items: stretch; }
 .homepage-curated-heading > .btn { width: 100%; }
 .homepage-discovery-copy { padding: 20px; }
 .homepage-curated-grid .card { padding: 20px; }
 .homepage-project-section { margin-top: 34px; }
 .homepage-share-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .homepage-share-links .btn { width: 100%; padding-inline: 10px; }
}


/* Project detail layout overrides (kept in the served CSS bundle) */
/* Approved project detail layout */
.project-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    gap: clamp(22px, 3vw, 38px);
    align-items: start;
    padding: 8px 0 28px;
    margin-bottom: 26px;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
}
.project-detail-media-column,
.project-detail-overview { min-width: 0; }
.project-detail-visual {
    overflow: hidden;
    border: 1px solid var(--color-border, #dbe3ef);
    border-radius: 15px;
    background: var(--color-surface, #f8fafc);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}
.project-detail-screenshot {
    display: block;
    width: 100%;
    height: clamp(240px, 29vw, 390px);
    max-height: 390px;
    margin: 0;
    object-fit: contain;
    object-position: center;
    background: var(--color-surface, #f8fafc);
}
.project-detail-logo-preview { padding: 32px; }
.project-detail-image-placeholder {
    display: grid;
    min-height: 260px;
    place-items: center;
    color: var(--color-text-muted, #64748b);
}
.project-detail-gallery {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0 16px;
}
.project-detail-thumbnail {
    display: block;
    min-width: 0;
    padding: 3px;
    overflow: hidden;
    border: 1px solid var(--color-border, #dbe3ef);
    border-radius: 10px;
    background: var(--color-surface, #fff);
    cursor: pointer;
}
.project-detail-thumbnail.is-active,
.project-detail-thumbnail:focus-visible {
    border: 2px solid var(--color-primary, #2563eb);
    padding: 2px;
    outline: none;
}
.project-detail-thumbnail img {
    display: block;
    width: 100%;
    height: 82px;
    object-fit: cover;
    border-radius: 6px;
}
.project-detail-primary-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
    gap: 10px;
}
.project-detail-primary-actions .btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    text-align: center;
}
.project-detail-overview .project-detail-topline { margin: 0 0 18px; }
.project-detail-categories {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}
.project-detail-category,
.project-detail-lifecycle {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 650;
    text-decoration: none;
}
.project-detail-category {
    color: var(--color-primary, #1d4ed8);
    background: var(--color-primary-soft, #eaf1ff);
}
.project-detail-lifecycle {
    color: #047857;
    background: #dcfce7;
}
.project-detail-launch-date {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--color-text-muted, #475569);
    font-size: .94rem;
}
.project-detail-heading { margin: 0 0 18px; }
.project-detail-heading h1 {
    margin: 0 0 14px;
    font-size: clamp(1.8rem, 2.7vw, 2.65rem);
    line-height: 1.13;
    letter-spacing: -.035em;
    overflow-wrap: anywhere;
}
.project-detail-pitch {
    margin: 0;
    color: var(--color-text-muted, #475569);
    font-size: 1.04rem;
    line-height: 1.7;
}
.project-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 22px;
}
.project-detail-tag {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--color-primary-soft, #eaf1ff);
    color: var(--color-primary, #1d4ed8);
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}
.project-detail-tag:hover,
.project-detail-tag:focus-visible { filter: brightness(.96); text-decoration: underline; }
.project-detail-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 18px;
    border: 1px solid var(--color-border, #dbe3ef);
    border-radius: 12px;
    overflow: hidden;
}
.project-detail-stats > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 12px 10px;
    border-right: 1px solid var(--color-border, #dbe3ef);
}
.project-detail-stats > div:last-child { border-right: 0; }
.project-detail-stats strong { font-size: 1.2rem; line-height: 1.3; }
.project-detail-stats span { color: var(--color-text-muted, #64748b); font-size: .78rem; line-height: 1.4; }
.project-detail-source-link { margin: 12px 0 0; }
.project-detail-lower {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, .9fr);
    gap: 20px;
    align-items: start;
}
.project-detail-about,
.project-detail-side-card {
    min-width: 0;
    padding: clamp(18px, 2.2vw, 30px);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 16px;
    background: var(--color-surface, #fff);
}
.project-detail-about > h2 { margin-top: 0; }
@media (max-width: 900px) {
    .project-detail-hero { grid-template-columns: minmax(0, 1fr); }
    .project-detail-screenshot { height: clamp(240px, 55vw, 360px); }
    .project-detail-lower { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
    .project-detail-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
    .project-detail-thumbnail img { height: 68px; }
    .project-detail-stats > div { padding: 10px 6px; }
    .project-detail-stats strong { font-size: 1rem; }
    .project-detail-stats span { font-size: .7rem; }
    .project-detail-primary-actions { grid-template-columns: minmax(0, 1fr); }
}


/* Final project detail polish */
.project-detail-featured-badge {
    display: inline-flex;
    margin: 0 0 16px;
}
.project-detail-lower {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, .85fr);
    gap: 20px;
    align-items: start;
    margin: 0 0 24px;
}
.project-detail-about,
.project-detail-side-card {
    min-width: 0;
    padding: clamp(20px, 2.2vw, 30px);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 16px;
    background: var(--color-surface, #fff);
}
.project-detail-about > h2,
.project-detail-side-card > h2 { margin-top: 0; }
.project-detail-about > p:first-of-type { font-size: 1.04rem; line-height: 1.8; }
.project-detail-sidebar { display: grid; gap: 16px; min-width: 0; }
.project-detail-side-card p { margin: 8px 0; }
.project-detail-facts { margin: 0; }
.project-detail-facts > div {
    display: grid;
    grid-template-columns: minmax(85px, .7fr) minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
}
.project-detail-facts > div:last-child { border-bottom: 0; }
.project-detail-facts dt { color: var(--color-text-muted, #64748b); }
.project-detail-facts dd { margin: 0; overflow-wrap: anywhere; }
.project-detail-links { margin-top: 20px; }
.project-detail-primary-actions .btn-primary { background: var(--color-primary, #2563eb); color: #fff; }
@media (max-width: 900px) {
    .project-detail-lower { grid-template-columns: minmax(0, 1fr); }
}


/* Match the approved project-page mock-up more closely */
.card.card-body:has(.project-detail-hero) {
    position: relative;
    padding: clamp(18px, 2vw, 28px);
}
.project-detail-featured-badge {
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 2;
    margin: 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .18);
}
.project-detail-hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    gap: clamp(24px, 3vw, 42px);
    padding-top: 0;
    border-bottom: 0;
    margin-bottom: 24px;
}
.project-detail-media-column { padding-top: 0; }
.project-detail-visual { border-radius: 15px; }
.project-detail-screenshot {
    height: clamp(280px, 30vw, 410px);
    object-fit: contain;
}
.project-detail-primary-actions {
    grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
}
.project-detail-primary-actions .btn { border-radius: 10px; }
.project-detail-overview { padding-top: 2px; }
.project-detail-overview .project-detail-topline { margin-bottom: 20px; }
.project-detail-heading h1 { font-size: clamp(1.9rem, 2.7vw, 2.65rem); }
.project-detail-tags { margin-top: 20px; margin-bottom: 22px; }
.project-detail-stats > div { padding: 13px 10px; }
.project-detail-lower { margin-top: 0; }
.project-detail-about,
.project-detail-side-card { box-shadow: 0 2px 10px rgba(15, 23, 42, .025); }
.project-detail-sidebar { gap: 16px; }
.project-detail-side-card > h2 { margin-bottom: 14px; }
@media (max-width: 900px) {
    .project-detail-featured-badge { top: 12px; right: 12px; }
    .project-detail-hero { grid-template-columns: minmax(0, 1fr); }
    .project-detail-screenshot { height: clamp(240px, 55vw, 360px); }
}


/* Final spacing and media refinements for project detail */
.card.card-body:has(.project-detail-hero) { padding: clamp(18px, 2vw, 28px); }
.project-detail-featured-badge {
    position: static;
    display: inline-flex;
    width: fit-content;
    margin: 0 0 14px auto;
    box-shadow: none;
}
.project-detail-overview {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.project-detail-overview .project-detail-topline { order: 1; }
.project-detail-overview .project-detail-featured-badge { order: 0; }
.project-detail-overview .project-detail-heading { order: 2; }
.project-detail-overview .project-detail-tags { order: 3; }
.project-detail-overview .project-detail-stats { order: 4; }
.project-detail-overview .project-detail-source-link { order: 5; }
.project-detail-hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    gap: clamp(24px, 3vw, 42px);
    padding: 0;
    margin: 0 0 18px;
    border: 0;
}
.project-detail-screenshot {
    width: 100%;
    height: clamp(280px, 28vw, 370px);
    max-height: 370px;
    object-fit: contain;
    background: var(--color-surface, #f8fafc);
}
.project-detail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 9px;
    margin: 10px 0 12px;
}
.project-detail-thumbnail img { height: 76px; }
.project-detail-primary-actions { margin-top: 0; }
.project-detail-lower {
    margin-top: 0;
    padding-top: 18px;
    gap: 18px;
    border-top: 1px solid var(--color-border, #e2e8f0);
}
.project-detail-about,
.project-detail-side-card { padding: clamp(18px, 2vw, 26px); }
@media (max-width: 900px) {
    .project-detail-hero { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .project-detail-featured-badge { margin-left: 0; }
    .project-detail-screenshot { height: clamp(240px, 52vw, 350px); }
}


.project-detail-media-column { position: relative; }
.project-share-popover {
    margin-top: 10px;
    padding: 14px;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 12px;
    background: var(--color-surface, #fff);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
}
.project-share-popover[hidden] { display: none; }
.project-share-popover > strong { display: block; margin-bottom: 10px; }
.project-share-popover .project-share-actions { display: flex; flex-wrap: wrap; gap: 8px; }


/* Project stats icons and action placement */
.project-detail-stats > div {
    position: relative;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 9px;
    align-items: center;
}
.project-detail-stats > div::before {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    font-size: 1.25rem;
    line-height: 1;
    font-weight: 700;
}
.project-detail-stats > div:nth-child(1)::before { content: "◉"; color: #2583f7; }
.project-detail-stats > div:nth-child(2)::before { content: "▮"; color: #8b5cf6; }
.project-detail-stats > div:nth-child(3)::before { content: "♥"; color: #f43f5e; }
.project-detail-stats > div:nth-child(4)::before { content: "♟"; color: #0ea5e9; }
.project-detail-stats > div strong { grid-column: 2; grid-row: 1; }
.project-detail-stats > div span { grid-column: 2; grid-row: 2; }
.project-detail-primary-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 18px;
}
.project-detail-primary-actions .btn {
    min-height: 52px;
    border-radius: 11px;
}
@media (max-width: 520px) {
    .project-detail-stats > div { grid-template-columns: 1fr; }
    .project-detail-stats > div::before { grid-column: 1; grid-row: 1; }
    .project-detail-stats > div strong { grid-column: 1; grid-row: 2; }
    .project-detail-stats > div span { grid-column: 1; grid-row: 3; }
}


/* Keep primary project actions after the tags and activity stats */
.project-detail-overview .project-detail-topline { order: 1; }
.project-detail-overview .project-detail-heading { order: 2; }
.project-detail-overview .project-detail-tags { order: 3; }
.project-detail-overview .project-detail-stats { order: 4; }
.project-detail-overview .project-detail-primary-actions { order: 5; }
.project-detail-overview .project-detail-source-link { order: 6; }
.project-detail-overview .project-detail-primary-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 18px;
}
.project-detail-overview .project-detail-stats > div::before {
    font-size: 1.35rem;
}


/* Use clean, recognizable icons for project statistics */
.project-detail-stats > div::before {
    content: "";
    width: 28px;
    height: 28px;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    font-size: 0;
}
.project-detail-stats > div:nth-child(1)::before {
    color: #2583f7;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}
.project-detail-stats > div:nth-child(2)::before {
    color: #8b5cf6;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V10M10 19V5M16 19v-7M22 19V8'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V10M10 19V5M16 19v-7M22 19V8'/%3E%3C/svg%3E");
}
.project-detail-stats > div:nth-child(3)::before {
    color: #f43f5e;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.7l-1.1-1.1a5.5 5.5 0 0 0-7.8 7.8l1.1 1.1L12 21l7.8-7.5 1.1-1.1a5.5 5.5 0 0 0-.1-7.8Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.7l-1.1-1.1a5.5 5.5 0 0 0-7.8 7.8l1.1 1.1L12 21l7.8-7.5 1.1-1.1a5.5 5.5 0 0 0-.1-7.8Z'/%3E%3C/svg%3E");
}
.project-detail-stats > div:nth-child(4)::before {
    color: #0ea5e9;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM22 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM22 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8'/%3E%3C/svg%3E");
}


/* Keep the About card directly beneath the project image */
.project-detail-media-column .project-detail-about-under-image {
    margin-top: 20px;
    padding: clamp(20px, 2.2vw, 30px);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 16px;
    background: var(--color-surface, #fff);
}
.project-detail-about-under-image > h2 { margin-top: 0; }
.project-detail-lower:not(:has(.project-detail-about)) {
    display: block;
    margin-top: 22px;
    padding-top: 22px;
}
.project-detail-lower:not(:has(.project-detail-about)) .project-detail-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
@media (max-width: 700px) {
    .project-detail-lower:not(:has(.project-detail-about)) .project-detail-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* Keep creator and project details in the right-hand overview column */
.project-detail-overview > .project-detail-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-top: 22px;
    min-width: 0;
}
.project-detail-overview > .project-detail-sidebar .project-detail-side-card {
    padding: 20px;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 14px;
    background: var(--color-surface, #fff);
}
.project-detail-overview > .project-detail-sidebar .project-detail-side-card h2 {
    margin-top: 0;
}
.project-detail-overview > .project-detail-sidebar .project-detail-facts > div {
    grid-template-columns: minmax(80px, .7fr) minmax(0, 1fr);
}
@media (max-width: 900px) {
    .project-detail-overview > .project-detail-sidebar {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}


/* Creator profile card, matching the project page mock-up */
.project-detail-creator-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}
.project-detail-creator-avatar {
    display: flex;
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    color: #fff;
    font-size: 1.6rem;
    font-weight: 750;
    text-decoration: none;
}
.project-detail-creator-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.project-detail-creator-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}
.project-detail-creator-copy > strong { font-size: 1.05rem; }
.project-detail-creator-copy > strong a {
    color: var(--color-text, #0f172a);
    text-decoration: none;
}
.project-detail-creator-projects {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.project-detail-creator-projects span { font-size: 1.25em; line-height: 1; }


/* Creator card follows the website/share actions in the right column */
.project-detail-overview > .project-detail-creator-card {
    order: 6;
    margin-top: 16px;
    padding: 20px;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 14px;
    background: var(--color-surface, #fff);
}
.project-detail-overview > .project-detail-creator-card h2 { margin-top: 0; }
.project-detail-overview > .project-detail-source-link { order: 7; }


/* Keep a consistent six-slot preview gallery even when projects have few images */
.project-detail-gallery {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0 0;
}
.project-detail-thumbnail {
    min-width: 0;
    height: 82px;
    overflow: hidden;
    border: 1px solid var(--color-border, #dbe3ef);
    border-radius: 10px;
    background: var(--color-surface, #f8fafc);
}
.project-detail-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.project-detail-thumbnail-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px;
    color: var(--color-text-muted, #64748b);
    border-style: dashed;
    font-size: .68rem;
    line-height: 1.15;
    text-align: center;
}
.project-detail-placeholder-icon {
    font-size: 1.25rem;
    opacity: .65;
}
@media (max-width: 620px) {
    .project-detail-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .project-detail-thumbnail { height: 76px; }
}


/* Gallery matches submission capacity: one main image plus four additional images */
.project-detail-gallery {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.project-detail-thumbnail {
    aspect-ratio: 1.45 / 1;
    height: auto;
    min-height: 64px;
}
@media (max-width: 620px) {
    .project-detail-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .project-detail-thumbnail { min-height: 70px; }
}


/* Project page: final gallery and engagement panel styles.
   Keep these rules explicit with normal cascade and selector specificity. */
.project-detail-media-column .project-detail-gallery {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0 0;
}
.project-detail-media-column .project-detail-gallery > .project-detail-thumbnail {
    display: block;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 76px;
    aspect-ratio: 1.28 / 1;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--color-border, #dbe3ef);
    border-radius: 12px;
    background: var(--color-surface, #fff);
    box-sizing: border-box;
}
.project-detail-media-column .project-detail-gallery > button.project-detail-thumbnail {
    cursor: pointer;
}
.project-detail-media-column .project-detail-gallery > .project-detail-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 76px;
    object-fit: cover;
}
.project-detail-media-column .project-detail-gallery > .project-detail-thumbnail-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px;
    border: 1px dashed #cbd5e1;
    background: linear-gradient(145deg, #ffffff 0%, #f1f5ff 100%);
    color: #64748b;
    text-align: center;
    cursor: default;
}
.project-detail-media-column .project-detail-gallery > .project-detail-thumbnail-placeholder::before {
    content: "+";
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e5edff;
    color: #2563eb;
    font-size: 1.2rem;
    font-weight: 700;
}
.project-detail-media-column .project-detail-gallery > .project-detail-thumbnail-placeholder .project-detail-placeholder-icon {
    display: none;
}
.project-detail-media-column .project-detail-gallery > .project-detail-thumbnail-placeholder span:last-child {
    font-size: .7rem;
    font-weight: 600;
}
.project-actions:not(.creator-actions) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    margin: 24px 0;
    padding: 16px;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 16px;
    background: var(--color-surface, #fff);
    box-shadow: 0 5px 18px rgba(15, 23, 42, .035);
}
.project-actions:not(.creator-actions) > form {
    display: flex;
    margin: 0;
}
.project-actions:not(.creator-actions) > form .btn,
.project-actions:not(.creator-actions) > .btn {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
}
.project-detail-gallery img[hidden] {
    display: none;
}
@media (max-width: 700px) {
    .project-detail-media-column .project-detail-gallery {
        gap: 6px;
    }
    .project-detail-media-column .project-detail-gallery > .project-detail-thumbnail,
    .project-detail-media-column .project-detail-gallery > .project-detail-thumbnail img {
        min-height: 54px;
        border-radius: 8px;
    }
    .project-detail-media-column .project-detail-gallery > .project-detail-thumbnail-placeholder {
        gap: 4px;
        padding: 4px;
    }
    .project-detail-media-column .project-detail-gallery > .project-detail-thumbnail-placeholder::before {
        width: 20px;
        height: 20px;
        font-size: 1rem;
    }
    .project-detail-media-column .project-detail-gallery > .project-detail-thumbnail-placeholder span:last-child {
        font-size: .58rem;
    }
    .project-actions:not(.creator-actions) {
        gap: 8px;
        padding: 10px;
    }
    .project-actions:not(.creator-actions) > form {
        flex: 1 1 calc(50% - 8px);
    }
    .project-actions:not(.creator-actions) > form .btn,
    .project-actions:not(.creator-actions) > .btn {
        width: 100%;
    }
}


/* Project screenshots should remain fully visible instead of being cropped. */
.project-detail-media-column .project-detail-visual .project-detail-screenshot {
    display: block;
    width: 100%;
    height: clamp(280px, 28vw, 390px);
    max-height: none;
    margin: 0;
    object-fit: contain;
    object-position: center;
    background: var(--color-surface, #f8fafc);
}
.project-detail-media-column .project-detail-gallery > .project-detail-thumbnail img {
    width: 100%;
    height: 100%;
    min-height: 76px;
    object-fit: contain;
    object-position: center;
    background: var(--color-surface, #f8fafc);
}
@media (max-width: 700px) {
    .project-detail-media-column .project-detail-visual .project-detail-screenshot {
        height: clamp(220px, 62vw, 340px);
    }
    .project-detail-media-column .project-detail-gallery > .project-detail-thumbnail img {
        min-height: 54px;
    }
}


/* Homepage discovery columns and compact project sidebar */
.homepage-discovery-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    align-items: start;
    gap: 28px;
    margin-top: 30px;
}

.homepage-discovery-main {
    min-width: 0;
}

.homepage-discovery-main .homepage-project-section:first-child {
    margin-top: 0;
}

.homepage-discovery-sidebar {
    display: grid;
    gap: 16px;
    min-width: 0;
    position: sticky;
    top: 100px;
}

.homepage-sidebar-panel {
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
}

.homepage-sidebar-panel-heading {
    margin-bottom: 12px;
}

.homepage-sidebar-panel-heading .eyebrow {
    margin: 0 0 4px;
    font-size: .68rem;
    letter-spacing: .08em;
}

.homepage-sidebar-panel-heading h3 {
    margin: 0;
    font-size: 1.12rem;
}

.homepage-sidebar-list {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.homepage-sidebar-list li {
    min-width: 0;
}

.homepage-sidebar-project {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 0;
    color: inherit;
    text-decoration: none;
    border-top: 1px solid var(--color-border);
}

.homepage-sidebar-project:hover .homepage-sidebar-project-copy strong {
    color: var(--color-primary);
}

.homepage-sidebar-project-logo {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: var(--color-surface-muted, #f1f5f9);
    color: var(--color-primary);
    font-weight: 800;
}

.homepage-sidebar-project-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
}

.homepage-sidebar-project-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.homepage-sidebar-project-copy strong {
    overflow: hidden;
    font-size: .88rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
}

.homepage-sidebar-project-copy small {
    color: var(--color-text-muted, #64748b);
    font-size: .76rem;
}

.homepage-sidebar-empty {
    margin: 0;
    font-size: .88rem;
}

.homepage-sidebar-submit {
    display: grid;
    gap: 5px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-surface-muted, #f8fafc);
    text-decoration: none;
}

.homepage-sidebar-submit strong {
    color: var(--color-text);
}

.homepage-sidebar-submit span {
    color: var(--color-text-muted, #64748b);
    font-size: .88rem;
    line-height: 1.5;
}

@media (max-width: 1000px) {
    .homepage-discovery-layout {
        grid-template-columns: minmax(0, 1fr) 270px;
        gap: 18px;
    }
}

@media (max-width: 760px) {
    .homepage-discovery-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .homepage-discovery-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .homepage-sidebar-submit {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .homepage-discovery-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }

    .homepage-sidebar-submit {
        grid-column: auto;
    }
}


/* Featured projects sit directly below the homepage hero. */
.homepage-discovery-main .homepage-project-section[aria-labelledby="featured-projects-heading"] {
    margin-top: 24px;
    margin-bottom: 38px;
}

.homepage-discovery-main .homepage-project-section[aria-labelledby="featured-projects-heading"] > .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

@media (max-width: 560px) {
    .homepage-discovery-main .homepage-project-section[aria-labelledby="featured-projects-heading"] > .grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
