:root {
    --page-bg: #f8fafc;
    --surface: #ffffff;
    --ink: #0b1a2f;
    --muted: #526a84;
    --soft-muted: #8293a8;
    --navy: #1e2b3c;
    --line: #e4eaf2;
    --line-soft: #eef2f8;
    --chip-bg: #eef4fa;
    --shadow: 0 4px 12px rgba(12, 30, 52, 0.025), 0 1px 3px rgba(12, 30, 52, 0.035);
    --shadow-hover: 0 18px 34px -12px rgba(0, 20, 40, 0.2);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--page-bg);
}

body {
    margin: 0;
    padding: 32px 24px;
    color: var(--ink);
    background: var(--page-bg);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
}

img {
    display: block;
    max-width: 100%;
}

.page-shell {
    width: min(100%, 1440px);
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px 32px;
    padding-bottom: 18px;
    margin-bottom: 30px;
    border-bottom: 1px solid #e9edf4;
}

.logo-area {
    min-width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: var(--navy);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    font-size: 22px;
}

.logo-text {
    color: var(--ink);
    font-size: 26px;
    font-weight: 750;
    letter-spacing: -0.7px;
    line-height: 1;
}

.logo-text span {
    margin-left: 7px;
    color: #4b5b6e;
    font-size: 15px;
    font-weight: 450;
    letter-spacing: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.search-box {
    min-height: 42px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid #dce1ea;
    border-radius: 40px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.search-box:hover,
.search-box:focus-within {
    border-color: #8b9bb5;
    box-shadow: 0 3px 9px rgba(0, 20, 40, 0.07);
}

.search-box input {
    width: 210px;
    min-width: 0;
    padding: 10px 4px 10px 17px;
    color: #1a2a3a;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
}

.search-box input::placeholder {
    color: #8a99ac;
}

.search-box button {
    width: 42px;
    align-self: stretch;
    color: #64758a;
    background: transparent;
    cursor: pointer;
    transition: color .15s ease, background .15s ease;
}

.search-box button:hover {
    color: var(--navy);
    background: #f3f6fa;
}

.action-button,
.score-button {
    min-height: 42px;
    padding: 0 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: transform .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
}

.action-button:hover,
.score-button:hover {
    transform: translateY(-1px);
}

.action-outline {
    color: #1f3348;
    border: 1px solid #d0d8e3;
    background: transparent;
}

.action-outline:hover {
    border-color: #95a4b7;
    background: #fff;
}

.action-primary {
    color: #fff;
    border: 1px solid var(--navy);
    background: var(--navy);
}

.action-primary:hover {
    color: #fff;
    background: #111e2f;
}

.score-button {
    color: #294764;
    border: 1px solid #dbe5f0;
    background: #eef4fa;
}

.category-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 34px;
}

.category-tag {
    min-height: 36px;
    padding: 0 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #1f3348;
    border: 1px solid #e2e8f2;
    border-radius: 40px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    font-size: 14px;
    font-weight: 600;
    transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease;
}

.category-tag i {
    color: #708299;
    font-size: 12px;
}

.category-tag:hover {
    transform: translateY(-1px);
    border-color: #bac7d7;
}

.category-tag.active {
    color: #fff;
    border-color: var(--navy);
    background: var(--navy);
}

.category-tag.active i {
    color: #fff;
}

.resource-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.heading-copy {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.heading-mark {
    width: 4px;
    height: 48px;
    flex: 0 0 auto;
    border-radius: 8px;
    background: var(--navy);
}

.heading-copy h1 {
    margin: 0 0 6px;
    color: var(--ink);
    font-size: 21px;
    line-height: 1.25;
    letter-spacing: -0.3px;
}

.heading-copy p {
    margin: 0;
    color: #617997;
    font-size: 14px;
    line-height: 1.55;
}

.clear-filter {
    min-height: 36px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    color: #50647c;
    border: 1px solid #dfe6ef;
    border-radius: 30px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
}

.clear-filter:hover {
    color: var(--ink);
    border-color: #b9c6d6;
}

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(312px, 1fr));
    gap: 24px;
}

.workflow-card {
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.workflow-card:hover {
    transform: translateY(-5px);
    border-color: #d3deec;
    box-shadow: var(--shadow-hover);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 7 / 10;
    overflow: hidden;
    display: block;
    border-bottom: 1px solid var(--line-soft);
    background: #eef3f9;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .35s ease;
}

.workflow-card:hover .card-image {
    transform: scale(1.025);
}

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 11px;
    color: #395a7c;
    background:
        radial-gradient(circle at 75% 18%, rgba(255, 255, 255, .78), transparent 28%),
        linear-gradient(145deg, #dce7f3, #bdcee0);
}

.placeholder-icon {
    width: 68px;
    height: 68px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #45698e;
    border: 1px solid rgba(70, 105, 143, .16);
    border-radius: 18px;
    background: rgba(255, 255, 255, .58);
    font-size: 29px;
}

.placeholder-text {
    padding: 5px 13px;
    border-radius: 30px;
    color: #4c6782;
    background: rgba(255, 255, 255, .68);
    font-size: 12px;
    font-weight: 650;
}

.image-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    max-width: calc(100% - 24px);
    padding: 6px 11px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    border-radius: 30px;
    background: rgba(12, 24, 39, .68);
    backdrop-filter: blur(5px);
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-content {
    min-height: 132px;
    padding: 12px 15px 12px;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.card-badge-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
}

.badge-type,
.card-price {
    min-width: 0;
    padding: 5px 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
}

.badge-type {
    max-width: 68%;
    overflow: hidden;
    color: #1a3a59;
    background: var(--chip-bg);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge-type:hover {
    color: #08192c;
    background: #e3edf7;
}

.card-price {
    flex: 0 0 auto;
    color: #637890;
    background: #f2f6fb;
}

.card-title {
    margin: 0 0 6px;
    color: #0a1a2b;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.card-title a {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-title a:hover {
    color: #355a80;
}

.card-desc {
    min-height: 38px;
    margin: 0 0 10px;
    overflow: hidden;
    display: -webkit-box;
    color: #536b84;
    font-size: 13px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-desc-only {
    color: #5d7288;
}

.card-meta {
    margin-top: auto;
    padding-top: 9px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #71869d;
    border-top: 1px solid #edf2f9;
    font-size: 12px;
}

.meta-left,
.meta-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.meta-date {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-button {
    margin-left: auto;
    padding: 5px 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    color: #254666;
    border: 1px solid #dbe3ef;
    border-radius: 30px;
    background: #f0f5fe;
    font-weight: 700;
}

.detail-button:hover {
    color: #fff;
    border-color: var(--navy);
    background: var(--navy);
}

.pagination-wrap {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    list-style: none;
}

.pagination > li > a,
.pagination > li > span {
    min-width: 39px;
    height: 39px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4f6379;
    border: 1px solid #dfe6ef;
    border-radius: 11px;
    background: #fff;
    font-size: 13px;
}

.pagination > .active > span,
.pagination > li > a:hover {
    color: #fff;
    border-color: var(--navy);
    background: var(--navy);
}

.pagination > .disabled > span {
    color: #b2bdca;
    background: #f4f6f9;
}

.empty-state {
    min-height: 330px;
    padding: 55px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    border: 1px dashed #cbd5e2;
    border-radius: 20px;
    background: #fff;
}

.empty-icon {
    width: 74px;
    height: 74px;
    margin-bottom: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7890a8;
    border-radius: 22px;
    background: #edf3f9;
    font-size: 31px;
}

.empty-state h2 {
    margin: 0 0 8px;
    font-size: 21px;
}

.empty-state p {
    max-width: 560px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.empty-button {
    min-height: 40px;
    margin-top: 20px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 30px;
    background: var(--navy);
    font-size: 14px;
    font-weight: 650;
}

.site-footer {
    margin-top: 58px;
    padding: 24px 0 4px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 24px;
    color: #60758d;
    border-top: 1px solid #e2e9f2;
    font-size: 13px;
}

.footer-brand,
.footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-brand {
    color: #1a2f47;
    font-weight: 600;
}

.footer-links {
    justify-content: flex-end;
    gap: 18px;
}

.footer-links span {
    white-space: nowrap;
}

.footer-links i,
.footer-brand i {
    margin-right: 4px;
    color: #7d96b2;
}

.copyright {
    grid-column: 1 / -1;
    color: #8998aa;
    font-size: 12px;
}

.copyright a {
    margin-left: 8px;
    color: #687d95;
}

@media (max-width: 1080px) {
    .site-header {
        align-items: flex-start;
    }

    .header-actions {
        flex: 1;
    }

    .workflow-grid {
        grid-template-columns: repeat(auto-fill, minmax(281px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 760px) {
    body {
        padding: 20px 15px;
    }

    .site-header {
        align-items: stretch;
        flex-direction: column;
        margin-bottom: 24px;
    }

    .header-actions {
        justify-content: flex-start;
    }

    .search-box {
        flex: 1 1 100%;
        order: 1;
    }

    .search-box input {
        width: auto;
        flex: 1;
    }

    .action-button,
    .score-button {
        min-height: 39px;
        padding: 0 14px;
    }

    .category-bar {
        margin-bottom: 27px;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
        scrollbar-width: thin;
    }

    .category-tag {
        flex: 0 0 auto;
    }

    .resource-heading {
        align-items: flex-start;
    }

    .heading-copy h1 {
        font-size: 19px;
    }

    .workflow-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .card-content {
        min-height: 126px;
        padding: 12px 12px 11px;
    }

    .card-badge-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .badge-type {
        max-width: 100%;
    }

    .card-desc {
        min-height: 32px;
        margin-bottom: 9px;
        font-size: 12px;
        line-height: 1.45;
    }

    .card-meta {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 7px 10px;
    }

    .detail-button {
        margin-left: 0;
    }

    .site-footer {
        grid-template-columns: 1fr;
    }

    .footer-links {
        justify-content: flex-start;
    }

    .copyright {
        grid-column: 1;
    }
}

@media (max-width: 520px) {
    body {
        padding: 12px 6px;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 19px;
    }

    .logo-text {
        font-size: 22px;
    }

    .logo-text span {
        font-size: 13px;
    }

    .header-actions {
        gap: 7px;
    }

    .action-button,
    .score-button {
        padding: 0 12px;
        font-size: 13px;
    }

    .resource-heading {
        flex-direction: column;
        gap: 12px;
    }

    .heading-mark {
        height: 42px;
    }

    .workflow-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .workflow-card {
        border-radius: 18px;
    }

    .card-content {
        min-height: 0;
        padding: 11px 12px 10px;
    }

    .card-badge-row {
        flex-direction: row;
    }

    .card-meta {
        align-items: center;
        flex-wrap: nowrap;
    }

    .detail-button {
        margin-left: auto;
    }

    .footer-links {
        gap: 10px 16px;
    }
}


/* ===== 发布者公开资源主页 ===== */
.publisher-hero {
    margin-bottom: 34px;
    padding: 30px 34px;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow);
}
.publisher-avatar {
    width: 82px;
    height: 82px;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 50%;
    background: linear-gradient(145deg, #35445a, #111e2f);
    font-size: 30px;
    font-weight: 800;
}
.publisher-avatar img { width: 100%; height: 100%; object-fit: cover; }
.publisher-eyebrow { color: #72859a; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.publisher-copy h1 { margin: 7px 0 6px; font-size: 30px; line-height: 1.2; }
.publisher-copy p { margin: 0; color: var(--muted); font-size: 14px; }
.publisher-stats { display: flex; gap: 12px; }
.publisher-stats div {
    min-width: 112px;
    padding: 15px 17px;
    text-align: center;
    border-radius: 15px;
    background: #f2f5f9;
}
.publisher-stats strong { display: block; color: var(--ink); font-size: 22px; }
.publisher-stats span { display: block; margin-top: 4px; color: #72859a; font-size: 11px; }
.publisher-resource-heading { margin-top: 0; }

@media (max-width: 760px) {
    .publisher-hero {
        padding: 24px 20px;
        grid-template-columns: 66px minmax(0, 1fr);
    }
    .publisher-avatar { width: 66px; height: 66px; }
    .publisher-stats { grid-column: 1 / -1; }
    .publisher-stats div { flex: 1; min-width: 0; }
}
@media (max-width: 520px) {
    .publisher-hero { grid-template-columns: 1fr; text-align: center; }
    .publisher-avatar { margin: 0 auto; }
    .publisher-copy h1 { font-size: 25px; }
}
