:root {
    --mrdoc-primary: #2563eb;
    --mrdoc-primary-dark: #1d4ed8;
    --mrdoc-ink: #172033;
    --mrdoc-muted: #687386;
    --mrdoc-line: #e5eaf2;
    --mrdoc-surface: #ffffff;
    --mrdoc-canvas: #f6f8fc;
    --mrdoc-shadow: 0 14px 40px rgba(30, 52, 87, .08);
}

html {
    background: var(--mrdoc-canvas);
}

body.mrdoc-home-page {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: var(--mrdoc-ink);
    background:
        radial-gradient(circle at 8% 2%, rgba(37, 99, 235, .09), transparent 26rem),
        var(--mrdoc-canvas);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.mrdoc-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 68px;
    border-bottom: 1px solid rgba(229, 234, 242, .9);
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 4px 20px rgba(30, 52, 87, .035);
    backdrop-filter: blur(14px);
}

.mrdoc-site-header .site-header-inner {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(260px, 420px) minmax(150px, 1fr);
    align-items: center;
    width: min(1180px, calc(100% - 48px));
    height: 100%;
    margin: 0 auto;
}

.mrdoc-site-header .site-brand {
    justify-self: start;
}

.mrdoc-site-header .logo {
    position: static;
    display: inline-flex;
    align-items: center;
}

.mrdoc-site-header .logo img {
    height: 34px;
}

.mrdoc-site-header .header-search {
    width: 100%;
    margin: 0;
}

.mrdoc-site-header .header-search form,
.mrdoc-site-header .header-search .layui-input-inline {
    width: 100%;
}

.mrdoc-site-header .mrdoc-search-input {
    box-sizing: border-box;
    width: 100%;
    height: 40px;
    padding: 0 44px 0 18px;
    border: 1px solid var(--mrdoc-line);
    border-radius: 12px;
    background: #f8fafc;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.mrdoc-site-header .mrdoc-search-input:focus {
    border-color: rgba(37, 99, 235, .55);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .09);
}

.mrdoc-site-header .header-search button {
    position: absolute;
    top: 0;
    right: 2px;
    width: 40px;
    height: 40px;
    border: 0;
    color: var(--mrdoc-muted);
    background: transparent;
    cursor: pointer;
}

.mrdoc-site-header .header-actions {
    display: flex;
    justify-self: end;
    align-items: center;
}

.mrdoc-site-header .layui-nav {
    display: inline-flex;
    align-items: center;
}

.mrdoc-site-header .layui-nav .layui-nav-item {
    line-height: 68px;
}

.mrdoc-site-header .layui-nav .layui-nav-item > a {
    padding: 0 14px;
    color: #344054;
    font-weight: 500;
}

.mrdoc-site-header .layui-nav-child {
    top: 58px;
    border: 1px solid var(--mrdoc-line);
    border-radius: 12px;
    box-shadow: var(--mrdoc-shadow);
}

.home-main {
    width: min(1180px, calc(100% - 48px));
    min-height: calc(100vh - 178px);
    margin: 0 auto;
}

.home-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    padding: 54px 4px 28px;
}

.home-eyebrow {
    margin-bottom: 8px;
    color: var(--mrdoc-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.home-hero h1 {
    margin: 0;
    color: var(--mrdoc-ink);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -.035em;
}

.home-hero p {
    max-width: 620px;
    margin: 12px 0 0;
    color: var(--mrdoc-muted);
    font-size: 15px;
    line-height: 1.8;
}

.home-toolbar {
    flex: 0 0 auto;
    padding: 8px;
    border: 1px solid var(--mrdoc-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 8px 24px rgba(30, 52, 87, .05);
}

.home-toolbar .layui-form-item,
.home-toolbar .layui-inline {
    display: flex;
    gap: 6px;
    margin: 0;
}

.home-toolbar .layui-input-inline {
    width: 104px;
    margin: 0;
}

.home-toolbar .layui-input-inline:first-child {
    width: 160px;
}

.home-toolbar .layui-input,
.home-toolbar .layui-select-title input {
    height: 36px;
    border: 0;
    border-radius: 9px;
    background: #f7f9fc;
}

.home-toolbar .layui-form-select dl {
    top: 42px;
    border: 1px solid var(--mrdoc-line);
    border-radius: 10px;
    box-shadow: var(--mrdoc-shadow);
}

.mrdoc-home-page .project-list-content {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    box-sizing: border-box;
    width: 100%;
    padding: 0;
}

.mrdoc-home-page .project-item {
    width: auto;
    height: auto;
    min-height: 174px;
    margin: 0;
    overflow: visible;
    border: 0;
    border-radius: 16px;
    background: transparent;
    box-shadow: none;
    transition: transform .22s ease;
}

.mrdoc-home-page .project-item:hover {
    z-index: 2;
    transform: translateY(-4px);
    box-shadow: none;
}

.mrdoc-home-page .project-item .layui-card {
    display: block;
    height: 100%;
}

.mrdoc-home-page .project-title-link {
    color: var(--mrdoc-ink);
}

.mrdoc-home-page .project-title-link:hover {
    color: var(--mrdoc-primary);
}

.mrdoc-home-page .project-item .layui-card {
    box-sizing: border-box;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--mrdoc-line);
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(30, 52, 87, .055);
    transition: border-color .22s ease, box-shadow .22s ease;
}

.mrdoc-home-page .project-item:hover .layui-card {
    border-color: rgba(37, 99, 235, .24);
    box-shadow: var(--mrdoc-shadow);
}

.mrdoc-home-page .layui-card-header {
    height: auto;
    min-height: 54px;
    padding: 16px 18px 10px;
    border: 0;
    color: var(--mrdoc-ink);
    font-size: 16px;
    line-height: 28px;
}

.mrdoc-home-page .layui-card-body {
    padding: 4px 18px 18px;
}

.mrdoc-home-page .layui-badge-rim {
    border-color: #dbe5f4;
    border-radius: 999px;
    color: var(--mrdoc-muted);
    background: #f7f9fc;
}

.mrdoc-home-page .index-doc-link:hover {
    color: var(--mrdoc-primary);
}

.home-empty {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(240px, 370px) minmax(260px, 1fr);
    align-items: center;
    gap: clamp(28px, 7vw, 84px);
    min-height: 350px;
    padding: 36px clamp(28px, 7vw, 76px);
    overflow: hidden;
    border: 1px solid var(--mrdoc-line);
    border-radius: 24px;
    background: rgba(255, 255, 255, .9);
    box-shadow: var(--mrdoc-shadow);
}

.home-empty img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    opacity: .84;
}

.home-empty-copy h2 {
    margin: 0 0 12px;
    color: var(--mrdoc-ink);
    font-size: 25px;
    font-weight: 700;
}

.home-empty-copy p {
    margin: 0;
    color: var(--mrdoc-muted);
    font-size: 15px;
    line-height: 1.8;
}

.home-empty-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    margin-top: 22px;
    padding: 0 18px;
    border-radius: 10px;
    color: #fff;
    background: var(--mrdoc-primary);
    box-shadow: 0 8px 20px rgba(37, 99, 235, .22);
}

.home-empty-action:hover {
    color: #fff;
    background: var(--mrdoc-primary-dark);
}

.mrdoc-home-page .project-list-page {
    margin: 26px 0 10px;
}

.mrdoc-home-page .layui-laypage a,
.mrdoc-home-page .layui-laypage span {
    border-radius: 8px;
}

.mrdoc-site-footer {
    width: 100%;
    margin-top: 48px;
    border-top: 1px solid var(--mrdoc-line);
    color: #8791a3;
    text-align: center;
    background: rgba(255, 255, 255, .62);
}

.mrdoc-site-footer .site-footer-inner {
    box-sizing: border-box;
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 22px 0;
    font-size: 13px;
}

.mrdoc-site-footer a {
    color: #687386;
}

.mrdoc-site-footer a:hover {
    color: var(--mrdoc-primary);
}

@media screen and (max-width: 768px) {
    .mrdoc-site-header {
        height: 60px;
    }

    .mrdoc-site-header .site-header-inner {
        display: flex;
        justify-content: space-between;
        width: calc(100% - 28px);
    }

    .mrdoc-site-header .logo img {
        height: 30px;
    }

    .mrdoc-site-header .layui-nav .layui-nav-item {
        line-height: 60px;
    }

    .mrdoc-site-header .header-mobile-search {
        margin-left: auto;
        padding: 0 8px;
    }

    .home-main {
        width: calc(100% - 28px);
        min-height: calc(100vh - 158px);
    }

    .home-hero {
        display: block;
        padding: 34px 0 22px;
    }

    .home-hero h1 {
        font-size: 30px;
    }

    .home-toolbar {
        margin-top: 24px;
        overflow: visible;
    }

    .home-toolbar .layui-inline {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .home-toolbar .layui-input-inline,
    .home-toolbar .layui-input-inline:first-child {
        left: auto !important;
        width: 100%;
    }

    .home-toolbar .layui-input-inline:first-child {
        grid-column: 1 / -1;
    }

    .mrdoc-home-page .project-list-content {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .home-empty {
        grid-template-columns: 1fr;
        gap: 16px;
        min-height: 0;
        padding: 28px 24px 32px;
        text-align: center;
    }

    .home-empty img {
        max-height: 190px;
    }

    .home-empty-copy h2 {
        font-size: 22px;
    }

    .mrdoc-site-footer .site-footer-inner {
        width: calc(100% - 28px);
    }
}
