/*
 * Gigabyte Grove Projects
 *
 * Hero markup and presentation are owned entirely by the Gigabyte Grove theme.
 * This stylesheet begins below the locked hero.
 */

.ggp-projects-page,
.ggp-single-project,
.ggp-single-update,
.ggp-project-main,
.ggp-project-sidebar {
    min-width: 0;
}

/* -------------------------------------------------------------------------
 * Project library — 9/3 directory + GitHub rail
 * ---------------------------------------------------------------------- */

.ggp-library {
    --ggp-accent: #e2b52b;
    --ggp-accent-soft: color-mix(in srgb, var(--ggp-accent) 11%, transparent);
    --ggp-line: color-mix(in srgb, currentColor 14%, transparent);
    --ggp-line-strong: color-mix(in srgb, currentColor 22%, transparent);
    --ggp-muted: color-mix(in srgb, currentColor 68%, transparent);
    overflow: clip;
}

.ggp-library-toolbar {
    position: sticky;
    top: 74px;
    z-index: 8;
    display: grid;
    grid-template-columns: minmax(260px, 1.15fr) minmax(0, 1.4fr) auto;
    align-items: end;
    gap: .8rem 1rem;
    margin-bottom: 1.15rem;
    padding: .75rem .8rem;
    border-color: var(--ggp-line);
}

.ggp-library-search,
.ggp-library-status {
    min-width: 0;
}

.ggp-library-search__label,
.ggp-library-status__label {
    display: block;
    margin-bottom: .35rem;
    color: var(--ggp-muted);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.ggp-library-search__control {
    position: relative;
}

.ggp-library-search__icon {
    position: absolute;
    top: 50%;
    left: .75rem;
    display: grid;
    place-items: center;
    color: var(--ggp-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.ggp-library-search input[type="search"] {
    width: 100%;
    min-height: 40px;
    padding: .52rem 3.35rem .52rem 2.35rem;
    border: 1px solid var(--ggp-line-strong);
    border-radius: 10px;
    color: inherit;
    background: color-mix(in srgb, currentColor 3%, transparent);
    font: inherit;
    outline: none;
}

.ggp-library-search input[type="search"]:focus {
    border-color: var(--ggp-accent);
    box-shadow: 0 0 0 3px var(--ggp-accent-soft);
}

.ggp-library-search__clear {
    position: absolute;
    top: 50%;
    right: .55rem;
    padding: .2rem .35rem;
    border: 0;
    color: var(--ggp-muted);
    background: transparent;
    font: inherit;
    font-size: .72rem;
    font-weight: 800;
    cursor: pointer;
    transform: translateY(-50%);
}

.ggp-library-status__buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
}

.ggp-library-status__buttons .pill {
    appearance: none;
    padding: .36rem .55rem;
    border-color: var(--ggp-line);
    font: inherit;
    font-size: .69rem;
    cursor: pointer;
    transition: border-color .16s ease, color .16s ease, background .16s ease;
}

.ggp-library-status__buttons .pill:hover,
.ggp-library-status__buttons .pill:focus-visible,
.ggp-library-status__buttons .pill.is-active {
    color: var(--ggp-accent);
    border-color: var(--ggp-accent);
}

.ggp-library-status__buttons .pill.is-active {
    background: var(--ggp-accent-soft);
}

.ggp-library-status__buttons .pill span {
    margin-left: .18rem;
    opacity: .7;
}

.ggp-library-status__buttons .pill:disabled {
    opacity: .35;
    cursor: default;
}

.ggp-library-toolbar__result {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: .28rem;
    min-width: 76px;
    padding-bottom: .45rem;
    color: var(--ggp-muted);
    white-space: nowrap;
    font-size: .74rem;
}

.ggp-library-toolbar__result strong {
    color: var(--ggp-accent);
    font-size: 1.05rem;
}

.ggp-library-shell {
    display: grid;
    grid-template-columns: minmax(0, 9fr) minmax(230px, 3fr);
    gap: 1.15rem;
    align-items: start;
}

.ggp-library-shell.is-projects-only {
    grid-template-columns: 1fr;
}

.ggp-library-shell.is-github-only {
    grid-template-columns: minmax(230px, 320px);
    justify-content: end;
}

.ggp-project-directory,
.ggp-github-rail {
    min-width: 0;
}

.ggp-directory-header,
.ggp-github-rail__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .75rem;
    padding-bottom: .7rem;
    border-bottom: 1px solid var(--ggp-line);
}

.ggp-directory-header .section-title,
.ggp-github-rail__head .section-title {
    margin: 0;
    font-size: clamp(1.35rem, 2.2vw, 1.9rem);
}

.ggp-directory-count,
.ggp-github-rail__head > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 28px;
    padding: .3rem .55rem;
    border: 1px solid var(--ggp-line);
    border-radius: 999px;
    color: var(--ggp-muted);
    font-size: .7rem;
    white-space: nowrap;
}

.ggp-directory-count strong,
.ggp-github-rail__head > span strong {
    color: var(--ggp-accent);
}

.ggp-category-jump {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .38rem;
    margin-bottom: .9rem;
}

.ggp-category-jump a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .34rem .52rem;
    border: 1px solid var(--ggp-line);
    border-radius: 999px;
    color: inherit;
    background: color-mix(in srgb, currentColor 2.5%, transparent);
    font-size: .68rem;
    font-weight: 750;
    text-decoration: none;
    transition: border-color .16s ease, color .16s ease, background .16s ease;
}

.ggp-category-jump a:hover,
.ggp-category-jump a:focus-visible {
    color: var(--ggp-accent);
    border-color: var(--ggp-accent);
    background: var(--ggp-accent-soft);
}

.ggp-category-jump a span {
    opacity: .62;
}

.ggp-project-directory__groups {
    display: grid;
    gap: .85rem;
}

.ggp-directory-category {
    scroll-margin-top: 150px;
    border: 1px solid var(--ggp-line);
    border-radius: 15px;
    overflow: clip;
    background: color-mix(in srgb, currentColor 2%, transparent);
}

.ggp-directory-category__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .68rem .8rem;
    border-bottom: 1px solid var(--ggp-line);
    background: color-mix(in srgb, currentColor 3%, transparent);
}

.ggp-directory-category__header h3 {
    margin: 0;
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.ggp-directory-category__header div > span {
    display: block;
    margin-top: .12rem;
    color: var(--ggp-muted);
    font-size: .64rem;
}

.ggp-directory-category__header > strong {
    display: grid;
    place-items: center;
    min-width: 27px;
    min-height: 27px;
    padding-inline: .35rem;
    border: 1px solid var(--ggp-line);
    border-radius: 999px;
    color: var(--ggp-accent);
    font-size: .7rem;
}

.ggp-directory-category__items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ggp-project-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    min-width: 0;
    border-bottom: 1px solid var(--ggp-line);
    transition: background .16s ease, box-shadow .16s ease;
}

.ggp-project-row:nth-child(odd) {
    border-right: 1px solid var(--ggp-line);
}

.ggp-project-row:hover,
.ggp-project-row:focus-within {
    background: color-mix(in srgb, currentColor 4.5%, transparent);
    box-shadow: inset 3px 0 0 var(--ggp-accent);
}

.ggp-project-row.is-featured {
    box-shadow: inset 3px 0 0 color-mix(in srgb, var(--ggp-accent) 75%, transparent);
}

.ggp-project-row__body {
    min-width: 0;
    padding: .72rem .78rem .68rem;
}

.ggp-project-row__titleline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .55rem;
}

.ggp-project-row__titleline h4 {
    min-width: 0;
    margin: 0;
    font-size: .95rem;
    line-height: 1.2;
}

.ggp-project-row__titleline h4 a {
    color: inherit;
    text-decoration: none;
}

.ggp-project-row__titleline h4 a:hover,
.ggp-project-row__titleline h4 a:focus-visible {
    color: var(--ggp-accent);
}

.ggp-project-row__status {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    flex: 0 0 auto;
    color: var(--ggp-muted);
    font-size: .62rem;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ggp-project-row__status .pill-dot {
    width: 5px;
    height: 5px;
}

.ggp-project-row p {
    display: -webkit-box;
    margin: .35rem 0 0;
    overflow: hidden;
    color: var(--ggp-muted);
    font-size: .78rem;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ggp-project-row__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .22rem .6rem;
    margin-top: .42rem;
    color: var(--ggp-muted);
    font-size: .64rem;
}

.ggp-project-row__meta span + span::before {
    content: "•";
    margin-right: .6rem;
    color: var(--ggp-accent);
}

.ggp-project-row__open {
    display: grid;
    place-items: center;
    width: 36px;
    border-left: 1px solid var(--ggp-line);
    color: var(--ggp-muted);
    text-decoration: none;
    transition: color .16s ease, background .16s ease;
}

.ggp-project-row__open:hover,
.ggp-project-row__open:focus-visible {
    color: var(--ggp-accent);
    background: var(--ggp-accent-soft);
}

.ggp-directory-category__more {
    width: 100%;
    padding: .52rem .75rem;
    border: 0;
    border-top: 1px solid var(--ggp-line);
    color: var(--ggp-muted);
    background: transparent;
    font: inherit;
    font-size: .7rem;
    font-weight: 800;
    cursor: pointer;
}

.ggp-directory-category__more:hover,
.ggp-directory-category__more:focus-visible {
    color: var(--ggp-accent);
    background: var(--ggp-accent-soft);
}

/* Narrow GitHub rail. */
.ggp-github-rail {
    border: 1px solid var(--ggp-line);
    border-radius: 15px;
    overflow: clip;
    background: color-mix(in srgb, currentColor 2.5%, transparent);
}

.ggp-github-rail__head {
    margin: 0;
    padding: .8rem .85rem;
    background: color-mix(in srgb, currentColor 2.5%, transparent);
}

.ggp-github-rail__head .section-title {
    font-size: 1.05rem;
}

.ggp-github-rail__body {
    display: grid;
}

.ggp-github-group + .ggp-github-group {
    border-top: 1px solid var(--ggp-line-strong);
}

.ggp-github-group__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .48rem .65rem;
    border-bottom: 1px solid var(--ggp-line);
    background: color-mix(in srgb, currentColor 2%, transparent);
}

.ggp-github-group__header h3 {
    margin: 0;
    color: var(--ggp-muted);
    font-size: .62rem;
    font-weight: 850;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.ggp-github-group__header span {
    color: var(--ggp-muted);
    font-size: .62rem;
}

.ggp-github-group__items {
    display: grid;
}

.ggp-github-item {
    padding: .62rem .65rem .58rem;
    border-bottom: 1px solid var(--ggp-line);
    transition: background .16s ease, box-shadow .16s ease;
}

.ggp-github-item:last-child {
    border-bottom: 0;
}

.ggp-github-item:hover,
.ggp-github-item:focus-within {
    background: color-mix(in srgb, currentColor 4.5%, transparent);
    box-shadow: inset 3px 0 0 var(--ggp-accent);
}

.ggp-github-item__identity {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: .55rem;
}

.ggp-github-item__logo {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: .25rem;
    border: 1px solid var(--ggp-line);
    border-radius: 8px;
    overflow: hidden;
    background: color-mix(in srgb, currentColor 3%, transparent);
    color: var(--ggp-accent);
    text-decoration: none;
}

.ggp-github-item__logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ggp-github-item__logo--fallback {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .62rem;
    font-weight: 850;
}

.ggp-github-item h4 {
    margin: 0;
    font-size: .8rem;
    line-height: 1.2;
}

.ggp-github-item h4 a {
    color: inherit;
    text-decoration: none;
}

.ggp-github-item h4 a:hover,
.ggp-github-item h4 a:focus-visible {
    color: var(--ggp-accent);
}

.ggp-github-item__repo {
    margin-top: .12rem;
    overflow: hidden;
    color: var(--ggp-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .56rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ggp-github-item__release {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
    margin-top: .46rem;
}

.ggp-github-item__release span {
    color: var(--ggp-muted);
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ggp-github-item__release strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--ggp-accent);
    font-size: .72rem;
}

.ggp-github-item__links {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-top: .34rem;
}

.ggp-github-item__links a {
    color: var(--ggp-muted);
    font-size: .62rem;
    font-weight: 800;
    text-decoration: none;
}

.ggp-github-item__links a:hover,
.ggp-github-item__links a:focus-visible {
    color: var(--ggp-accent);
}

.ggp-lane-empty,
.ggp-library-no-results,
.ggp-github-empty {
    text-align: center;
}

.ggp-github-empty {
    padding: 1rem;
    color: var(--ggp-muted);
    font-size: .75rem;
}

.ggp-library-no-results {
    margin-top: 1rem;
}

.ggp-library-no-results .btn-ghost {
    margin-top: .6rem;
}

.ggp-project-row[hidden],
.ggp-github-item[hidden],
.ggp-directory-category[hidden],
.ggp-github-group[hidden],
.ggp-project-directory[hidden],
.ggp-github-rail[hidden],
.ggp-library-no-results[hidden],
.ggp-category-jump a[hidden],
.ggp-directory-category__more[hidden] {
    display: none !important;
}

@media (max-width: 1040px) {
    .ggp-library-toolbar {
        position: static;
        grid-template-columns: 1fr;
    }

    .ggp-library-toolbar__result {
        justify-content: flex-start;
        padding-bottom: 0;
    }

    .ggp-library-shell {
        grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
    }

    .ggp-directory-category__items {
        grid-template-columns: 1fr;
    }

    .ggp-project-row:nth-child(odd) {
        border-right: 0;
    }
}

@media (max-width: 760px) {
    .ggp-library-shell {
        grid-template-columns: 1fr;
    }

    .ggp-directory-header,
    .ggp-github-rail__head {
        align-items: flex-start;
    }

    .ggp-github-rail {
        margin-top: .25rem;
    }
}

@media (max-width: 520px) {
    .ggp-project-row__titleline {
        align-items: flex-start;
        flex-direction: column;
    }

    .ggp-project-row__status {
        white-space: nowrap;
    }

    .ggp-category-jump {
        gap: .3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ggp-project-row,
    .ggp-github-item,
    .ggp-category-jump a,
    .ggp-library-status__buttons .pill {
        transition: none;
    }
}

/* -------------------------------------------------------------------------
 * Project detail and update pages
 * ---------------------------------------------------------------------- */

.ggp-project-meta,
.ggp-tech-list,
.ggp-project-toolbar,
.ggp-project-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .55rem .75rem;
}

.ggp-project-layout {
    align-items: start;
}

.ggp-project-layout:not(.ggp-project-layout--software) {
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
}

.ggp-project-sidebar {
    display: grid;
    gap: 1rem;
}

.ggp-project-logo img,
.ggp-rich-content img,
.ggp-update-card__image img,
.gg-article__thumbnail img {
    display: block;
    width: 100%;
    height: auto;
}

.ggp-rich-content > :first-child {
    margin-top: 0;
}

.ggp-rich-content > :last-child {
    margin-bottom: 0;
}

.ggp-release-version {
    margin: 0;
    overflow-wrap: anywhere;
}

.ggp-stack-actions {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: .65rem;
}

.ggp-stack-actions > a {
    width: 100%;
    justify-content: center;
}

.ggp-info-list {
    display: grid;
}

.ggp-info-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-block: .5rem;
}

.ggp-info-row strong {
    text-align: right;
}

.ggp-updates-section {
    margin-top: 2rem;
}

.ggp-project-log-header {
    max-width: 760px;
}

.ggp-timeline {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ggp-timeline-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
}

.ggp-timeline-marker {
    margin-top: .25rem;
    white-space: nowrap;
}

.ggp-update-card {
    min-width: 0;
}

.ggp-update-card__image {
    display: block;
    margin-block: 1rem;
    overflow: hidden;
}

.ggp-update-card .card-title a {
    color: inherit;
    text-decoration: none;
}

.ggp-update-card .card-title a:hover,
.ggp-update-card .card-title a:focus-visible {
    text-decoration: underline;
}

.ggp-single-update .gg-article {
    max-width: 900px;
    margin-inline: auto;
}

.ggp-project-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .7rem 1rem;
    margin: .85rem 0 0;
}

.ggp-project-detail-grid > div {
    min-width: 0;
}

.ggp-project-detail-grid dt {
    margin: 0 0 .15rem;
    font-weight: 700;
}

.ggp-project-detail-grid dd {
    margin: 0;
}

.ggp-software-links {
    margin-top: 1rem;
}

@media (max-width: 820px) {
    .ggp-project-layout:not(.ggp-project-layout--software) {
        grid-template-columns: 1fr;
    }

    .ggp-project-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .ggp-project-detail-grid {
        grid-template-columns: 1fr;
    }

    .ggp-timeline-item {
        grid-template-columns: 1fr;
    }

    .ggp-timeline-marker {
        justify-self: start;
    }
}
