/* Project presentation only. Geometry still comes from grid.css; saved block
   proportions and editorial spacing remain Gutenberg's responsibility. */
.cosma-project {
    --cosma-content-width: var(--cosma-editorial-width);
    --cosma-inset: var(--cosma-editorial-inset);
    inline-size: var(--cosma-editorial-width);
    padding-block-start: 1rem;
}
.cosma-project .cosma-project-categories {
    gap: 0.25rem 0.4em;
    margin-block-end: 1.5rem;
    font-size: var(--wp--custom--project--category-size);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.cosma-project-categories li:not(:last-child)::after { content: ","; }
.cosma-project-categories li { display: inline-flex; align-items: baseline; min-inline-size: 0; }
.cosma-project-categories a { text-decoration: none; }
.cosma-project-categories a:hover { text-decoration: underline; }
.cosma-project-categories .is-active { font-weight: 900; }
.cosma-project-categories .is-inactive { color: #666; }
.cosma-project .cosma-project-header {
    grid-template-columns: repeat(16, minmax(0, 1fr));
    margin-block-end: var(--cosma-unit);
}
.cosma-project .cosma-project-header > :first-child { grid-column: 1 / 13; }
.cosma-project .cosma-project-header--no-logo > :first-child { grid-column: 1 / -1; }
.cosma-project .cosma-project-logo {
    grid-column: 13 / 17;
    align-self: end;
    justify-self: end;
    inline-size: 100%;
    max-inline-size: 15rem;
}
.cosma-project .cosma-logo-image {
    display: block;
    max-inline-size: 100%;
    max-block-size: 10rem;
    inline-size: 100%;
    block-size: auto;
}
.cosma-project h1 {
    font-size: var(--wp--custom--project--title-size);
    line-height: 1.1;
    margin-block-end: 0.75rem;
    overflow-wrap: anywhere;
}
.cosma-project .cosma-project-subtitle {
    font-size: var(--wp--custom--project--lead-size);
    line-height: 1.143;
}
.cosma-project .cosma-content {
    font-size: var(--wp--custom--project--body-size);
    line-height: 1.5;
}
.cosma-project .cosma-content :where(h2, h3, h4) {
    line-height: 1.2;
}
.cosma-project .cosma-content figcaption {
    font-size: var(--wp--custom--project--caption-size);
    line-height: 1.5;
    margin: 0.75rem 0 0;
    padding: 0;
    float: none;
}
@media (width < 782px) {
    .cosma-project .cosma-project-header { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
    .cosma-project .cosma-project-header > :first-child,
    .cosma-project .cosma-project-logo { grid-column: 1 / -1; }
    .cosma-project .cosma-project-logo { justify-self: start; }
    .cosma-project .cosma-logo-image { max-inline-size: 12rem; max-block-size: 8rem; }
    .cosma-project h1 { line-height: 1.2; }
    .cosma-project .cosma-project-categories { margin-block-end: 1rem; }
    .cosma-project .cosma-project-header { margin-block-end: clamp(2rem, var(--cosma-unit), 4rem); }
}

/* Related cards begin on the first grid line; retain the right-column stagger. */
.cosma-related-projects .cosma-project-grid { padding-block-start: 0; }
