:root {
    --paper: #050505;
    --ink: #ffffff;
    --soft-ink: #c8c8c8;
    --line: #ffffff;
    --wash: #0e0e0e;
    --wash-2: #080808;
    --shade: rgba(255, 255, 255, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

[hidden] {
    display: none !important;
}

html {
    background: var(--paper);
}

body {
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        radial-gradient(circle at 20% 8%, rgba(255, 255, 255, 0.12), transparent 13rem),
        var(--paper);
    background-size: 44px 44px, 44px 44px, auto;
    color: var(--ink);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.custom-context-menu {
    position: fixed;
    z-index: 10000;
    display: grid;
    gap: 4px;
    min-width: 160px;
    padding: 8px;
    background: #080808;
    border: 2px solid var(--line);
    border-radius: 6px;
    box-shadow: 6px 6px 0 var(--ink);
}

.custom-context-menu[hidden] {
    display: none;
}

.custom-context-menu button {
    width: 100%;
    min-height: 36px;
    padding: 0 10px;
    color: var(--ink);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 4px;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.custom-context-menu button:hover:not(:disabled),
.custom-context-menu button:focus-visible {
    color: #050505;
    background: var(--ink);
    outline: none;
}

.custom-context-menu button:disabled {
    color: rgba(255, 255, 255, 0.32);
    cursor: not-allowed;
}

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.button:focus-visible,
.nav-link:focus-visible,
.text-link:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

.page-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 44px;
}

.topbar,
.overview-card,
.project-row,
.notice,
.code-block-wrap,
.panel-form,
.news-toast,
.latest-panel {
    position: relative;
    background: var(--wash-2);
    border: 3px solid var(--line);
    border-radius: 6px;
    box-shadow: 7px 7px 0 var(--ink);
}

.topbar::before,
.overview-card::before,
.project-row::before,
.notice::before,
.panel-form::before,
.news-toast::before,
.latest-panel::before {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(16, 16, 16, 0.18);
    pointer-events: none;
}

.topbar {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px;
}

.brand {
    padding: 0 8px;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: uppercase;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-link,
.button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 2px solid var(--ink);
    border-radius: 6px;
    color: var(--ink);
    font: inherit;
    font-weight: 900;
    text-decoration: none;
    transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.auth-slot {
    display: contents;
}

.nav-button {
    cursor: pointer;
}

.nav-link {
    padding: 0 13px;
    background: var(--ink);
    color: var(--paper);
}

.nav-link:hover,
.nav-link.active {
    background: var(--paper);
    color: var(--ink);
}

.home,
.projects,
.notice {
    padding-top: 46px;
}

.home {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
    gap: 34px;
    align-items: start;
}

.hero,
.projects-head {
    display: grid;
    gap: 16px;
}

.hero {
    padding: 34px 0 12px;
}

.eyebrow,
.card-label {
    width: fit-content;
    padding: 4px 8px;
    background: var(--ink);
    color: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 4px;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    max-width: 8ch;
    font-size: clamp(3.3rem, 7vw, 6.1rem);
    line-height: 0.9;
    letter-spacing: 0;
    text-transform: uppercase;
    text-shadow: 3px 3px 0 rgba(16, 16, 16, 0.12);
}

.projects-head h1 {
    max-width: none;
    font-size: clamp(3.4rem, 8vw, 6.4rem);
}

.lede {
    max-width: 56ch;
    color: var(--soft-ink);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.65;
}

.actions,
.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.actions {
    margin-top: 10px;
}

.button {
    padding: 0 16px;
    background: var(--ink);
    color: var(--paper);
    cursor: pointer;
}

.button:hover,
.text-link:hover {
    background: var(--paper);
    color: var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    transform: none;
}

.button:disabled {
    cursor: default;
    opacity: 0.75;
    transform: none;
}

.overview {
    display: grid;
    gap: 16px;
}

.overview-card {
    display: grid;
    gap: 12px;
    padding: 24px;
}

.overview-card h2,
.project-copy h2,
.notice h1 {
    letter-spacing: 0;
}

.overview-card h2 {
    font-size: 1.6rem;
}

.overview-card p,
.project-copy p {
    color: var(--soft-ink);
    font-weight: 700;
    line-height: 1.58;
}

.text-link {
    width: fit-content;
    min-height: 36px;
    padding: 0 12px;
    background: var(--wash);
}

.projects {
    max-width: 980px;
    margin: 0 auto;
}

.projects-head {
    padding: 24px 0 10px;
}

.project-list {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.project-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    min-height: 124px;
    padding: 22px;
}

.project-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.project-teaser {
    overflow-wrap: anywhere;
}

.project-read-more {
    margin-top: -2px;
}

.project-copy h2 {
    font-size: 1.8rem;
    line-height: 1.1;
    text-transform: uppercase;
}

.project-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 6px 10px;
    margin-top: 4px;
    background: var(--ink);
    color: var(--paper);
    border: 2px solid var(--line);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0;
}

.meta-label {
    text-transform: uppercase;
}

.meta-value {
    text-transform: none;
}

.project-actions {
    justify-content: flex-end;
}

.project-extra {
    display: grid;
    justify-items: end;
    align-content: start;
    gap: 10px;
    min-width: min(100%, 300px);
}

.project-open-page {
    justify-self: center;
    align-self: end;
    min-width: 180px;
    margin-top: 6px;
}

.project-extra .project-actions {
    justify-content: flex-end;
}

.project-update-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    max-width: 300px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: #050505;
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: right;
}

.project-update-toggle input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    accent-color: #ffffff;
}

.project-update-toggle:has(input:disabled) {
    opacity: 0.62;
}

.profile-page {
    display: grid;
    gap: 22px;
}

.profile-shell {
    display: grid;
    gap: 18px;
}

.profile-tabbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.03);
}

.profile-tabbar .button {
    width: 100%;
    min-height: 50px;
    justify-content: center;
}

.profile-tabbar .button.is-active {
    background: #ffffff;
    color: #050505;
}

.profile-page .card-label {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    font-size: 0.76rem;
    letter-spacing: 0.06em;
}

.profile-panel-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.95fr);
    gap: 18px;
}

.profile-card-large {
    min-height: 220px;
}

.profile-status-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.profile-status-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--soft-ink);
}

.profile-status-row strong {
    color: var(--ink);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

.profile-status-row span {
    text-align: right;
}

.profile-toggle-list,
.profile-info-list {
    display: grid;
    gap: 12px;
    margin-top: 10px;
}

.profile-toggle-row,
.profile-info-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
}

.profile-toggle-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
}

.profile-toggle-copy {
    display: grid;
    gap: 4px;
}

.profile-toggle-copy strong,
.profile-info-row strong {
    color: var(--ink);
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-toggle-copy small,
.profile-info-row p {
    margin: 0;
    color: var(--soft-ink);
    font-size: 0.94rem;
    line-height: 1.5;
}

.profile-info-row {
    grid-template-columns: 1fr;
    align-items: start;
}

.profile-toggle-row.is-muted {
    opacity: 0.7;
}

.profile-meta p,
.profile-status-row span {
    max-width: 32ch;
}

.verify-email-page {
    gap: 20px;
}

.verify-email-grid {
    align-items: start;
}

.verify-email-card,
.verify-email-side {
    min-height: 100%;
}

.verify-email-intro {
    margin-bottom: 8px;
}

.profile-inline-action {
    display: flex;
    justify-content: center;
    margin-top: 6px;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

body.page-loading main,
body.page-loading .topbar {
    pointer-events: none;
}

body.page-loading .topbar,
body.page-loading .panel-form,
body.page-loading .news-feed,
body.page-loading .latest-panel,
body.page-loading .project-detail-card,
body.page-loading .notice,
body.page-loading .news-hero,
body.page-loading .admin-tabs,
body.page-loading .project-list > *,
body.page-loading .support-workspace,
body.page-loading .chat-shell .chat-layout,
body.page-loading .chat-shell .chat-panel {
    position: relative;
    overflow: hidden;
}

body.page-loading .topbar::after,
body.page-loading .panel-form::after,
body.page-loading .news-feed::after,
body.page-loading .latest-panel::after,
body.page-loading .project-detail-card::after,
body.page-loading .notice::after,
body.page-loading .news-hero::after,
body.page-loading .admin-tabs::after,
body.page-loading .project-list > *::after,
body.page-loading .support-workspace::after,
body.page-loading .chat-shell .chat-layout::after,
body.page-loading .chat-shell .chat-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0%, rgba(185, 185, 185, 0.18) 45%, rgba(255, 255, 255, 0.02) 100%);
    background-size: 220% 100%;
    animation: skeleton-shimmer 1.4s linear infinite;
    pointer-events: none;
}

body.page-loading .brand,
body.page-loading .nav-link,
body.page-loading .eyebrow,
body.page-loading .card-label,
body.page-loading h1,
body.page-loading h2,
body.page-loading h3,
body.page-loading p,
body.page-loading label,
body.page-loading strong,
body.page-loading span,
body.page-loading .button,
body.page-loading .legal-rail a,
body.page-loading .news-item time {
    color: transparent !important;
    text-shadow: none !important;
    background: linear-gradient(90deg, rgba(95, 95, 95, 0.8) 0%, rgba(165, 165, 165, 0.95) 50%, rgba(95, 95, 95, 0.8) 100%);
    background-size: 220% 100%;
    animation: skeleton-shimmer 1.4s linear infinite;
    border-radius: 6px;
}

body.page-loading input,
body.page-loading textarea,
body.page-loading select,
body.page-loading .profile-avatar,
body.page-loading .news-image,
body.page-loading .news-video,
body.page-loading iframe {
    color: transparent !important;
    background: linear-gradient(90deg, rgba(82, 82, 82, 0.85) 0%, rgba(148, 148, 148, 0.9) 50%, rgba(82, 82, 82, 0.85) 100%) !important;
    background-size: 220% 100% !important;
    animation: skeleton-shimmer 1.4s linear infinite;
    border-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: none !important;
}

body.page-loading .button {
    border-color: transparent !important;
}

body.page-loading .form-message {
    min-height: 1.2em;
}

@media (max-width: 860px) {
    .profile-tabbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-toggle-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .profile-toggle-row input[type="checkbox"] {
        justify-self: start;
    }

    .profile-status-row {
        flex-direction: column;
        align-items: start;
    }

    .profile-status-row span,
    .profile-meta p {
        max-width: none;
        text-align: left;
    }
}

.news-grid {
    display: grid;
    gap: 18px;
}

.project-admin-bar,
.project-admin-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.project-admin-bar {
    margin-bottom: 4px;
}

.project-admin-actions .button,
.project-admin-bar .button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.84rem;
}

.code-block-wrap {
    min-width: min(100%, 460px);
    max-width: 500px;
    padding: 16px;
    background: var(--wash);
}

.code-block {
    padding-right: 90px;
    color: var(--ink);
    font-family: Consolas, "Liberation Mono", monospace;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.code-block-wrap .copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
}

.notice {
    display: grid;
    gap: 14px;
    width: min(620px, 100%);
    margin: 70px auto 0;
    padding: 28px;
}

.notice h1 {
    max-width: none;
    font-size: clamp(2.6rem, 6vw, 4.8rem);
}

.project-detail-page {
    display: grid;
    gap: 24px;
    max-width: 980px;
    margin: 0 auto;
    padding-top: 46px;
}

.project-detail-card {
    display: grid;
    gap: 16px;
    padding: 24px;
    background: var(--wash-2);
    border: 3px solid var(--line);
    border-radius: 6px;
    box-shadow: 7px 7px 0 var(--ink);
}

.project-detail-card h2 {
    font-size: clamp(2rem, 5vw, 3.6rem);
    text-transform: uppercase;
}

.project-detail-topline {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
    flex-wrap: wrap;
}

.project-language-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.project-language-switcher .button {
    min-height: 34px;
    padding: 0 12px;
}

.project-detail-rich {
    margin-top: 4px;
}

.project-detail-actions {
    justify-content: flex-start;
}

.news-page {
    display: grid;
    gap: 24px;
    padding-top: 46px;
}

.news-hero {
    display: grid;
    gap: 16px;
    padding: 24px 0 6px;
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
}

.news-form,
.news-feed,
.panel-form {
    position: relative;
    background: var(--wash-2);
    border: 3px solid var(--line);
    border-radius: 6px;
    box-shadow: 7px 7px 0 var(--ink);
    padding: 22px;
}

.news-form::before,
.news-feed::before,
.panel-form::before {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    pointer-events: none;
}

.news-form {
    display: grid;
    gap: 14px;
}

.news-form h2,
.news-feed h2,
.panel-form h2 {
    text-transform: uppercase;
    font-size: 1.4rem;
    letter-spacing: 0;
}

.field {
    display: grid;
    gap: 8px;
}

.field label {
    font-size: 0.85rem;
    font-weight: 900;
    text-transform: uppercase;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: none;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
}

.news-email-field {
    gap: 12px;
}

.news-toggle-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    text-transform: none;
}

.news-toggle-copy {
    display: grid;
    gap: 4px;
}

.news-toggle-copy strong {
    color: var(--ink);
    font-size: 0.96rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.news-toggle-copy small {
    color: var(--soft-ink);
    font-size: 0.92rem;
    line-height: 1.5;
}

.news-toggle-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--ink);
    border-radius: 6px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-weight: 700;
}

.field textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.5;
}

.field select {
    min-height: 46px;
}

.news-feed {
    display: grid;
    gap: 16px;
}

.news-list {
    display: grid;
    gap: 14px;
}

.news-item {
    display: grid;
    gap: 10px;
    padding: 16px;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 6px;
    box-shadow: 4px 4px 0 var(--ink);
}

.news-item h3 {
    font-size: 1.2rem;
    text-transform: uppercase;
}

.news-item p {
    color: var(--soft-ink);
    font-weight: 700;
    line-height: 1.65;
}

.news-rich {
    display: grid;
    align-items: start;
    gap: 10px;
    color: var(--soft-ink);
    font-weight: 700;
    line-height: 1.65;
    white-space: normal;
}

.news-rich p {
    color: var(--soft-ink);
}

.news-block-heading {
    margin-top: 6px;
    color: var(--ink);
    font-size: 1.05rem;
    text-transform: uppercase;
}

.news-divider {
    width: 100%;
    border: 0;
    border-top: 2px dashed var(--ink);
}

.news-link-button {
    min-height: 34px;
    padding: 0 12px;
}

.block-chip-note {
    color: var(--soft-ink);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.translation-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 2px solid var(--ink);
    border-radius: 6px;
    background: var(--paper);
}

.translation-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.news-image {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border: 2px solid var(--ink);
    border-radius: 6px;
}

.news-video,
.news-media iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 2px solid var(--ink);
    border-radius: 6px;
    background: #000;
}

.news-media {
    display: grid;
    gap: 8px;
}

.news-media figcaption {
    color: var(--soft-ink);
    font-weight: 800;
}

.media-title {
    color: var(--ink);
    font-size: 1rem;
    text-transform: uppercase;
}

.news-item time {
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
}

.auth-page {
    display: grid;
    gap: 24px;
    padding-top: 46px;
}

.latest-panel {
    display: grid;
    gap: 12px;
    min-height: 420px;
    padding: 24px;
    overflow: hidden;
}

.support-dock {
    position: fixed;
    left: 50%;
    bottom: 16px;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: translateX(-50%);
}

.support-dock .button {
    min-width: 112px;
    padding: 0 16px;
    background: var(--paper);
    color: var(--ink);
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
}

.support-dock .button:hover {
    background: var(--paper);
    color: var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.86);
    z-index: 1200;
}

.modal.open {
    display: flex;
}

.modal-content {
    position: relative;
    width: min(700px, 100%);
    max-height: min(84vh, 780px);
    overflow: auto;
    padding: 24px;
    background: var(--wash-2);
    color: var(--ink);
    border: 3px solid var(--line);
    border-radius: 6px;
    box-shadow: 8px 8px 0 var(--line);
}

.support-gate-modal {
    display: grid;
    gap: 16px;
}

.support-gate-modal p {
    color: var(--soft-ink);
    font-weight: 800;
    line-height: 1.6;
}

.support-gate-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
    color: var(--ink);
    font-size: 1.4rem;
    cursor: pointer;
}

.latest-fade {
    position: relative;
    display: grid;
    gap: 14px;
    max-height: 300px;
    overflow: hidden;
    padding-bottom: 58px;
}

.latest-fade::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 86px;
    background: linear-gradient(rgba(8, 8, 8, 0), var(--wash-2) 74%);
    pointer-events: none;
}

.latest-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.latest-open {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 12px;
    white-space: nowrap;
}

.latest-meta {
    display: grid;
    gap: 8px;
}

.latest-panel h2 {
    font-size: clamp(1.45rem, 2vw, 1.9rem);
    line-height: 1.05;
    text-transform: uppercase;
}

.latest-panel p {
    color: var(--soft-ink);
    font-weight: 800;
    line-height: 1.6;
}

.latest-preview,
.latest-preview p {
    max-width: 34ch;
}

.latest-preview {
    display: grid;
    gap: 12px;
}

.latest-preview h3 {
    font-size: 1rem;
    text-transform: uppercase;
}

.latest-media-note {
    border: 2px dashed var(--ink);
    border-radius: 6px;
    padding: 10px;
}

.latest-panel time {
    color: var(--soft-ink);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.latest-image {
    width: 100%;
    max-height: 168px;
    object-fit: cover;
    border: 2px solid var(--ink);
    border-radius: 6px;
}

.latest-panel .toast-actions {
    margin-top: auto;
    padding-top: 8px;
}

.latest-actions {
    position: relative;
    z-index: 2;
}

.profile-card {
    display: grid;
    gap: 14px;
}

.profile-avatar {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 2px solid var(--ink);
    border-radius: 6px;
    background: var(--paper);
}

.profile-meta {
    display: grid;
    gap: 8px;
}

.profile-meta h3 {
    font-size: 1.4rem;
    text-transform: uppercase;
}

.profile-meta p {
    color: var(--soft-ink);
    font-weight: 700;
    line-height: 1.5;
}

.delete-form {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.revision-log {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    border: 2px dashed var(--ink);
    border-radius: 6px;
}

.revision-item {
    display: grid;
    gap: 4px;
    color: var(--soft-ink);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.45;
}

.auth-grid,
.admin-only {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.auth-anchor {
    position: relative;
    top: -90px;
    display: block;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--soft-ink);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    border-top: 2px dashed var(--ink);
}

.button-google {
    justify-content: center;
    border-color: var(--ink);
    background: #fff;
    color: #050505;
}

.button-google:hover {
    background: #f1f1f1;
    color: #050505;
}

.auth-switch {
    margin: 0;
    color: var(--soft-ink);
    font-size: 0.9rem;
    font-weight: 800;
}

.auth-switch a {
    color: var(--accent);
    font-weight: 900;
}

.google-complete-form {
    grid-column: 1 / -1;
}

.page-admin .news-hero {
    gap: 10px;
}

.page-admin .admin-only {
    gap: 22px;
}

.admin-wide {
    grid-column: 1 / -1;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 2px solid var(--ink);
    border-radius: 6px;
    background: #050505;
}

.admin-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.admin-status-card {
    display: grid;
    gap: 6px;
    min-height: 86px;
    padding: 14px;
    border: 2px solid rgba(255, 255, 255, 0.34);
    border-radius: 6px;
    background: #080808;
}

.admin-status-card strong {
    font-size: 0.78rem;
    text-transform: uppercase;
}

.admin-status-card span {
    color: var(--soft-ink);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.panel-form {
    display: grid;
    align-content: start;
    gap: 16px;
}

.panel-form > .card-label,
.news-feed > .card-label {
    width: fit-content;
}

.panel-form h2,
.news-feed h2 {
    padding-bottom: 8px;
    border-bottom: 2px solid var(--ink);
}

.editor-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.editor-tools .button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.85rem;
}

.block-list,
.admin-user-results,
.admin-user-card {
    display: grid;
    gap: 10px;
}

.block-chip,
.admin-target,
.chat-item {
    display: grid;
    gap: 8px;
    padding: 12px;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 6px;
    color: var(--ink);
    font: inherit;
    font-weight: 800;
    text-align: left;
}

.chat-item {
    cursor: pointer;
}

.chat-item:hover {
    background: var(--ink);
    color: var(--paper);
}

.block-chip {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
}

.media-pick-list {
    display: grid;
    gap: 10px;
}

.media-pick-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 12px;
    border: 2px solid var(--ink);
    border-radius: 6px;
    background: var(--paper);
}

.media-pick-main {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.media-pick-meta {
    color: var(--soft-ink);
    font-size: 0.88rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.media-pick-fields {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 8px;
}

.media-pick-fields label {
    display: grid;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.media-pick-fields input {
    min-height: 38px;
    padding: 8px 10px;
    border: 2px solid var(--ink);
    border-radius: 6px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-weight: 800;
}

.project-file-row,
.project-file-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.project-file-row {
    padding: 10px;
    border: 2px solid var(--ink);
    border-radius: 6px;
    background: var(--paper);
}

.project-file-copy {
    min-width: 0;
    overflow-wrap: anywhere;
}

.project-file-action {
    justify-content: start;
    margin-top: 10px;
}

.project-file-action span {
    color: var(--soft-ink);
    font-size: 0.9rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.project-downloads {
    display: grid;
    gap: 10px;
    width: min(100%, 420px);
    justify-items: end;
}

.project-downloads .project-file-action {
    grid-template-columns: minmax(0, 1fr);
    justify-items: end;
    gap: 6px;
    width: 100%;
    margin-top: 0;
}

.project-downloads .project-file-action .button,
.project-downloads .project-file-action span {
    max-width: 100%;
}

.project-downloads .project-file-action span {
    text-align: right;
}

.project-archive-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
}

.project-archive-dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 14px;
    width: min(720px, 100%);
    max-height: min(78vh, 720px);
    padding: 18px;
    border: 3px solid var(--line);
    border-radius: 8px;
    background: var(--wash-2);
    box-shadow: 8px 8px 0 var(--ink);
}

.project-archive-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.project-archive-head h2 {
    margin: 6px 0 0;
    overflow-wrap: anywhere;
}

.project-archive-list {
    display: grid;
    gap: 10px;
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
    scrollbar-gutter: stable;
}

.project-archive-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 2px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.project-archive-item > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.project-archive-item strong,
.project-archive-item span {
    overflow-wrap: anywhere;
}

.project-archive-item span {
    color: var(--soft-ink);
    font-size: 0.9rem;
    font-weight: 800;
}

.project-archive-item .button {
    width: 100%;
    min-width: 0;
    text-align: center;
}

.delete-cross {
    min-width: 40px;
    padding: 0 10px;
    font-size: 1.2rem;
    line-height: 1;
}

.admin-project-card.is-editing {
    outline: 4px solid var(--ink);
    outline-offset: 4px;
    box-shadow: 8px 8px 0 var(--ink);
}

.news-bullet-list {
    display: grid;
    gap: 6px;
    padding-left: 22px;
    margin: 8px 0;
}

.news-code-line {
    padding: 10px 12px;
    border: 2px solid var(--ink);
    border-radius: 6px;
    background: #050505;
    color: #fff;
    font: 800 0.9rem/1.45 "Courier New", monospace;
    overflow-x: auto;
}

.admin-details {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 8px 12px;
    margin: 12px 0;
}

.admin-details dt {
    font-weight: 900;
    text-transform: uppercase;
}

.admin-details dd {
    color: var(--soft-ink);
    overflow-wrap: anywhere;
}

.small-avatar {
    max-width: 96px;
}

.form-message {
    min-height: 1.4em;
    color: var(--soft-ink);
    font-weight: 900;
}

.news-toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 50;
    display: grid;
    gap: 12px;
    width: min(360px, calc(100vw - 32px));
    padding: 20px;
}

.news-toast h2 {
    text-transform: uppercase;
}

.news-toast p {
    color: var(--soft-ink);
    font-weight: 800;
    line-height: 1.45;
}

.toast-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.news-empty {
    padding: 16px;
    border: 2px dashed var(--ink);
    border-radius: 6px;
    color: var(--soft-ink);
    font-weight: 700;
}

.upload-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
}

.upload-card {
    width: min(420px, 100%);
    display: grid;
    justify-items: center;
    gap: 14px;
    padding: 26px;
    border: 4px solid var(--paper);
    border-radius: 10px;
    background: var(--ink);
    color: var(--paper);
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.upload-card .card-label,
.upload-card p {
    color: var(--paper);
}

.upload-spinner {
    width: 44px;
    height: 44px;
    border: 5px solid rgba(255, 255, 255, 0.24);
    border-top-color: var(--paper);
    border-radius: 50%;
    animation: upload-spin 0.8s linear infinite;
}

.upload-progress {
    width: 100%;
    height: 12px;
    border: 2px solid var(--paper);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    overflow: hidden;
}

.upload-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--paper);
    border-radius: inherit;
    transition: width 0.2s ease;
}

.upload-progress-percent {
    color: var(--paper);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.privacy-consent-banner {
    position: fixed;
    left: max(18px, env(safe-area-inset-left));
    bottom: 18px;
    z-index: 1000;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    width: min(920px, calc(100% - 36px));
    padding: 16px;
    border: 2px solid rgba(255, 255, 255, 0.34);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        rgba(0, 0, 0, 0.94);
    box-shadow: 8px 8px 0 rgba(255, 255, 255, 0.92), 0 24px 80px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(14px);
}

.has-open-modal .privacy-consent-banner {
    z-index: 900;
    width: min(560px, calc(100% - 36px));
    opacity: 0.78;
    pointer-events: auto;
}

.privacy-consent-copy {
    display: grid;
    gap: 4px;
}

.privacy-consent-copy strong {
    color: #ffffff;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.privacy-consent-copy span {
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.5;
}

.privacy-consent-actions,
.legal-links {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.consent-block-notice {
    margin: 0 0 18px;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
        rgba(0, 0, 0, 0.94);
    box-shadow: 7px 7px 0 rgba(255, 255, 255, 0.82);
    color: #ffffff;
}

.consent-block-notice h2 {
    margin: 6px 0;
    color: #ffffff;
}

.consent-block-notice p {
    color: rgba(255, 255, 255, 0.82);
}

.consent-block-notice .card-label {
    width: fit-content;
    color: #050505;
    background: #ffffff;
}

.legal-links {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.88rem;
}

.legal-links a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-rail {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 850;
    display: flex;
    flex-direction: row;
    gap: 16px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.legal-rail a {
    display: inline-block;
    padding: 0;
    border-radius: 0;
    color: #ffffff;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    transition: opacity 160ms ease;
}

.legal-rail a:hover,
.legal-rail a:focus-visible {
    color: #ffffff;
    opacity: 0.72;
    outline: none;
}

.has-open-modal .legal-rail {
    z-index: 840;
    opacity: 0.62;
}

.legal-page .page-shell {
    width: min(1040px, calc(100% - 32px));
}

.legal-hero,
.legal-card {
    position: relative;
    border: 3px solid var(--line);
    border-radius: 6px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.015)),
        var(--wash-2);
    box-shadow: 7px 7px 0 var(--ink);
}

.legal-hero {
    display: grid;
    gap: 12px;
    margin: 28px 0 18px;
    padding: clamp(22px, 4vw, 34px);
    overflow: hidden;
}

.legal-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -110px;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 62%);
    pointer-events: none;
}

.legal-hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2.2rem, 7vw, 5.2rem);
    letter-spacing: -0.08em;
    line-height: 0.92;
}

.legal-hero p,
.legal-card p {
    color: var(--soft-ink);
    line-height: 1.7;
}

.legal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.legal-document {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.legal-toc {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 3px solid var(--line);
    border-radius: 6px;
    background: #050505;
    box-shadow: 5px 5px 0 var(--ink);
}

.legal-toc a {
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 900;
    line-height: 1.25;
    text-decoration: none;
    text-transform: uppercase;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
    color: var(--accent);
}

.legal-grid .full {
    grid-column: 1 / -1;
}

.legal-card {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 20px;
}

.legal-card h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.1rem, 1.7vw, 1.45rem);
    letter-spacing: -0.035em;
}

.legal-copy {
    margin-bottom: 18px;
}

.legal-copy h2 {
    font-size: clamp(1.35rem, 2.4vw, 2.15rem);
}

.legal-copy p {
    max-width: 78ch;
}

.legal-document-plain {
    grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
}

.legal-plain-content {
    padding: 22px clamp(18px, 4vw, 44px);
    border: 3px solid var(--line);
    border-radius: 6px;
    background: var(--wash-2);
    box-shadow: 7px 7px 0 var(--ink);
}

.legal-section {
    padding: 0 0 22px;
    margin: 0 0 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.legal-section:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.legal-section h2 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: clamp(1.25rem, 2vw, 1.85rem);
    letter-spacing: -0.025em;
}

.legal-section p {
    max-width: 82ch;
    margin: 0 0 12px;
    color: var(--soft-ink);
    line-height: 1.75;
}

.legal-card code {
    padding: 2px 6px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.legal-card a {
    color: #ffffff;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.legal-card a.button,
.legal-actions .button {
    color: #050505;
    background: #ffffff;
    text-decoration: none;
}

.legal-card a.button:hover,
.legal-actions .button:hover {
    color: #ffffff;
    background: #050505;
    box-shadow: 4px 4px 0 #ffffff;
}

.legal-card a.button-ghost,
.legal-actions .button-ghost {
    color: #ffffff;
    background: #050505;
    border-color: rgba(255, 255, 255, 0.72);
}

.legal-card a.button-ghost:hover,
.legal-actions .button-ghost:hover {
    color: #050505;
    background: #ffffff;
}

.legal-list {
    display: grid;
    gap: 8px;
    padding-left: 18px;
    color: var(--soft-ink);
    line-height: 1.6;
}

.legal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

@keyframes upload-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 820px) {
    .home {
        grid-template-columns: 1fr;
    }

    .project-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .project-actions {
        justify-content: flex-start;
    }

    .code-block-wrap {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .auth-grid,
    .admin-only,
    .legal-document,
    .legal-grid {
        grid-template-columns: 1fr;
    }

    .legal-toc {
        position: static;
    }

    .media-pick-fields,
    .media-pick-row,
    .project-file-row,
    .project-file-action {
        grid-template-columns: 1fr;
    }

    .project-file-action .button {
        width: fit-content;
    }

    .project-archive-head,
    .project-archive-item {
        grid-template-columns: 1fr;
    }

    .project-archive-close {
        justify-self: start;
    }
}

@media (max-width: 620px) {
    .page-shell {
        width: min(100% - 20px, 1120px);
        padding-top: 10px;
    }

    .profile-tabbar,
    .admin-tabs {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        gap: 8px !important;
        padding-bottom: 8px !important;
        scrollbar-width: none;
    }

    .profile-tabbar::-webkit-scrollbar,
    .admin-tabs::-webkit-scrollbar {
        display: none;
    }

    .profile-tabbar .button,
    .admin-tabs .button {
        flex: 0 0 auto !important;
    }

    .topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    }

    .nav-link {
        padding: 0 8px;
    }

    .support-dock {
        width: calc(100% - 20px);
        padding: 8px;
        flex-wrap: wrap;
        justify-content: center;
        border-radius: 16px;
    }

    h1 {
        font-size: 3.1rem;
    }

    .projects-head h1 {
        font-size: 3.2rem;
    }

    .project-row {
        min-height: 0;
        padding: 18px;
    }

    .privacy-consent-banner {
        grid-template-columns: 1fr;
        align-items: stretch;
        left: max(10px, env(safe-area-inset-left));
        right: max(10px, env(safe-area-inset-right));
        bottom: calc(62px + env(safe-area-inset-bottom));
        width: auto;
        max-height: min(72vh, 520px);
        overflow: auto;
    }

    .privacy-consent-actions .button {
        flex: 1 1 120px;
    }

    .legal-rail {
        left: max(10px, env(safe-area-inset-left));
        right: auto;
        bottom: max(10px, env(safe-area-inset-bottom));
        display: flex;
        max-width: calc(100% - 20px);
        overflow-x: auto;
        border-radius: 999px;
    }

    .legal-rail a {
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Final public UI overrides: plain legal links, centered anonymous support, dark consent notice. */
.legal-rail {
    left: 20px !important;
    right: auto !important;
    bottom: 18px !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 18px !important;
    max-width: calc(100% - 40px) !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.legal-rail a {
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 4px !important;
    white-space: nowrap !important;
}

.legal-rail a:hover,
.legal-rail a:focus-visible {
    background: transparent !important;
    color: #ffffff !important;
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

.support-dock.support-dock-public-only {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    justify-content: center !important;
    width: fit-content !important;
}

.support-dock.support-dock-public-only .button {
    min-width: 150px;
}

.consent-block-notice {
    border-color: #ffffff !important;
    background: #050505 !important;
    color: #ffffff !important;
    box-shadow: 7px 7px 0 #ffffff !important;
}

.consent-block-notice h2,
.consent-block-notice p {
    color: #ffffff !important;
}

.consent-block-notice .button {
    background: #ffffff !important;
    color: #050505 !important;
}

@media (max-width: 620px) {
    .profile-panel-grid {
        grid-template-columns: 1fr;
    }

    .profile-status-row {
        flex-direction: column;
    }

    .legal-rail {
        left: 12px !important;
        bottom: 12px !important;
        gap: 12px !important;
        max-width: calc(100% - 24px) !important;
    }

    .support-dock.support-dock-public-only {
        bottom: 50px !important;
    }

    .news-toggle-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .news-toggle-row input[type="checkbox"] {
        justify-self: start;
    }
}

/* ==========================================================================
   Project Codebase Viewer Styling
   ========================================================================== */
.project-codebase-page {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 46px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.codebase-container {
    display: flex;
    gap: 0;
    background: var(--wash-2);
    border: 3px solid var(--line);
    border-radius: 6px;
    box-shadow: 7px 7px 0 var(--ink);
    min-height: 600px;
    height: 75vh;
    overflow: hidden;
}

.codebase-sidebar {
    width: 25%;
    min-width: 260px;
    border-right: 3px solid var(--line);
    display: flex;
    flex-direction: column;
    background: #1e1e1e; /* matching dark explorer wash */
}

.sidebar-header {
    padding: 12px 16px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.82rem;
    border-bottom: 3px solid var(--line);
    background: var(--ink);
    color: var(--paper);
}

.file-tree {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    font-family: Consolas, Monaco, "Courier New", Courier, monospace;
    font-size: 0.88rem;
    user-select: none;
}

.tree-node {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: #abb2bf; /* standard light-gray code explorer text */
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.tree-node:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.tree-node.active {
    background: var(--ink);
    color: var(--paper) !important;
}

.tree-node.directory {
    font-weight: 700;
    color: #e5c07b; /* folder color */
}

.tree-node.file {
    color: #abb2bf;
}

.tree-node-icon {
    display: inline-block;
    width: 16px;
    text-align: center;
    font-size: 0.95rem;
}

.tree-children {
    margin-left: 4px;
}

.codebase-viewer {
    width: 75%;
    display: flex;
    flex-direction: column;
    background: #1d1f21; /* Prism Tomorrow Dark background */
}

.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 3px solid var(--line);
    background: #151515;
    color: #abb2bf;
    min-height: 52px;
    box-sizing: border-box;
}

.active-file-path {
    font-family: Consolas, Monaco, monospace;
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 12px;
    color: #ffffff;
    font-weight: 700;
}

.code-editor-pane {
    flex: 1;
    overflow: auto;
    background: #1d1f21; /* Tomorrow theme wash */
    position: relative;
}

.code-editor-pane pre {
    margin: 0 !important;
    padding: 20px !important;
    height: 100%;
    box-sizing: border-box;
    background: transparent !important;
    overflow: visible;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.code-editor-pane pre::before,
.code-editor-pane pre::after {
    display: none !important; /* hide default shadow overlays if any */
}

.code-editor-pane code {
    font-family: Consolas, Monaco, "Courier New", Courier, monospace !important;
    font-size: 0.88rem !important;
    line-height: 1.6 !important;
    background: transparent !important;
}

/* ==========================================================================
   Project Codebase Viewer Mobile Media Query
   ========================================================================== */
@media (max-width: 768px) {
    .codebase-container {
        flex-direction: column;
        height: auto;
        min-height: 550px;
    }
    
    .codebase-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 3px solid var(--line);
        height: 220px;
    }
    
    .codebase-viewer {
        width: 100%;
        height: 400px;
    }
}

/* ==========================================================================
   Admin Overhauled Editor Styles
   ========================================================================== */
.editor-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    border-bottom: 3px solid var(--line);
    padding-bottom: 12px;
}

.editor-tabs .tab-btn {
    background: var(--paper);
    color: var(--ink);
    border: 2px solid var(--line);
    border-radius: 4px;
    padding: 8px 14px;
    font-weight: 800;
    font-size: 0.84rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.editor-tabs .tab-btn:hover {
    background: var(--shade);
}

.editor-tabs .tab-btn.active {
    background: var(--ink);
    color: var(--paper);
    transform: translateY(-2px);
    box-shadow: 3px 3px 0 var(--line);
}

.character-counter {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--soft-ink);
    opacity: 0.85;
}

.media-pick-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.media-preview-card {
    position: relative;
    background: var(--wash-2);
    border: 2px solid var(--line);
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 4px 4px 0 var(--ink);
}

.media-preview-card-thumb {
    width: 100%;
    height: 120px;
    background: #121212;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.media-preview-card-thumb img,
.media-preview-card-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-preview-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.media-preview-card-info strong {
    font-size: 0.88rem;
    color: var(--ink);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.media-preview-card-info span {
    font-size: 0.78rem;
    color: var(--soft-ink);
}

.media-preview-card-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.media-preview-card-inputs label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--soft-ink);
}

.media-preview-card-inputs input {
    font-size: 0.82rem;
    padding: 4px 8px !important;
    min-height: 28px !important;
}

.media-preview-card-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    background: var(--paper);
    color: #e06c75;
    border: 2px solid #e06c75;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    font-weight: 900;
    box-shadow: 2px 2px 0 rgba(224, 108, 117, 0.3);
    transition: transform 0.1s ease;
}

.media-preview-card-remove:hover {
    transform: scale(1.1);
    background: #e06c75;
    color: var(--paper);
}

.project-links-edit-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    background: var(--wash-2);
    border: 2px solid var(--line);
    border-radius: 6px;
    padding: 8px 12px;
    box-shadow: 3px 3px 0 var(--ink);
}

.project-links-edit-row input {
    flex: 1;
    margin: 0 !important;
    font-size: 0.86rem !important;
    min-height: 32px !important;
}

.project-links-edit-row .delete-cross {
    color: #e06c75;
    border-color: rgba(224, 108, 117, 0.25);
    min-height: 32px !important;
    padding: 0 10px !important;
    font-size: 1.1rem;
    font-weight: 800;
}

.live-preview-box {
    background: var(--paper);
    border: 3px dashed var(--line);
    border-radius: 6px;
    padding: 20px;
    min-height: 250px;
    max-height: 550px;
    overflow-y: auto;
}

/* Status-colored card side-borders */
.admin-project-card.project-status-draft,
.news-item.post-status-draft {
    border-left: 6px solid #e5c07b !important;
}

.admin-project-card.project-status-published,
.news-item.post-status-published {
    border-left: 6px solid #98c379 !important;
}

/* Center single form auth container */
.auth-single-container {
    max-width: 650px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

/* Premium auth forms styling adjustments */
.auth-single-container .panel-form {
    padding: 38px 45px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.auth-single-container .panel-form h2 {
    font-size: 1.85rem;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--line);
    padding-bottom: 12px;
}

.auth-single-container .panel-form .field {
    gap: 6px;
}

.auth-single-container .panel-form .field input {
    padding: 13px 16px;
    font-size: 1.02rem;
    border-radius: 6px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-single-container .panel-form .field input:focus {
    border-color: var(--accent, #98c379);
    outline: none;
    box-shadow: 0 0 0 3px rgba(152, 195, 121, 0.15);
}

.auth-single-container .panel-form .button-primary {
    padding: 13px 20px;
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 8px;
    cursor: pointer;
    box-shadow: 5px 5px 0 var(--ink);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.auth-single-container .panel-form .button-primary:active {
    transform: translate(3px, 3px);
    box-shadow: 2px 2px 0 var(--ink);
}

.auth-single-container .panel-form .auth-switch {
    margin-top: 12px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--soft-ink);
}

.auth-single-container .panel-form .auth-switch a {
    color: var(--ink);
    font-weight: 700;
    text-decoration: underline;
}

.disabled-download-btn {
    opacity: 0.7;
    cursor: not-allowed !important;
    position: relative;
}

/* ==========================================================================
   Admin CMS refresh
   ========================================================================== */
.admin-cms {
    display: grid;
    gap: 20px;
}

.admin-hero {
    position: relative;
    overflow: hidden;
}

.admin-hero::after {
    content: "";
    position: absolute;
    inset: auto -40px -50px auto;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(229, 192, 123, 0.4), transparent 70%);
    pointer-events: none;
}

.admin-module {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(244, 236, 214, 0.92));
    border: 3px solid var(--line);
    box-shadow: 9px 9px 0 var(--ink);
    border-radius: 10px;
    overflow: hidden;
}

.admin-module-shell {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    min-height: 100%;
}

.admin-module-sidebar {
    background: linear-gradient(180deg, #161616, #222222);
    color: var(--paper);
    padding: 24px;
    display: grid;
    gap: 18px;
    border-right: 3px solid var(--line);
}

.admin-module-sidebar .card-label,
.admin-module-sidebar h2,
.admin-module-sidebar p {
    color: inherit;
}

.admin-module-intro h2 {
    margin-bottom: 10px;
}

.admin-stats-stack {
    display: grid;
    gap: 12px;
}

.admin-metric-card {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    padding: 14px 16px;
    display: grid;
    gap: 6px;
}

.admin-metric-card span {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.8;
}

.admin-metric-card strong {
    font-size: 1.7rem;
    line-height: 1;
}

.admin-module-actions {
    display: grid;
    gap: 10px;
}

.admin-module-main {
    display: grid;
    gap: 18px;
    padding: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(247, 240, 224, 0.96)),
        radial-gradient(circle at top right, rgba(152, 195, 121, 0.15), transparent 32%);
}

.admin-overview-card,
.admin-editor-form {
    margin: 0;
}

.admin-overview-card {
    background: rgba(255, 255, 255, 0.82);
    border: 2px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    box-shadow: 4px 4px 0 rgba(22, 22, 22, 0.12);
}

.admin-overview-head,
.admin-editor-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.admin-filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-filter-pills .button.is-active {
    background: var(--ink);
    color: var(--paper);
}

.admin-toolbar-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.admin-toolbar-row input {
    flex: 1 1 240px;
}

.admin-news-list,
.admin-project-grid,
.admin-update-list {
    display: grid;
    gap: 14px;
}

.admin-news-card,
.admin-project-card-v2,
.admin-update-card {
    background: var(--paper);
    border: 2px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 4px 4px 0 rgba(22, 22, 22, 0.1);
}

.admin-news-card h4,
.admin-project-card-v2 h4,
.admin-update-card h4 {
    margin-bottom: 8px;
}

.admin-card-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    color: var(--soft-ink);
    font-size: 0.84rem;
    margin-bottom: 10px;
}

.admin-card-snippet {
    color: var(--soft-ink);
    margin-bottom: 12px;
}

.admin-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-editor-form {
    padding: 22px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--line);
    border-radius: 8px;
    box-shadow: 4px 4px 0 rgba(22, 22, 22, 0.12);
}

.admin-sticky-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: sticky;
    top: 8px;
    z-index: 2;
}

.admin-editor-grid {
    display: grid;
    gap: 14px;
}

.admin-editor-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-editor-grid.three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.label-split {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.admin-inline-note {
    min-height: 42px;
    padding: 10px 12px;
    border: 2px dashed var(--line);
    border-radius: 6px;
    background: rgba(245, 229, 193, 0.5);
    color: var(--soft-ink);
}

.admin-checkbox-card {
    align-self: end;
    min-height: 44px;
    padding: 10px 12px;
    border: 2px solid var(--line);
    border-radius: 6px;
    background: rgba(244, 236, 214, 0.85);
}

.admin-inline-actions {
    align-self: end;
    justify-content: flex-end;
}

.admin-revision-board {
    min-height: 120px;
    padding: 14px;
    border: 2px solid var(--line);
    border-radius: 8px;
    background: rgba(249, 244, 233, 0.9);
}

.admin-codebase-grid {
    display: grid;
    gap: 12px;
}

.admin-codebase-row {
    display: grid;
    grid-template-columns: minmax(110px, 130px) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.admin-codebase-actions {
    display: flex;
    justify-content: flex-end;
}

.admin-update-card.is-draft,
.admin-project-card-v2.is-draft,
.admin-news-card.is-draft {
    border-left: 6px solid #e5c07b;
}

.admin-update-card.is-published,
.admin-project-card-v2.is-published,
.admin-news-card.is-published {
    border-left: 6px solid #98c379;
}

.admin-update-card p:last-child,
.admin-project-card-v2 p:last-child,
.admin-news-card p:last-child {
    margin-bottom: 0;
}

.admin-project-grid .text-link,
.admin-news-list .text-link {
    font-weight: 700;
}

.admin-project-card-v2.is-editing {
    outline: 3px solid rgba(152, 195, 121, 0.5);
    outline-offset: 2px;
}

@media (max-width: 980px) {
    .admin-module-shell {
        grid-template-columns: 1fr;
    }

    .admin-module-sidebar {
        border-right: 0;
        border-bottom: 3px solid var(--line);
    }

    .admin-editor-grid.two-col,
    .admin-editor-grid.three-col,
    .admin-codebase-row {
        grid-template-columns: 1fr;
    }
}

.project-update-timeline {
    margin-top: 22px;
    display: grid;
    gap: 14px;
}

.project-update-list-public {
    display: grid;
    gap: 12px;
}

.project-update-item {
    background: rgba(244, 236, 214, 0.78);
    border: 2px solid var(--line);
    border-radius: 8px;
    padding: 14px 16px;
}

.project-update-item time {
    display: block;
    margin-bottom: 6px;
    color: var(--soft-ink);
    font-size: 0.84rem;
}

.project-update-item h4 {
    margin-bottom: 6px;
}

.project-update-summary {
    color: var(--soft-ink);
    font-weight: 700;
}

/* ==========================================================================
   Admin CMS repair pass
   ========================================================================== */
.page-admin .page-shell {
    width: min(1440px, calc(100% - 32px));
}

.page-admin .news-page {
    gap: 18px;
}

.page-admin .news-hero {
    padding-bottom: 0;
}

.page-admin .news-hero h1 {
    max-width: none;
    font-size: clamp(2.7rem, 6vw, 5.4rem);
}

.admin-hero::after {
    display: none;
}

.admin-cms {
    --admin-surface: #090909;
    --admin-panel: #0f0f0f;
    --admin-panel-2: #151515;
    --admin-muted: #b8b8b8;
    --admin-border: rgba(255, 255, 255, 0.22);
    --admin-border-strong: rgba(255, 255, 255, 0.72);
    --admin-green: #8fd16a;
    --admin-amber: #e7c46f;
    --admin-red: #f17a7a;
    gap: 18px;
}

.admin-cms .admin-tabs {
    position: sticky;
    top: 12px;
    z-index: 20;
    border: 1px solid var(--admin-border-strong);
    background: rgba(5, 5, 5, 0.92);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(14px);
}

.admin-module {
    overflow: hidden;
    border: 1px solid var(--admin-border-strong);
    border-radius: 8px;
    background: var(--admin-surface);
    box-shadow: 0 18px 70px rgba(0, 0, 0, 0.42);
}

.admin-module-shell {
    grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
}

.admin-module-sidebar {
    align-content: start;
    gap: 18px;
    padding: 20px;
    border-right: 1px solid var(--admin-border);
    background: #050505;
    color: var(--ink);
}

.admin-module-sidebar .card-label {
    background: var(--ink);
    color: var(--paper);
}

.admin-module-sidebar h2 {
    margin: 0;
    font-size: 1.35rem;
    text-transform: uppercase;
}

.admin-module-sidebar p {
    color: var(--admin-muted);
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.45;
}

.admin-stats-stack {
    gap: 8px;
}

.admin-metric-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 12px;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    background: var(--admin-panel);
}

.admin-metric-card span {
    color: var(--admin-muted);
    font-size: 0.74rem;
    letter-spacing: 0;
}

.admin-metric-card strong {
    font-size: 1.35rem;
}

.admin-module-actions .button {
    width: 100%;
}

.admin-module-main {
    gap: 16px;
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 180px),
        #080808;
}

.admin-overview-card,
.admin-editor-form {
    position: relative;
    margin: 0;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-panel);
    box-shadow: none;
}

.admin-overview-card::before,
.admin-editor-form::before {
    display: none;
}

.admin-overview-card {
    padding: 16px;
}

.admin-editor-form {
    gap: 18px;
    padding: 18px;
}

.admin-overview-card h3,
.admin-editor-form h3 {
    color: var(--ink);
    font-size: 1.2rem;
    text-transform: uppercase;
}

.admin-overview-head,
.admin-editor-header {
    align-items: center;
    margin-bottom: 14px;
}

.admin-filter-pills {
    gap: 6px;
}

.admin-filter-pills .button,
.admin-toolbar-row .button,
.admin-card-actions .button,
.editor-tools .button {
    min-height: 34px;
    padding: 0 11px;
    border-color: var(--admin-border-strong);
    font-size: 0.82rem;
}

.admin-filter-pills .button.is-active {
    background: var(--ink);
    color: var(--paper);
}

.admin-toolbar-row {
    gap: 8px;
    margin-bottom: 14px;
}

.admin-toolbar-row input,
.admin-editor-form .field input,
.admin-editor-form .field textarea,
.admin-editor-form .field select {
    border: 1px solid var(--admin-border-strong);
    background: #050505;
    color: var(--ink);
    box-shadow: none;
}

.admin-editor-form .field input:focus,
.admin-editor-form .field textarea:focus,
.admin-editor-form .field select:focus,
.admin-toolbar-row input:focus {
    outline: 2px solid rgba(255, 255, 255, 0.28);
    outline-offset: 2px;
}

.admin-news-list,
.admin-project-grid,
.admin-update-list {
    gap: 10px;
}

.admin-news-card,
.admin-project-card-v2,
.admin-update-card {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--admin-border);
    border-left: 4px solid var(--admin-border-strong);
    border-radius: 6px;
    background: var(--admin-panel-2);
    box-shadow: none;
}

.admin-news-card.is-published,
.admin-project-card-v2.is-published,
.admin-update-card.is-published {
    border-left-color: var(--admin-green);
}

.admin-news-card.is-draft,
.admin-project-card-v2.is-draft,
.admin-update-card.is-draft {
    border-left-color: var(--admin-amber);
}

.admin-card-topline,
.admin-card-title-row,
.admin-card-meta,
.admin-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-card-topline {
    justify-content: space-between;
    color: var(--admin-muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-card-title-row {
    justify-content: space-between;
}

.admin-news-card h4,
.admin-project-card-v2 h4,
.admin-update-card h4 {
    margin: 0;
    color: var(--ink);
    font-size: 1.08rem;
    line-height: 1.2;
}

.admin-card-meta {
    margin: 0;
    color: var(--admin-muted);
    font-size: 0.8rem;
    font-weight: 900;
}

.admin-card-meta span,
.admin-count-pill {
    padding: 4px 7px;
    border: 1px solid var(--admin-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.admin-card-snippet {
    margin: 0;
    color: var(--admin-muted);
    font-size: 0.94rem;
    line-height: 1.45;
}

.admin-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-status-badge.is-published {
    color: var(--admin-green);
}

.admin-status-badge.is-draft {
    color: var(--admin-amber);
}

.admin-card-actions {
    padding-top: 2px;
}

.admin-card-actions .button-primary {
    min-width: 78px;
}

.admin-card-actions .danger {
    color: var(--admin-red);
    border-color: rgba(241, 122, 122, 0.72);
}

.admin-card-actions .danger:hover {
    background: var(--admin-red);
    color: #050505;
}

.admin-project-card-v2.is-editing {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
    background: #1b1b1b;
}

.admin-sticky-actions {
    top: 76px;
    padding: 6px;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    background: rgba(8, 8, 8, 0.92);
    backdrop-filter: blur(12px);
}

.editor-tabs {
    gap: 6px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--admin-border);
}

.editor-tabs .tab-btn {
    min-height: 34px;
    border: 1px solid var(--admin-border-strong);
    background: #050505;
    color: var(--ink);
    box-shadow: none;
}

.editor-tabs .tab-btn.active {
    background: var(--ink);
    color: var(--paper);
    box-shadow: none;
    transform: none;
}

.admin-inline-note,
.admin-checkbox-card,
.admin-revision-board {
    border: 1px solid var(--admin-border);
    background: #050505;
    color: var(--admin-muted);
}

.admin-checkbox-card {
    align-self: stretch;
}

.admin-codebase-row,
.project-links-edit-row,
.translation-card,
.project-file-row,
.block-chip {
    border: 1px solid var(--admin-border);
    background: #050505;
    box-shadow: none;
}

.live-preview-box,
.media-preview-card {
    border: 1px solid var(--admin-border);
    background: #050505;
    box-shadow: none;
}

.project-update-item {
    background: #0f0f0f;
    border: 1px solid var(--admin-border);
}

@media (max-width: 980px) {
    .admin-module-shell {
        grid-template-columns: 1fr;
    }

    .admin-module-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--admin-border);
    }

    .admin-stats-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .page-admin .page-shell {
        width: min(100% - 20px, 1440px);
    }

    .admin-module-main,
    .admin-module-sidebar,
    .admin-editor-form,
    .admin-overview-card {
        padding: 14px;
    }

    .admin-stats-stack,
    .admin-editor-grid.two-col,
    .admin-editor-grid.three-col,
    .admin-codebase-row {
        grid-template-columns: 1fr;
    }

    .admin-sticky-actions {
        position: static;
        width: 100%;
    }
}

/* Admin screenshot fix: keep the CMS workspace full-width and readable. */
.page-admin .admin-only.admin-cms {
    grid-template-columns: 1fr;
    align-items: stretch;
}

.page-admin .admin-module,
.page-admin .admin-wide,
.page-admin [data-admin-panel="users"],
.page-admin [data-admin-panel="support"],
.page-admin [data-admin-panel="emails"] {
    grid-column: 1 / -1;
    width: 100%;
}

.page-admin .admin-module-shell {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
}

.page-admin .admin-module-main {
    grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
    align-items: start;
}

.page-admin .admin-overview-card {
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 108px);
    overflow: auto;
}

.page-admin .admin-editor-form {
    min-width: 0;
}

.page-admin .admin-news-card,
.page-admin .admin-project-card-v2 {
    min-width: 0;
}

.page-admin .admin-card-snippet {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.page-admin .admin-project-card-v2.is-editing {
    border-color: #ffffff;
}

.page-admin .admin-card-actions .button {
    flex: 0 0 auto;
}

.page-admin .admin-editor-form .editor-panel {
    min-width: 0;
}

.page-admin .admin-editor-form textarea {
    min-height: 160px;
}

@media (max-width: 1180px) {
    .page-admin .admin-module-shell,
    .page-admin .admin-module-main {
        grid-template-columns: 1fr;
    }

    .page-admin .admin-module-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--admin-border);
    }

    .page-admin .admin-overview-card {
        position: static;
        max-height: none;
    }
}

/* Project category and admin overlap hardening. */
.project-category-board {
    display: grid;
    gap: 18px;
}

.project-category {
    display: grid;
    overflow: hidden;
    border: 3px solid var(--line);
    border-radius: 8px;
    background: var(--wash-2);
    box-shadow: 6px 6px 0 var(--ink);
}

.project-category.is-subcategory {
    margin-left: clamp(0px, 3vw, 26px);
    border-width: 2px;
    box-shadow: none;
}

.project-category-toggle {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    padding: 12px 14px;
    border: 0;
    border-bottom: 2px solid var(--line);
    background: var(--ink);
    color: var(--paper);
    font: inherit;
    font-weight: 900;
    text-align: left;
    cursor: pointer;
}

.project-category-toggle[aria-expanded="false"] {
    border-bottom: 0;
}

.project-category-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 2px solid currentColor;
    border-radius: 999px;
    line-height: 1;
}

.project-category-name {
    min-width: 0;
    overflow-wrap: anywhere;
    text-transform: uppercase;
}

.project-category-count {
    justify-self: end;
    padding: 4px 8px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.project-category-body {
    display: grid;
    gap: 14px;
    padding: 14px;
}

.project-category-body[hidden] {
    display: none;
}

.project-category-projects {
    display: grid;
    gap: 16px;
}

.project-category .project-row {
    margin: 0;
    box-shadow: none;
}

.project-update-timeline {
    clear: both;
}

.project-update-head {
    display: grid;
    align-items: start;
    gap: 8px;
}

.project-update-head .card-label {
    position: static;
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    margin: 0;
    line-height: 1;
}

.project-update-head h3 {
    margin: 0;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.page-admin .button,
.page-admin .tab-btn,
.page-admin .nav-link {
    min-width: 0;
    white-space: normal;
    line-height: 1.15;
    text-align: center;
}

.page-admin .admin-card-topline > *,
.page-admin .admin-card-title-row > *,
.page-admin .admin-card-meta > *,
.page-admin .admin-card-actions > *,
.page-admin .editor-tools > *,
.page-admin .toast-actions > * {
    min-width: 0;
    overflow-wrap: anywhere;
}

.page-admin .admin-card-actions .button,
.page-admin .editor-tools .button,
.page-admin .toast-actions .button {
    flex: 0 1 auto;
}

.page-admin .admin-editor-grid > *,
.page-admin .field,
.page-admin input,
.page-admin select,
.page-admin textarea {
    min-width: 0;
    max-width: 100%;
}

.admin-category-manager {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #050505;
}

.admin-category-head h4 {
    margin: 6px 0 2px;
    color: var(--ink);
    text-transform: uppercase;
}

.admin-category-form {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(90px, 0.45fr);
    gap: 10px;
    align-items: end;
}

.admin-category-actions {
    align-self: end;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-category-list {
    display: grid;
    gap: 8px;
}

.admin-category-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    background: var(--admin-panel-2);
}

.admin-category-row[data-depth="1"] {
    margin-left: 12px;
}

.admin-category-row[data-depth="2"],
.admin-category-row[data-depth="3"],
.admin-category-row[data-depth="4"] {
    margin-left: 24px;
}

.admin-category-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.admin-category-copy strong {
    overflow-wrap: anywhere;
    color: var(--ink);
    line-height: 1.2;
}

.admin-category-copy span {
    color: var(--admin-muted);
    font-size: 0.8rem;
    font-weight: 800;
}

.admin-category-row-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

@media (max-width: 720px) {
    .project-category-toggle {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .project-category-count {
        grid-column: 2;
        justify-self: start;
    }

    .project-category.is-subcategory,
    .admin-category-row[data-depth] {
        margin-left: 0;
    }

    .admin-category-form,
    .admin-category-row {
        grid-template-columns: 1fr;
    }

    .admin-category-row-actions {
        justify-content: flex-start;
    }
}

/* ==========================================================================
   CMS 2.0 no-overlap safety layer and public refresh
   ========================================================================== */
.page-admin .card-label {
    position: static !important;
    display: inline-flex !important;
    align-items: center;
    width: max-content;
    max-width: 100%;
    min-height: 0;
    margin: 0 0 8px;
    line-height: 1.1;
    white-space: normal;
    overflow-wrap: anywhere;
}

.page-admin h1,
.page-admin h2,
.page-admin h3,
.page-admin h4,
.page-admin p,
.page-admin label,
.page-admin span,
.page-admin strong,
.page-admin button,
.page-admin a {
    min-width: 0;
    overflow-wrap: anywhere;
}

.page-admin .admin-module-intro,
.page-admin .admin-overview-head > div:first-child,
.page-admin .admin-editor-header > div:first-child,
.page-admin .admin-category-head > div {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
}

.page-admin .admin-module-shell {
    grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
}

.page-admin .admin-module-main {
    grid-template-columns: minmax(420px, 520px) minmax(620px, 1fr);
    gap: 20px;
    min-width: 0;
}

.page-admin .admin-overview-card {
    position: static;
    max-height: none;
    overflow: visible;
}

.page-admin .admin-editor-form {
    display: grid;
    min-width: 0;
}

.page-admin .admin-overview-head,
.page-admin .admin-editor-header,
.page-admin .admin-filter-pills,
.page-admin .editor-tabs,
.page-admin .editor-tools,
.page-admin .admin-sticky-actions,
.page-admin .toast-actions,
.page-admin .admin-card-actions,
.page-admin .admin-card-meta {
    flex-wrap: wrap;
}

.page-admin .admin-sticky-actions .button,
.page-admin .admin-card-actions .button,
.page-admin .editor-tools .button,
.page-admin .toast-actions .button {
    flex: 1 1 128px;
    min-height: 38px;
}

.page-admin .admin-editor-grid.two-col,
.page-admin .admin-editor-grid.three-col,
.page-admin .admin-category-form {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.page-admin .checkbox-row,
.page-admin .admin-checkbox-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    white-space: normal;
    text-align: left;
}

.page-admin .admin-dirty-pill {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    padding: 5px 9px;
    border: 1px solid var(--admin-amber);
    border-radius: 999px;
    color: var(--admin-amber);
    background: rgba(231, 196, 111, 0.1);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
}

.page-admin .admin-dirty-pill[hidden] {
    display: none !important;
}

.admin-status-badge.is-scheduled,
.admin-news-card.is-scheduled {
    border-left-color: #74b9ff;
}

.admin-status-badge.is-scheduled {
    color: #74b9ff;
}

.drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 32px;
    padding: 0 8px;
    border: 1px solid var(--admin-border-strong, currentColor);
    border-radius: 999px;
    background: #050505;
    color: var(--ink);
    cursor: grab;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.drag-handle:active {
    cursor: grabbing;
}

.is-dragging-ghost {
    opacity: 0.55;
}

.is-dragging-chosen {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.block-chip {
    grid-template-columns: minmax(70px, max-content) minmax(0, 1fr) auto;
    align-items: center;
}

.block-chip.is-draggable {
    grid-template-columns: auto minmax(70px, max-content) minmax(0, 1fr) auto;
}

.block-chip > * {
    min-width: 0;
}

.block-chip span,
.block-chip strong {
    overflow-wrap: anywhere;
}

.admin-category-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.admin-category-row-actions {
    min-width: 0;
}

.admin-category-row-actions .button {
    flex: 1 1 84px;
}

@media (max-width: 1500px) {
    .page-admin .admin-module-main {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1050px) {
    .page-admin .admin-module-shell {
        grid-template-columns: 1fr;
    }

    .page-admin .admin-module-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--admin-border);
    }
}

@media (max-width: 720px) {
    .page-admin .admin-card-actions .button,
    .page-admin .editor-tools .button,
    .page-admin .toast-actions .button,
    .page-admin .admin-sticky-actions .button {
        flex: 1 1 100%;
    }

    .block-chip,
    .block-chip.is-draggable,
    .admin-category-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .drag-handle {
        width: 100%;
    }
}

.public-featured-pill {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    padding: 4px 8px;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--accent);
    color: #050505;
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.project-public-tools {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 0.75fr) auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    border: 3px solid var(--line);
    border-radius: 8px;
    background: var(--wash-2);
    box-shadow: 6px 6px 0 var(--ink);
}

.project-public-tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-featured-card,
.public-news-featured {
    display: grid;
    gap: 12px;
    padding: clamp(18px, 3vw, 28px);
    border: 3px solid var(--line);
    border-radius: 10px;
    background:
        radial-gradient(circle at top right, rgba(229, 192, 123, 0.24), transparent 42%),
        var(--wash-2);
    box-shadow: 8px 8px 0 var(--ink);
}

.project-featured-card h2,
.public-news-featured h3 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 3.2rem);
    line-height: 1;
    text-transform: uppercase;
}

.public-card-meta,
.news-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.public-card-meta span,
.news-tag-list span {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 0 8px;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: var(--soft-ink);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.public-card-meta time {
    color: var(--soft-ink);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.public-card-summary {
    color: var(--soft-ink);
    font-weight: 800;
    line-height: 1.6;
}

.public-news-board {
    display: grid;
    gap: 18px;
}

.public-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 16px;
}

.public-news-card {
    align-content: start;
}

.project-row {
    grid-template-columns: minmax(0, 1fr) minmax(min(100%, 340px), auto);
}

.project-extra {
    min-width: 0;
    width: 100%;
}

.project-actions,
.project-downloads,
.project-extra .project-actions {
    justify-content: flex-start;
    justify-items: stretch;
}

.content-hero-block,
.content-callout,
.content-download-card,
.content-faq,
.content-update-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 2px solid var(--line);
    border-radius: 8px;
    background: var(--wash);
    color: var(--ink);
}

.content-hero-block {
    padding: clamp(18px, 3vw, 26px);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent),
        var(--wash-2);
}

.content-hero-block h2,
.content-update-card h3 {
    margin: 0;
    line-height: 1.05;
    text-transform: uppercase;
}

.content-callout {
    border-left-width: 8px;
}

.content-callout.is-warning {
    border-left-color: #e7c46f;
}

.content-callout.is-info {
    border-left-color: #8fd16a;
}

.content-callout p,
.content-faq p,
.content-update-card p {
    margin: 0;
}

.content-download-card {
    text-decoration: none;
}

.content-download-card:hover {
    background: var(--ink);
    color: var(--paper);
}

.content-faq summary {
    cursor: pointer;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.content-update-card time {
    color: var(--soft-ink);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.content-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 12px;
}

@media (max-width: 820px) {
    .project-public-tools,
    .project-row {
        grid-template-columns: 1fr;
    }

    .project-public-tool-actions .button {
        flex: 1 1 120px;
    }
}

/* Public project action layout repair: keep downloads, links, code, and admin controls from colliding. */
.project-row {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr) minmax(min(100%, 280px), 360px);
}

.project-extra {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    align-content: start;
    align-items: stretch;
    justify-items: stretch;
    gap: 12px;
    min-width: 0;
    width: 100%;
}

.project-action-panel {
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 0;
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.project-action-label {
    width: max-content;
    max-width: 100%;
    padding: 3px 7px;
    border-radius: 4px;
    background: var(--ink);
    color: var(--paper);
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.project-action-panel .project-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
    justify-content: stretch;
    justify-items: stretch;
    gap: 8px;
    min-width: 0;
}

.project-action-panel .button,
.project-file-action .button {
    width: 100%;
    min-width: 0;
    text-align: center;
    white-space: normal;
}

.project-downloads {
    justify-items: stretch;
    width: 100%;
}

.project-downloads .project-file-action {
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 7px;
    min-width: 0;
    margin-top: 0;
}

.project-downloads .project-file-action span,
.project-file-action span {
    max-width: 100%;
    text-align: left;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.project-action-panel.code-block-wrap {
    min-width: 0;
    max-width: none;
    padding: 12px;
    background: rgba(255, 255, 255, 0.035);
    border-width: 1px;
    box-shadow: none;
}

.project-action-panel .code-block {
    max-height: 190px;
    padding-right: 0;
    overflow: auto;
    overflow-wrap: anywhere;
}

.project-action-panel.code-block-wrap .copy-btn {
    position: static;
    justify-self: stretch;
    margin-top: 0;
}

.project-update-toggle.project-action-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    justify-content: stretch;
    max-width: none;
    text-align: left;
}

.project-admin-actions.project-action-panel {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 92px), 1fr));
}

.project-admin-actions .project-action-label {
    grid-column: 1 / -1;
}

@media (max-width: 980px) {
    .project-row {
        grid-template-columns: 1fr;
    }
}

/* Admin CMS scroll and preview polish: manage/editor panels stay contained. */
.page-admin .admin-module-main {
    min-height: 0;
    max-height: calc(100vh - 124px);
    overflow: hidden;
}

.page-admin .admin-overview-card,
.page-admin .admin-editor-form {
    min-height: 0;
    max-height: calc(100vh - 148px);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.page-admin .admin-news-list,
.page-admin .admin-project-grid,
.page-admin .admin-update-list,
.page-admin .admin-category-list,
.page-admin .block-list {
    min-height: 0;
}

.admin-live-preview {
    min-width: 0;
}

.admin-live-preview-detail {
    margin-top: 16px;
}

.admin-preview-media-note,
.admin-preview-seo {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--admin-border, rgba(255, 255, 255, 0.2));
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.admin-preview-media-note {
    display: flex;
    flex-wrap: wrap;
}

.admin-preview-media-note span,
.admin-asset-pill {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    padding: 4px 8px;
    border: 1px solid var(--admin-border, rgba(255, 255, 255, 0.2));
    border-radius: 999px;
    color: var(--soft-ink);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.admin-preview-seo strong,
.admin-preview-seo p {
    margin: 0;
    overflow-wrap: anywhere;
}

.admin-asset-card {
    grid-template-columns: minmax(0, 1fr) minmax(180px, auto) auto;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
}

.admin-asset-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-self: center;
}

.admin-asset-actions .button {
    width: 100%;
    white-space: normal;
    text-align: center;
}

.admin-asset-card .delete-cross {
    align-self: center;
}

.live-preview-box .project-row,
.live-preview-box .project-detail-card,
.live-preview-box .news-item {
    box-shadow: none;
}

.live-preview-box .project-row::before,
.live-preview-box .news-item::before {
    display: none;
}

@media (max-width: 1180px) {
    .page-admin .admin-module-main {
        max-height: none;
        overflow: visible;
    }

    .page-admin .admin-overview-card,
    .page-admin .admin-editor-form {
        max-height: min(78vh, 820px);
    }
}

@media (max-width: 720px) {
    .admin-asset-card,
    .admin-asset-actions {
        grid-template-columns: 1fr;
    }
}

/* Public project card alignment repair: keep labels, titles, and meta grouped together. */
.project-copy {
    align-content: start;
    align-self: start;
    grid-auto-rows: max-content;
}

.project-copy .card-label,
.project-copy .public-featured-pill,
.project-copy .project-meta {
    align-self: start;
}

.project-copy h2,
.project-copy p,
.project-copy .project-read-more,
.project-copy .project-meta {
    margin-top: 0;
}

.project-meta {
    max-width: 100%;
    flex-wrap: wrap;
    overflow-wrap: anywhere;
}

.project-featured-admin-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
    gap: 10px;
    margin-top: 4px;
}

.project-featured-admin-actions .button {
    width: 100%;
}

