.grh-home,
.grh-resource-shell,
.grh-download-landing {
    --grh-bg: #f6f7f9;
    --grh-panel: #ffffff;
    --grh-line: #dfe3e8;
    --grh-text: #1d2327;
    --grh-muted: #65717d;
    --grh-accent: #d63638;
    --grh-accent-dark: #a92729;
    --grh-green: #168a54;
    color: var(--grh-text);
}

/* 0.2 main-site layout inspired by dense Chinese resource directories. */
.grh-main-banner {
    display: grid;
    place-items: center;
    min-height: 180px;
    margin: -24px calc(50% - 50vw) 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.92) 100%),
        var(--grh-hero-image);
    background-size: cover;
    background-position: center 42%;
}

.grh-main-banner-logo {
    color: #fff;
    font-size: 38px;
    font-weight: 900;
    letter-spacing: 0;
    text-shadow: 0 4px 18px rgba(0,0,0,.34);
}

.grh-center-title {
    display: grid;
    justify-items: center;
    gap: 2px;
    margin: 52px 0 24px;
}

.grh-center-title h2 {
    margin: 0;
    color: var(--grh-accent);
    font-size: 32px;
    line-height: 1.2;
    letter-spacing: 0;
}

.grh-center-title span {
    color: var(--grh-muted);
    font-size: 14px;
}

.grh-featured-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: 1180px;
    margin: 18px auto 54px;
}

.grh-feature-card {
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 12px 34px rgba(31,38,46,.1);
}

.grh-feature-card a {
    display: block;
    position: relative;
    min-height: 330px;
    color: #fff;
    text-decoration: none;
    background: #20242a;
}

.grh-feature-card img {
    display: block;
    width: 100%;
    height: 330px;
    object-fit: cover;
}

.grh-feature-card > a > span {
    display: grid;
    place-items: center;
    height: 330px;
    font-size: 64px;
    font-weight: 900;
}

.grh-feature-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 18px 20px 20px;
    background: linear-gradient(180deg, rgba(255,255,255,.92) 0%, #fff 100%);
    color: var(--grh-text);
    text-align: center;
    border-radius: 14px 14px 0 0;
}

.grh-feature-caption em {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--grh-accent);
    color: #fff;
    font-style: normal;
    font-size: 13px;
    font-weight: 900;
}

.grh-feature-caption strong {
    color: var(--grh-accent);
    font-size: 22px;
    line-height: 1.25;
}

.grh-feature-caption small {
    color: var(--grh-muted);
}

.grh-hot-section .grh-card-grid,
.grh-masonry-section .grh-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    max-width: 980px;
    margin: 0 auto;
}

.grh-hot-section .grh-card,
.grh-masonry-section .grh-card {
    border-radius: 12px;
    padding: 14px;
    border-color: #edf0f3;
    box-shadow: none;
}

.grh-hot-section .grh-card-cover,
.grh-masonry-section .grh-card-cover {
    border-radius: 10px;
    aspect-ratio: 16 / 8.3;
}

.grh-hot-section .grh-card-title,
.grh-masonry-section .grh-card-title {
    min-height: 52px;
    color: var(--grh-accent);
    font-size: 18px;
    line-height: 1.28;
}

.grh-masonry-section .grh-card:nth-child(3n+1) {
    transform: translateY(22px);
}

.grh-masonry-section .grh-card:nth-child(3n+2) {
    transform: translateY(-10px);
}

.grh-masonry-section .grh-card:hover {
    transform: translateY(-4px);
}

.grh-more-row {
    display: flex;
    justify-content: center;
    margin: 48px 0 20px;
}

.grh-more-row a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    background: var(--grh-accent);
    color: #fff;
    font-weight: 900;
    text-decoration: none;
}

.grh-spotlight {
    margin: 70px calc(50% - 50vw);
    padding: 54px 0;
    background: #fff1df;
}

.grh-spotlight-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.grh-spotlight-head {
    margin-bottom: 18px;
}

.grh-spotlight-head h2 {
    margin: 0;
    color: var(--grh-accent);
    font-size: 32px;
}

.grh-spotlight-head p {
    margin: 4px 0 0;
    color: var(--grh-muted);
}

.grh-spotlight-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 24px;
}

.grh-spotlight .grh-feature-card a,
.grh-spotlight .grh-feature-card img,
.grh-spotlight .grh-feature-card > a > span {
    min-height: 360px;
    height: 360px;
}

.grh-spotlight-list {
    display: grid;
    gap: 16px;
}

.grh-mini-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 12px;
    background: #fff;
}

.grh-mini-cover {
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    overflow: hidden;
    background: #20242a;
}

.grh-mini-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grh-mini-card a {
    color: var(--grh-accent);
    font-weight: 900;
    line-height: 1.28;
    text-decoration: none;
}

.grh-mini-card time {
    display: block;
    margin-top: 6px;
    color: var(--grh-muted);
    font-size: 13px;
}

.grh-tax-nav {
    margin: 0 auto 18px;
    max-width: 980px;
    padding: 0 18px;
    background: #fff;
    border: 1px solid rgba(242, 23, 104, .12);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(31,38,46,.07);
}

.grh-tax-nav h2 {
    margin: 14px 0 0;
    color: var(--grh-accent);
    font-size: 16px;
}

.grh-tax-nav > div {
    gap: 0;
    padding: 10px 0 14px;
}

.grh-tax-nav a {
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-left: 1px solid #edf0f3;
    border-radius: 0;
    color: #707780;
}

.grh-tax-nav a:hover {
    background: #ffd4e3;
    color: var(--grh-accent);
}

@media (max-width: 720px) {
    .grh-featured-row,
    .grh-hot-section .grh-card-grid,
    .grh-masonry-section .grh-card-grid,
    .grh-spotlight-grid {
        grid-template-columns: 1fr;
    }

    .grh-masonry-section .grh-card:nth-child(n) {
        transform: none;
    }
}

.grh-home-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: 28px;
    align-items: center;
    min-height: 330px;
    padding: 34px;
    margin: 0 0 20px;
    background:
        linear-gradient(90deg, rgba(19,22,27,.96) 0%, rgba(19,22,27,.82) 38%, rgba(19,22,27,.35) 72%, rgba(19,22,27,.76) 100%),
        var(--grh-hero-image);
    background-size: cover;
    background-position: center;
    color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 18px 38px rgba(20, 26, 32, .22);
}

.grh-home-hero p,
.grh-kicker {
    margin: 0 0 8px;
    font-size: 14px;
    color: #ffd4d4;
}

.grh-home-hero h1 {
    margin: 0;
    max-width: 620px;
    font-size: clamp(32px, 4.5vw, 54px);
    line-height: 1.12;
    letter-spacing: 0;
}

.grh-hero-copy {
    display: grid;
    gap: 14px;
}

.grh-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.grh-hero-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 6px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.grh-hero-actions a:first-child {
    background: var(--grh-accent);
}

.grh-home-hero form {
    position: relative;
    display: flex;
    min-height: 48px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

.grh-home-hero input[type="search"] {
    min-width: 0;
    flex: 1;
    border: 0;
    padding: 0 14px;
    font-size: 15px;
}

.grh-home-hero button,
.grh-feedback-form button,
.grh-primary-button {
    border: 0;
    background: var(--grh-accent);
    color: #fff;
    padding: 0 18px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.grh-home-hero button:hover,
.grh-feedback-form button:hover,
.grh-primary-button:hover {
    background: var(--grh-accent-dark);
    color: #fff;
}

.grh-section {
    margin: 0 0 22px;
}

.grh-section-head,
.grh-panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 0 0 14px;
}

.grh-section-head h2,
.grh-panel-title h2,
.grh-info-panel h2,
.grh-related h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: 0;
}

.grh-section-head a,
.grh-section-head span,
.grh-panel-title span {
    color: var(--grh-muted);
    font-size: 14px;
}

.grh-tax-nav {
    margin-bottom: 18px;
}

.grh-tax-nav h2,
.grh-ranking h2 {
    margin: 0 0 12px;
    font-size: 22px;
    letter-spacing: 0;
}

.grh-tax-nav > div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.grh-tax-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--grh-line);
    border-radius: 6px;
    background: var(--grh-panel);
    color: var(--grh-text);
    font-weight: 700;
    text-decoration: none;
}

.grh-tax-nav a:hover {
    border-color: var(--grh-accent);
    color: var(--grh-accent);
}

.grh-tax-nav a span {
    color: var(--grh-muted);
    font-size: 12px;
    font-weight: 500;
}

.grh-ranking {
    padding: 20px;
    background: var(--grh-panel);
    border: 1px solid var(--grh-line);
    border-radius: 8px;
}

.grh-ranking ol {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style-position: inside;
}

.grh-ranking li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--grh-line);
}

.grh-ranking li:first-child {
    border-top: 0;
}

.grh-ranking a {
    color: var(--grh-text);
    font-weight: 700;
    text-decoration: none;
}

.grh-ranking span {
    flex: 0 0 auto;
    color: var(--grh-muted);
    font-size: 13px;
}

.grh-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}

.grh-card {
    background: var(--grh-panel);
    border: 1px solid var(--grh-line);
    border-radius: 6px;
    overflow: hidden;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.grh-card:hover {
    border-color: rgba(214, 54, 56, .55);
    box-shadow: 0 12px 26px rgba(20, 26, 32, .12);
    transform: translateY(-2px);
}

.grh-card-cover {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    background: #23262b;
    color: #fff;
    text-decoration: none;
}

.grh-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.grh-card-cover span {
    font-size: 42px;
    font-weight: 800;
}

.grh-card-body {
    padding: 10px;
}

.grh-card-title {
    display: block;
    min-height: 44px;
    color: var(--grh-text);
    font-size: 14px;
    line-height: 1.45;
    font-weight: 700;
    text-decoration: none;
}

.grh-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.grh-card-meta span {
    border: 1px solid var(--grh-line);
    border-radius: 4px;
    padding: 3px 8px;
    color: var(--grh-muted);
    font-size: 12px;
    line-height: 1.4;
}

.grh-resource-shell {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.grh-resource-hero {
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    background: linear-gradient(135deg, #20242a 0%, #30343a 58%, #4a2525 100%);
    color: #fff;
    border-radius: 8px;
}

.grh-resource-cover {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 5;
    background: #121417;
    border-radius: 6px;
    overflow: hidden;
}

.grh-resource-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grh-resource-cover span {
    font-size: 60px;
    font-weight: 900;
}

.grh-resource-summary {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.grh-breadcrumb {
    margin-bottom: 8px;
    color: rgba(255,255,255,.62);
    font-size: 13px;
}

.grh-resource-summary h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.18;
    letter-spacing: 0;
}

.grh-resource-summary p {
    max-width: 760px;
    margin: 0 0 16px;
    color: rgba(255,255,255,.78);
}

.grh-summary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.grh-summary-tags span {
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 4px;
    padding: 5px 9px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 13px;
}

.grh-hero-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 6px;
    background: var(--grh-accent);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.grh-info-panel,
.grh-download-panel,
.grh-related {
    padding: 20px;
    background: var(--grh-panel);
    border: 1px solid var(--grh-line);
    border-radius: 6px;
}

.grh-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.grh-meta-item {
    padding: 12px;
    background: var(--grh-bg);
    border-radius: 6px;
}

.grh-meta-item span,
.grh-note h3,
.grh-feedback-form span,
.grh-landing-card span {
    display: block;
    margin: 0 0 5px;
    color: var(--grh-muted);
    font-size: 13px;
    font-weight: 500;
}

.grh-meta-item strong,
.grh-landing-card strong {
    display: block;
    color: var(--grh-text);
    font-size: 15px;
}

.grh-note {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--grh-line);
}

.grh-note p {
    margin: 0;
    color: var(--grh-text);
    line-height: 1.75;
}

.grh-description-panel {
    padding-bottom: 10px;
}

.grh-resource-description {
    margin-top: 14px;
}

.grh-resource-description > :first-child {
    margin-top: 0;
}

.grh-media-panel h2 {
    margin-bottom: 14px;
}

.grh-video-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin-bottom: 14px;
    padding: 0 13px;
    border-radius: 6px;
    background: #20242a;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.grh-video-link:hover {
    color: #fff;
    background: #111317;
}

.grh-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.grh-gallery a {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 6px;
    background: #20242a;
}

.grh-gallery img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .16s ease;
}

.grh-gallery a:hover img {
    transform: scale(1.04);
}

.grh-empty-grid {
    grid-column: 1 / -1;
    padding: 28px;
    border: 1px dashed var(--grh-line);
    border-radius: 6px;
    background: rgba(255,255,255,.65);
    color: var(--grh-muted);
    text-align: center;
}

.grh-download-list {
    display: grid;
    gap: 10px;
}

.grh-download-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px;
    color: var(--grh-text);
    background: var(--grh-bg);
    border: 1px solid var(--grh-line);
    border-radius: 6px;
    text-decoration: none;
}

.grh-download-card:hover {
    border-color: var(--grh-accent);
    color: var(--grh-text);
}

.grh-download-card.is-recommended {
    border-color: rgba(214, 54, 56, .45);
    box-shadow: inset 4px 0 0 var(--grh-accent);
}

.grh-download-main strong,
.grh-download-main em {
    display: block;
    font-style: normal;
}

.grh-download-main em {
    margin-top: 3px;
    color: var(--grh-muted);
    font-size: 13px;
}

.grh-download-action {
    flex: 0 0 auto;
    border-radius: 6px;
    padding: 8px 12px;
    background: var(--grh-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.grh-home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
    gap: 18px;
    align-items: start;
}

.grh-home-sidebar {
    position: sticky;
    top: 82px;
    padding: 16px;
    background: var(--grh-panel);
    border: 1px solid var(--grh-line);
    border-radius: 8px;
}

.grh-home-sidebar .grh-card-grid {
    grid-template-columns: 1fr;
}

.grh-home-sidebar .grh-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
}

.grh-home-sidebar .grh-card-cover {
    aspect-ratio: 1 / 1;
}

.grh-home-sidebar .grh-card-title {
    min-height: 0;
}

.grh-feedback-form {
    display: grid;
    grid-template-columns: minmax(140px, 180px) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--grh-line);
}

.grh-feedback-form select,
.grh-feedback-form input {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--grh-line);
    border-radius: 6px;
    padding: 0 10px;
}

.grh-feedback-form button {
    min-height: 40px;
    border-radius: 6px;
}

.grh-empty {
    margin: 0;
    color: var(--grh-muted);
}

.grh-download-landing {
    background: var(--grh-bg);
    padding: 48px 18px;
}

.grh-landing-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 28px;
    background: var(--grh-panel);
    border: 1px solid var(--grh-line);
    border-radius: 8px;
}

.grh-landing-inner h1 {
    margin: 0 0 18px;
    font-size: clamp(26px, 4vw, 40px);
    letter-spacing: 0;
}

.grh-landing-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin: 18px 0;
}

.grh-landing-card div {
    padding: 14px;
    border-radius: 6px;
    background: var(--grh-bg);
}

.grh-landing-help {
    color: var(--grh-muted);
}

.grh-landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.grh-primary-button,
.grh-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 6px;
    padding: 0 18px;
    text-decoration: none;
}

.grh-secondary-button {
    border: 1px solid var(--grh-line);
    color: var(--grh-text);
    background: #fff;
}

@media (max-width: 720px) {
    .grh-home-hero,
    .grh-feedback-form {
        grid-template-columns: 1fr;
    }

    .grh-home-hero {
        padding: 22px;
        min-height: 420px;
        background-position: center right;
    }

    .grh-section-head,
    .grh-panel-title,
    .grh-download-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .grh-download-action {
        width: 100%;
        text-align: center;
    }

    .grh-home-layout,
    .grh-resource-hero {
        grid-template-columns: 1fr;
    }

    .grh-home-sidebar {
        position: static;
    }

    .grh-resource-cover {
        aspect-ratio: 16 / 9;
    }
}
