:root {
    --ink: #111c32;
    --muted: #63708a;
    --line: #dbe6f8;
    --blue: #1671f9;
    --purple: #6d4ff6;
    --orange: #ee7817;
    --green: #13a976;
}

* { box-sizing: border-box; }

html,
body { min-height: 100%; }

body {
    margin: 0;
    color: var(--ink);
    background: #f7fbff url('../images/bg-body.png') center top / cover fixed no-repeat;
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

button,
a { font-family: inherit; }

.matrix-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.matrix-shell {
    width: min(1410px, calc(100% - 80px));
    margin: 0 auto;
    flex: 1;
    padding: 40px 0 26px;
}

.matrix-hero {
    position: relative;
    text-align: center;
    margin-bottom: 30px;
}

.matrix-hero::after {
    content: "让 AI 落地业务\A创造真实价值";
    white-space: pre;
    position: absolute;
    right: 35px;
    top: 42px;
    color: #8db9ff;
    font-size: 17px;
    line-height: 1.7;
    letter-spacing: 3px;
    transform: rotate(-8deg);
}

.matrix-hero__eyebrow {
    display: block;
    margin-bottom: 14px;
    color: #5c98ee;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 6px;
}

.matrix-hero h1 {
    margin: 0;
    font-size: clamp(36px, 3.8vw, 58px);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: 1px;
    overflow-wrap: anywhere;
}

.matrix-hero h1 strong {
    position: relative;
    margin-right: 10px;
    color: var(--blue);
}

.matrix-hero h1 strong::after {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: -11px;
    height: 4px;
    border-radius: 4px;
    background: #78aaff;
}

.matrix-hero p {
    margin: 18px 0 0;
    color: #58647b;
    font-size: 18px;
}

.matrix-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 38px;
}

.matrix-tab {
    --accent: var(--blue);
    --soft: #eaf3ff;
    position: relative;
    min-width: 0;
    height: 94px;
    display: grid;
    grid-template-columns: 52px 1fr 48px;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--ink);
    text-align: left;
    border: 1px solid #dfe8f6;
    border-radius: 15px;
    background: rgba(255,255,255,.82);
    box-shadow: 0 8px 28px rgba(53, 90, 145, .05);
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.matrix-tab--purple { --accent: var(--purple); --soft: #f0edff; }
.matrix-tab--orange { --accent: var(--orange); --soft: #fff0e4; }
.matrix-tab--green { --accent: var(--green); --soft: #e7f8f2; }

.matrix-tab:hover { transform: translateY(-2px); }

.matrix-tab.active {
    border-color: var(--accent);
    box-shadow: 0 9px 26px rgba(44, 112, 224, .13), inset 0 0 0 1px var(--accent);
}

.matrix-tab__number,
.matrix-tab__mark {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    background: var(--soft);
}

.matrix-tab__number {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 17px;
    font-weight: 800;
}

.matrix-tab.active .matrix-tab__number {
    color: #fff;
    background: var(--accent);
    box-shadow: 0 8px 18px rgba(22,113,249,.22);
}

.matrix-tab__copy { min-width: 0; }
.matrix-tab__copy strong,
.matrix-tab__copy small { display: block; }
.matrix-tab__copy strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 18px;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.matrix-tab__copy small {
    margin-top: 5px;
    color: #7a879f;
    font-size: 13px;
    white-space: nowrap;
}

.matrix-tab__mark {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 23px;
}

.agent-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}

.featured-agent {
    --accent: var(--blue);
    position: relative;
    min-height: 570px;
    display: block;
    overflow: hidden;
    border: 1px solid #cfe1fb;
    border-radius: 16px;
    background-color: #e9f4ff;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    box-shadow: 0 18px 44px rgba(46,100,174,.11);
}

.featured-agent.green,
.agent-card.green { --accent: var(--green); --soft: #e7f9f2; }
.featured-agent.yellow,
.agent-card.yellow { --accent: var(--orange); --soft: #fff1e5; }
.featured-agent.purple,
.agent-card.purple { --accent: var(--purple); --soft: #f0edff; }
.featured-agent.red,
.agent-card.red { --accent: #e65757; --soft: #fff0f0; }

.featured-agent__content {
    position: relative;
    z-index: 2;
    width: 55%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px 18px 40px 38px;
}

.featured-agent__eyebrow {
    color: #6594d5;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
}

.featured-agent h2 {
    margin: 25px 0 10px;
    font-size: clamp(27px, 2.1vw, 36px);
    line-height: 1.25;
}

.featured-agent__lead {
    margin: 0 0 26px;
    color: #53617a;
    font-size: 17px;
}

.featured-agent__desc {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #56647d;
    font-size: 15px;
    line-height: 2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.featured-agent__count {
    align-self: flex-start;
    margin-top: 24px;
    padding: 8px 14px;
    color: #51627d;
    font-size: 13px;
    line-height: 1;
    border: 1px solid rgba(22,113,249,.16);
    border-radius: 18px;
    background: rgba(255,255,255,.76);
    box-shadow: 0 6px 18px rgba(47,96,157,.08);
}

.featured-agent__count strong {
    margin: 0 3px;
    color: var(--accent);
    font-size: 18px;
}

.featured-agent__button {
    width: 250px;
    height: 56px;
    margin-top: 34px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    border: 0;
    border-radius: 30px;
    background: var(--accent);
    box-shadow: 0 12px 22px rgba(22,113,249,.22);
    cursor: pointer;
}

.featured-agent__button:hover { transform: translateY(-2px); }

.featured-agent__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 34px;
    color: #60718c;
    font-size: 13px;
}

.featured-agent__tags span + span::before {
    content: "|";
    margin: 0 11px;
    color: #9cabc0;
}

.agent-carousel {
    position: relative;
    min-width: 0;
    height: 100%;
}

.agent-carousel__viewport {
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
}

.agent-carousel__viewport::-webkit-scrollbar { display: none; }

.agent-carousel__track {
    height: 100%;
    display: flex;
}

.agent-carousel__page {
    flex: 0 0 100%;
    min-width: 0;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 18px;
    scroll-snap-align: start;
}

.agent-carousel__nav {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 38px;
    height: 38px;
    padding: 0;
    color: #fff;
    border: 3px solid rgba(255,255,255,.92);
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 8px 20px rgba(22,113,249,.25);
    cursor: pointer;
    transform: translateY(-50%);
}

.agent-carousel__nav--prev { left: -19px; }
.agent-carousel__nav--next { right: -19px; }
.agent-carousel__nav i { font-size: 18px; }
.agent-carousel__nav:hover { filter: brightness(1.06); }
.agent-carousel__nav:focus-visible { outline: 3px solid rgba(22,113,249,.28); outline-offset: 3px; }

.agent-card {
    --accent: var(--blue);
    --soft: #eaf3ff;
    position: relative;
    min-height: 276px;
    display: flex;
    flex-direction: column;
    padding: 12px;
    overflow: hidden;
    border: 1px solid #d8e4f5;
    border-radius: 15px;
    background: rgba(255,255,255,.88);
    box-shadow: 0 12px 34px rgba(60,96,145,.07);
    transition: transform .2s ease, box-shadow .2s ease;
}

.agent-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 38px rgba(60,96,145,.13);
}

.agent-card__image {
    flex: 0 0 auto;
    width: 100%;
    height: 105px;
    overflow: hidden;
    border-radius: 11px;
    background: var(--soft);
}

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

.agent-card h3 {
    margin: 9px 2px 4px;
    font-size: 17px;
    line-height: 1.45;
}

.agent-card p {
    display: -webkit-box;
    overflow: hidden;
    flex: 0 0 calc(2 * 1.55em);
    min-height: 0;
    margin: 0 2px;
    color: #64718a;
    font-size: 14px;
    line-height: 1.75;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.agent-card__button {
    position: static;
    flex: 0 0 auto;
    width: 100%;
    height: 36px;
    margin-top: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    border: 0;
    border-radius: 18px;
    background: var(--accent);
    box-shadow: 0 6px 14px color-mix(in srgb, var(--accent) 22%, transparent);
    cursor: pointer;
}

.agent-card__button i { margin-left: 5px; font-size: 13px; }

.agent-empty {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe6f6;
    border-radius: 16px;
    background: rgba(255,255,255,.72);
}

.agent-empty img { width: 96px; }
.agent-empty h2 { margin: 18px 0 8px; font-size: 22px; }
.agent-empty p { margin: 0; color: var(--muted); }

.compatibility-swiper { display: none !important; }

.matrix-footer {
    flex: 0 0 auto;
    margin-top: 20px;
    padding: 0 0 34px;
    color: #6b6d70;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

.matrix-footer a { color: #1570ef; text-decoration: none; }
.matrix-footer img { width: 15px; height: 15px; vertical-align: -3px; }

/* 桌面端锁定为一屏展示，主体区域随浏览器高度自动收缩。 */
@media (min-width: 901px) {
    html,
    body {
        height: 100%;
        overflow: hidden;
    }

    .matrix-page {
        height: 100vh;
        min-height: 0;
        overflow: hidden;
    }

    .matrix-shell {
        width: min(1440px, calc(100% - 80px));
        max-width: 1440px;
        min-height: 0;
        display: block;
        padding: clamp(26px, 4.2vh, 44px) 0 0;
    }

    .matrix-hero { margin-bottom: clamp(22px, 3.5vh, 37px); }

    .matrix-hero__eyebrow {
        margin-bottom: clamp(7px, 1.3vh, 14px);
        font-size: clamp(10px, 1.25vh, 13px);
    }

    .matrix-hero h1 {
        font-size: clamp(36px, 5.3vh, 56px);
        line-height: 1.1;
    }

    .matrix-hero h1 strong::after { bottom: clamp(-10px, -.8vh, -7px); }

    .matrix-hero p {
        margin-top: clamp(10px, 1.7vh, 18px);
        font-size: clamp(14px, 1.7vh, 18px);
    }

    .matrix-hero::after {
        top: clamp(26px, 4vh, 42px);
        font-size: clamp(14px, 1.6vh, 17px);
    }

    .matrix-tabs {
        height: clamp(68px, 9.2vh, 94px);
        margin-bottom: clamp(24px, 3.8vh, 40px);
    }

    .matrix-tab {
        height: 100%;
        grid-template-columns: clamp(42px, 5vh, 52px) minmax(0, 1fr) clamp(40px, 4.6vh, 48px);
        gap: clamp(8px, 1.15vh, 12px);
        padding: clamp(8px, 1.15vh, 12px) 16px;
    }

    .matrix-tab__number {
        width: clamp(42px, 5vh, 52px);
        height: clamp(42px, 5vh, 52px);
        font-size: clamp(14px, 1.6vh, 17px);
    }

    .matrix-tab__copy strong { font-size: clamp(15px, 1.7vh, 18px); }
    .matrix-tab__copy small {
        margin-top: clamp(2px, .45vh, 5px);
        font-size: clamp(11px, 1.25vh, 13px);
    }

    .matrix-tab__mark {
        width: clamp(40px, 4.6vh, 48px);
        height: clamp(40px, 4.6vh, 48px);
        font-size: clamp(19px, 2.2vh, 23px);
    }

    .agent-layout {
        min-height: 0;
        height: min(55.6vh, 588px);
        max-height: none;
    }

    .featured-agent {
        min-height: 0;
        height: 100%;
    }

    .featured-agent__content {
        justify-content: flex-start;
        padding: clamp(34px, 4.7vh, 50px) 0 clamp(18px, 3.6vh, 38px) clamp(28px, 3.6vh, 38px);
    }

    .featured-agent h2 {
        margin: clamp(13px, 2.35vh, 25px) 0 clamp(7px, 1vh, 10px);
        font-size: clamp(25px, 3vh, 32px);
    }

    .featured-agent__lead {
        margin-bottom: clamp(14px, 2.45vh, 26px);
        font-size: clamp(15px, 1.55vh, 16px);
    }

    .featured-agent__desc {
        max-width: 290px;
        font-size: clamp(13px, 1.5vh, 16px);
        line-height: 1.85;
        -webkit-line-clamp: 4;
    }

    .featured-agent__button {
        width: clamp(220px, 18vw, 270px);
        height: clamp(46px, 5.4vh, 56px);
        margin-top: clamp(17px, 3.2vh, 34px);
        font-size: clamp(16px, 1.7vh, 18px);
    }

    .featured-agent__tags {
        margin-top: clamp(16px, 3.2vh, 34px);
        font-size: clamp(11px, 1.25vh, 13px);
    }

    .agent-carousel,
    .agent-carousel__viewport,
    .agent-carousel__track,
    .agent-carousel__page {
        min-height: 0;
        height: 100%;
    }

    .agent-carousel__page {
        grid-template-rows: repeat(2, minmax(0, 1fr));
    }

    .agent-card {
        min-height: 0;
        padding: clamp(9px, 1.15vh, 12px);
    }

    .agent-card__image {
        width: 100%;
        height: clamp(90px, 11.45vh, 108px);
        border-radius: clamp(8px, 1.1vh, 11px);
    }

    .agent-card h3 {
        margin: clamp(6px, .9vh, 9px) 2px clamp(2px, .4vh, 4px);
        font-size: clamp(15px, 1.7vh, 17px);
    }

    .agent-card p {
        font-size: clamp(13px, 1.35vh, 14px);
        line-height: 1.55;
    }

    .agent-card__button {
        width: 100%;
        height: clamp(30px, 3.6vh, 36px);
        margin-top: clamp(5px, .8vh, 8px);
        font-size: clamp(12px, 1.35vh, 14px);
    }

    .agent-empty {
        min-height: 0;
        height: min(55.6vh, 588px);
        max-height: none;
    }

    .matrix-footer {
        margin-top: 20px;
        padding: 0 0 34px;
        line-height: 1.4;
    }
}

@media (min-width: 901px) and (max-height: 820px) {
    .agent-card__image { height: clamp(72px, 9.5vh, 78px); }
}

@media (min-width: 901px) and (max-width: 1050px) {
    .matrix-shell { width: calc(100% - 40px); }
    .matrix-tab { grid-template-columns: 46px minmax(0, 1fr); }
    .matrix-tab__number { width: 46px; height: 46px; }
    .matrix-tab__mark { display: none; }
    .matrix-hero::after { display: none; }
}

@media (max-width: 900px) {
    .matrix-shell { width: min(calc(100% - 28px), 760px); padding-top: 28px; }
    .matrix-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .agent-layout { grid-template-columns: 1fr; }
    .featured-agent { min-height: 460px; grid-template-columns: 1fr; }
    .featured-agent__content { width: 100%; padding-right: 36px; }
    .agent-carousel__page { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .matrix-shell { width: calc(100% - 24px); padding-top: 22px; }
    .matrix-hero { margin-bottom: 24px; }
    .matrix-hero__eyebrow { font-size: 10px; letter-spacing: 3px; }
    .matrix-hero h1 { font-size: 29px; }
    .matrix-hero p { font-size: 14px; line-height: 1.7; }
    .matrix-tabs { gap: 10px; }
    .matrix-tab { height: 82px; grid-template-columns: 38px minmax(0, 1fr); gap: 9px; padding: 10px; border-radius: 12px; overflow: hidden; }
    .matrix-tab__number { width: 38px; height: 38px; font-size: 14px; }
    .matrix-tab__copy strong { font-size: 14px; }
    .matrix-tab__copy small { font-size: 11px; }
    .featured-agent { min-height: 500px; }
    .featured-agent__content { padding: 34px 24px; }
    .featured-agent__button { width: 210px; }
    .featured-agent__tags { display: none; }
    .agent-carousel__viewport { overflow-x: auto; }
    .agent-carousel__page { grid-template-columns: 1fr; grid-template-rows: none; height: auto; }
    .agent-carousel__nav { display: none; }
    .agent-card { min-height: 240px; }
    .matrix-footer { padding-inline: 18px; line-height: 1.8; }
}
