:root {
    --text-main: #2a3f58;
    --text-muted: #5f738a;
    --line: #e7edf3;
    --analyst-bg: #e7dfea;
    --diplomat-bg: #dbece6;
    --sentinel-bg: #dbe8f2;
    --explorer-bg: #eee4d5;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Red Hat Display", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text-main);
    background: #fff;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p, a, span, div { font-family: inherit; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.topbar-inner {
    max-width: none;
    margin: 0 auto;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
}

.brand { font-size: 24px; font-weight: 700; color: #5b6def; }
.main-nav { display: flex; gap: 24px; font-size: 14px; color: var(--text-muted); }
.main-nav .active { color: var(--text-main); font-weight: 600; }
.lang { font-size: 13px; color: var(--text-muted); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }

.page {
    max-width: none;
    margin: 0 auto;
    padding: 40px 0 0;
    margin-top: 0px;
}

.page a, button  {
    text-decoration: none;
    outline: none;
}

.hero h1 {
    margin: 14px 0 18px;
    padding: 0 16px;
    font-size: clamp(34px, 4.5vw, 56px);
    line-height: 1.06;
    font-weight: 700;
}

.group {
    margin: 0;
    position: relative;
    overflow: hidden;
    padding: 22px 16px 24px;
}

/* 默认不显示折线，避免分组之间出现白色空白 */
.group::before {
    content: "";
    display: none;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 42px;
    background: #fff;
    clip-path: polygon(0 0, 0 72%, 15% 86%, 35% 62%, 58% 84%, 80% 58%, 100% 78%, 100% 0);
    z-index: 1;
}

/* 仅首个分组保留顶部折线过渡 */
.group:first-of-type {
    padding-top: 32px;
}

.group:first-of-type::before {
    display: block;
}

.group h2 {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    text-align: center;
    font-size: clamp(56px, 10vw, 128px);
    line-height: 1;
    color: rgba(255, 255, 255, 0.48);
    letter-spacing: 0.02em;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.group-analyst { background: var(--analyst-bg); }
.group-diplomat { background: var(--diplomat-bg); }
.group-sentinel { background: var(--sentinel-bg); }
.group-explorer { background: var(--explorer-bg); }

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 16px;
    position: relative;
    z-index: 2;
    margin-top: 26px;
}

.type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 4px;
    position: relative;
    z-index: 3;
    cursor: pointer;
    transform: translateY(0);
    transition: transform 220ms ease, filter 220ms ease;
    will-change: transform;
}

.type-card:hover {
    transform: translateY(-10px);
}

.type-card:active {
    transform: translateY(-4px);
}

.avatar { margin: 0 auto 6px; }
.avatar-image {
    width: clamp(146px, 12.5vw, 196px);
    height: clamp(146px, 12.5vw, 196px);
    display: block;
}
.avatar figcaption { display: none; }

.type-card h3 {
    margin: 0 0 2px;
    font-size: clamp(19px, 2.1vw, 34px);
    line-height: 1.25;
    font-weight: 700;
    color: rgba(40, 54, 74, 0.9);
}

.type-card .type-code {
    margin: 0 0 6px;
    font-size: clamp(14px, 1.28vw, 20px);
    line-height: 1.2;
    font-weight: 700;
    color: rgba(40, 54, 74, 0.92);
}

.type-card p {
    margin: 0;
    font-size: clamp(12px, 1.15vw, 17px);
    line-height: 1.5;
    color: rgba(58, 74, 96, 0.9);
    max-width: 20ch;
}

.site-footer { display: none; }

@media (max-width: 1024px) {
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
    .type-card p { max-width: 28ch; }
}

@media (max-width: 720px) {
    .topbar-inner { flex-wrap: wrap; justify-content: center; }
    .main-nav { order: 3; width: 100%; justify-content: center; }
    .group { margin: 0; padding: 18px 12px 22px; }
    .group::before { height: 30px; }
    .group:first-of-type { padding-top: 24px; }
    .card-grid { grid-template-columns: 1fr; gap: 12px; }
    .group h2 { top: 14px; font-size: clamp(46px, 16vw, 80px); }
    .type-card p { max-width: 34ch; }
}
