.qhgr {
    --qhgr-star: #fbbc05;
    --qhgr-border: #e6e6e6;
    --qhgr-text: #1f2937;
    --qhgr-muted: #70757a;
    max-width: 1200px;
    margin: 0 auto;
    font-family: inherit;
    color: var(--qhgr-text);
}

.qhgr__head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.qhgr__glogo { display: inline-flex; }

.qhgr__summary { display: flex; flex-direction: column; }

.qhgr__rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    line-height: 1;
}

.qhgr__rating strong { font-size: 22px; }

.qhgr__count { font-size: 13px; color: var(--qhgr-muted); margin-top: 2px; }

.qhgr__cta {
    margin-left: auto;
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--qhgr-border);
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    color: #1a73e8;
    background: #fff;
    transition: background .15s ease;
}
.qhgr__cta:hover { background: #f5f8ff; }

.qhgr__starrow { display: inline-flex; gap: 1px; }
.qhgr__star { color: #dadce0; font-size: 16px; line-height: 1; }
.qhgr__star.is-full { color: var(--qhgr-star); }

/* Grid */
.qhgr--grid .qhgr__track {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* List */
.qhgr--list .qhgr__track {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Viewport wraps track + arrows. Carousel reserves side space for arrows
   so they sit OUTSIDE the cards and never overlap the text. */
.qhgr__viewport { position: relative; }
.qhgr--carousel .qhgr__viewport {
    padding: 0 52px;
}
.qhgr--grid .qhgr__viewport,
.qhgr--list .qhgr__viewport { position: static; }

/* Carousel */
.qhgr--carousel .qhgr__track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: none;              /* Firefox */
}
.qhgr--carousel .qhgr__track::-webkit-scrollbar { display: none; } /* WebKit */

/* Show 3 cards at once (account for the two 16px gaps between them). */
.qhgr--carousel .qhgr__card {
    flex: 0 0 calc((100% - 32px) / 3);
    max-width: calc((100% - 32px) / 3);
}
@media (max-width: 900px) {
    .qhgr--carousel .qhgr__card {
        flex: 0 0 calc((100% - 16px) / 2);
        max-width: calc((100% - 16px) / 2);
    }
}
@media (max-width: 600px) {
    .qhgr--carousel .qhgr__card {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Nav arrows */
.qhgr__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--qhgr-border);
    background: #fff;
    color: #3c4043;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
}
.qhgr__nav:hover { background: #f5f5f5; }
/* Sit in the reserved gutters, clear of the cards. */
.qhgr__nav--prev { left: 0; }
.qhgr__nav--next { right: 0; }
@media (max-width: 600px) {
    /* Narrow screens: no side gutters, arrows below the track instead. */
    .qhgr--carousel .qhgr__viewport { padding: 0 0 44px; }
    .qhgr__nav {
        top: auto;
        bottom: 0;
        transform: none;
    }
    .qhgr__nav--prev { left: calc(50% - 48px); }
    .qhgr__nav--next { right: calc(50% - 48px); }
}

.qhgr__card {
    border: 1px solid var(--qhgr-border);
    border-radius: 8px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qhgr__card-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qhgr__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 40px;
}
.qhgr__avatar--ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1a73e8;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
}

.qhgr__meta { display: flex; flex-direction: column; min-width: 0; }
.qhgr__author { font-weight: 600; font-size: 14px; color: var(--qhgr-text); text-decoration: none; }
.qhgr__author:hover { text-decoration: underline; }
.qhgr__date { font-size: 12px; color: var(--qhgr-muted); }

.qhgr__gicon { margin-left: auto; flex: 0 0 auto; }

.qhgr__text {
    font-size: 14px;
    line-height: 1.55;
    color: #3c4043;
    white-space: pre-line;
}

.qhgr-error {
    padding: 10px 14px;
    background: #fff3cd;
    border: 1px solid #ffe69c;
    border-radius: 6px;
    color: #664d03;
    font-size: 14px;
}
