/*
 * Homepage-only finishing layer.
 * The Xiu base theme supplies the article cards, banner and ranking modules.
 * These rules only set the homepage rhythm and GEO introduction, so other
 * templates keep their existing layout.
 */

body.home .content > .geo-home-seo {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(235px, .85fr);
    gap: 28px;
    margin: 0 0 20px;
    padding: 25px 30px;
    background: var(--tb--white);
    border-radius: var(--tb--radius);
    overflow: hidden;
}

body.home .widget_geo_intro .geo-sidebar-intro {
    color: var(--tb--gray);
    font-size: 13px;
    line-height: 1.75;
}

body.home .widget_geo_intro .geo-sidebar-intro p {
    margin: 0 0 10px;
}

body.home .widget_geo_intro .geo-sidebar-intro p:last-child {
    margin-bottom: 0;
}

body.home .widget_geo_intro .geo-sidebar-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 14px;
    padding-top: 9px;
    border-top: 1px solid var(--tb--line);
}

body.home .widget_geo_intro .geo-sidebar-links a {
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid #dce8dd;
    border-radius: var(--tb--radius);
    background: var(--tb--tint);
    color: var(--tb--main);
    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}

body.home .widget_geo_intro .geo-sidebar-links a::after {
    content: " \2192";
    font-size: 12px;
    font-weight: normal;
}

body.home .widget_geo_intro .geo-sidebar-links a:first-child {
    border-color: var(--tb--main);
    background: var(--tb--main);
    color: var(--tb--base);
}

body.home .widget_geo_intro .geo-sidebar-links a:hover,
body.home .widget_geo_intro .geo-sidebar-links a:focus-visible {
    opacity: .88;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(65, 125, 73, .16);
    text-decoration: none;
}

body.home .widget_geo_intro .geo-sidebar-links a:focus-visible {
    outline: 2px solid var(--tb--main);
    outline-offset: 2px;
}

body.home .geo-home-seo-intro {
    min-width: 0;
}

body.home .geo-home-kicker {
    margin: 0 0 8px;
    color: var(--tb--main);
    font-size: 12px;
    line-height: 1.4;
    font-weight: bold;
}

body.home .geo-home-seo-intro h1 {
    margin: 0 0 12px;
    color: var(--tb--base);
    font-size: 28px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: 0;
}

body.home .geo-home-seo-intro p {
    max-width: 820px;
    margin: 0 0 10px;
    color: #666;
    font-size: 14px;
    line-height: 1.8;
}

body.home .geo-home-seo-intro p:last-child {
    margin-bottom: 0;
}

body.home .geo-home-seo-context {
    padding-top: 10px;
    border-top: 1px solid var(--tb--line);
    color: var(--tb--gray) !important;
    font-size: 13px !important;
}

body.home .geo-home-seo a {
    color: var(--tb--main);
}

body.home .geo-home-seo a:hover {
    text-decoration: underline;
}

body.home .geo-home-seo-note {
    align-self: stretch;
    padding-left: 24px;
    border-left: 1px solid var(--tb--line);
}

body.home .geo-home-seo-note h2 {
    margin: 0 0 14px;
    color: var(--tb--base);
    font-size: 17px;
    line-height: 1.45;
    font-weight: 600;
}

body.home .geo-home-seo-note ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

body.home .geo-home-seo-note li {
    margin: 0 0 12px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--tb--line);
}

body.home .geo-home-seo-note li:last-child {
    margin-bottom: 0;
}

body.home .geo-home-seo-note strong {
    display: block;
    margin-bottom: 4px;
    color: var(--tb--base);
    font-size: 14px;
}

body.home .geo-home-seo-note span {
    display: block;
    color: var(--tb--gray);
    font-size: 12px;
    line-height: 1.7;
}

body.home .geo-home-seo-note-tail {
    margin: 15px 0 0;
    color: var(--tb--gray);
    font-size: 12px;
    line-height: 1.7;
}

/* Keep the requested weekly ranking immediately above the latest list. */
body.home .most-comment-posts {
    margin-bottom: 20px;
}

body.home .geo-home-topics {
    margin: 0 0 20px;
    padding: 25px 30px;
    background: var(--tb--white);
    border-radius: var(--tb--radius);
    overflow: hidden;
}

body.home .geo-home-topics-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tb--line);
}

body.home .geo-home-topics-heading h2 {
    margin: 0;
    color: var(--tb--base);
    font-size: 19px;
    line-height: 1.45;
    font-weight: 600;
}

body.home .geo-home-topics-heading p {
    margin: 0;
    color: var(--tb--gray);
    font-size: 12px;
    line-height: 1.6;
}

body.home .geo-home-topics ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

body.home .geo-home-topics li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin: 0;
    border-bottom: 1px solid var(--tb--line);
}

body.home .geo-home-topics li:last-child {
    border-bottom: 0;
}

body.home .geo-home-topics li {
    padding: 10px 0;
}

body.home .geo-home-topics strong {
    flex: 0 0 43%;
    color: var(--tb--base);
    font-size: 14px;
    line-height: 1.55;
    font-weight: 600;
}

body.home .geo-home-topics span {
    flex: 1;
    color: var(--tb--gray);
    font-size: 12px;
    line-height: 1.65;
    text-align: right;
}

body.home .most-comment-posts .title {
    margin-bottom: 15px;
}

/* The base theme pulls the first excerpt into the title card. Keep the
 * homepage sections readable after inserting the GEO and ranking blocks. */
body.home .latest-title {
    margin-bottom: 20px;
}

body.home .latest-title + .excerpt {
    margin-top: 0;
}

@media (max-width: 900px) {
    body.home .content > .geo-home-seo {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    body.home .geo-home-seo-note {
        padding: 16px 0 0;
        border-top: 1px solid var(--tb--line);
        border-left: 0;
    }

    body.home .geo-home-topics-heading {
        display: block;
    }

    body.home .geo-home-topics-heading p {
        margin-top: 5px;
    }

    body.home .geo-home-topics li {
        display: block;
        padding: 9px 0;
    }

    body.home .geo-home-topics strong,
    body.home .geo-home-topics span {
        display: block;
        width: auto;
        text-align: left;
    }

    body.home .geo-home-topics span {
        margin-top: 3px;
    }
}

@media (max-width: 600px) {
    body.home .content > .geo-home-seo {
        margin-bottom: 15px;
        padding: 17px 15px;
    }

    body.home .geo-home-seo-intro h1 {
        font-size: 23px;
    }

    body.home .geo-home-seo-intro p {
        font-size: 13px;
        line-height: 1.8;
    }

    body.home .geo-home-seo-context {
        font-size: 12px !important;
    }

    body.home .geo-home-seo-note h2 {
        font-size: 16px;
    }

    body.home .geo-home-seo-note li {
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    body.home .geo-home-topics {
        margin-bottom: 15px;
        padding: 17px 15px;
    }

    body.home .geo-home-topics-heading h2 {
        font-size: 17px;
    }

    body.home .geo-home-topics strong {
        font-size: 13px;
    }

    body.home .geo-home-topics span {
        font-size: 11px;
    }

    body.home .latest-title {
        margin-bottom: 15px;
    }
}
