:root {
    --ink: #2f2117;
    --ink-soft: #695544;
    --paper-1: #f8efde;
    --paper-2: #e3cdab;
    --panel: rgba(255, 248, 234, 0.86);
    --line: rgba(108, 72, 42, 0.22);
    --shadow: 0 16px 34px rgba(65, 39, 19, 0.15);
    --accent: #a64b1d;
    --accent-strong: #742f11;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

.datav-body {
    min-height: 100vh;
    color: var(--ink);
    font-family: "STKaiti", "KaiTi", "SimSun", serif;
    background:
        radial-gradient(circle at 88% 10%, rgba(113, 66, 34, 0.22) 0, transparent 36%),
        radial-gradient(circle at 10% 12%, rgba(183, 121, 70, 0.24) 0, transparent 38%),
        linear-gradient(180deg, var(--paper-1) 0%, var(--paper-2) 100%);
    position: relative;
}

.datav-body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.18;
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 34px,
            rgba(118, 81, 49, 0.05) 35px
        );
}

.datav-shell {
    width: min(1180px, calc(100% - 2rem));
    margin: 1rem auto 2rem;
    position: relative;
    z-index: 1;
}

.home-top {
    position: sticky;
    top: 0.8rem;
    z-index: 9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.72rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--panel);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.brand-logo {
    width: auto;
    height: 64px;
    max-width: 64px;
    border-radius: 12px;
    border: 1px solid rgba(118, 75, 39, 0.24);
    object-fit: contain;
    background: #fff5e2;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-text strong {
    font-size: clamp(1.35rem, 2.1vw, 1.7rem);
    letter-spacing: 0.05em;
}

.brand-text small {
    margin-top: 0.1rem;
    letter-spacing: 0.2em;
    color: var(--ink-soft);
    font-size: 0.76rem;
}

.top-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.top-links a {
    border-radius: 999px;
    border: 1px solid rgba(123, 78, 44, 0.2);
    color: #fff8ec;
    background: linear-gradient(120deg, var(--accent-strong) 0%, var(--accent) 100%);
    padding: 0.38rem 0.84rem;
    box-shadow: 0 8px 15px rgba(111, 52, 21, 0.22);
    transition: all 0.24s ease;
}

.top-links a:hover {
    transform: translateY(-2px);
    filter: saturate(1.12);
    box-shadow: 0 11px 18px rgba(111, 52, 21, 0.3);
}

.top-links .is-active {
    border-color: rgba(255, 229, 197, 0.28);
    background: linear-gradient(120deg, #6a2a10 0%, #8d3714 100%);
    box-shadow: 0 10px 18px rgba(96, 40, 15, 0.28);
}

.hero {
    margin-top: 1rem;
    border-radius: 24px;
    padding: clamp(1.2rem, 3vw, 2.2rem);
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.82fr);
    gap: 1rem;
    color: #f8f0e4;
    background:
        radial-gradient(circle at 74% 38%, rgba(194, 112, 58, 0.22) 0, transparent 34%),
        linear-gradient(112deg, rgba(58, 31, 18, 0.94) 0%, rgba(120, 57, 27, 0.88) 56%, rgba(50, 29, 16, 0.9) 100%);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    animation: rise 0.72s ease both;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    border: 1px solid rgba(255, 228, 196, 0.25);
    pointer-events: none;
}

.hero-kicker {
    font-size: 0.82rem;
    letter-spacing: 0.2em;
    opacity: 0.84;
}

.hero h1 {
    margin-top: 0.25rem;
    margin-bottom: 0.6rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: 0.05em;
}

.hero-main p {
    max-width: 56ch;
    line-height: 1.72;
}

.hero-tags {
    margin-top: 0.82rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hero-tags span {
    border-radius: 999px;
    padding: 0.28rem 0.72rem;
    border: 1px solid rgba(255, 227, 194, 0.32);
    background: rgba(255, 241, 220, 0.08);
}

.hero-stats {
    display: grid;
    gap: 0.55rem;
}

.hero-stats article {
    border-radius: 12px;
    border: 1px solid rgba(255, 225, 191, 0.25);
    background: rgba(255, 246, 230, 0.08);
    padding: 0.6rem 0.74rem;
}

.hero-stats h3 {
    font-size: 1.62rem;
    line-height: 1.1;
}

.hero-stats p {
    margin-top: 0.2rem;
    color: #f2e4d1;
}

.module {
    margin-top: 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    padding: 1rem;
    animation: rise 0.78s ease both;
}

.overview {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.overview article {
    border-radius: 14px;
    border: 1px solid rgba(119, 80, 48, 0.2);
    background: rgba(255, 251, 243, 0.88);
    padding: 0.8rem;
}

.overview h3 {
    font-size: 1.38rem;
    color: var(--accent-strong);
}

.overview p {
    margin-top: 0.32rem;
    color: var(--ink-soft);
    line-height: 1.62;
}

.lab-head h2 {
    font-size: 1.58rem;
    color: var(--accent-strong);
}

.lab-head p {
    margin-top: 0.22rem;
    color: var(--ink-soft);
}

.switches {
    margin-top: 0.76rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.switch {
    border: 1px solid rgba(121, 82, 50, 0.24);
    border-radius: 999px;
    background: rgba(255, 247, 232, 0.7);
    color: #4b3626;
    padding: 0.36rem 0.86rem;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.22s ease;
}

.switch:hover {
    transform: translateY(-1px);
}

.switch.is-active {
    color: #fff8ed;
    border-color: transparent;
    background: linear-gradient(120deg, var(--accent-strong) 0%, var(--accent) 100%);
    box-shadow: 0 6px 13px rgba(111, 51, 19, 0.25);
}

.lab-grid {
    margin-top: 0.85rem;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
}

.trend-panel,
.compare-panel {
    border-radius: 14px;
    border: 1px solid rgba(121, 82, 50, 0.2);
    background: rgba(255, 251, 243, 0.9);
    padding: 0.86rem;
}

.trend-panel h3 {
    color: var(--accent-strong);
    font-size: 1.3rem;
}

.trend-panel p {
    margin-top: 0.3rem;
    line-height: 1.64;
    color: var(--ink-soft);
}

.trend-list {
    margin-top: 0.74rem;
    list-style: none;
    display: grid;
    gap: 0.52rem;
}

.trend-list li {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 66px;
    align-items: center;
    gap: 0.56rem;
}

.trend-list .stage {
    color: #4a3524;
}

.trend-list .bar {
    border-radius: 999px;
    height: 10px;
    background: rgba(214, 184, 149, 0.48);
    overflow: hidden;
}

.trend-list .bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #c0622f 0%, #8b3a16 100%);
}

.trend-list strong {
    text-align: right;
    color: #3e2c1f;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.52rem;
    margin-bottom: 0.75rem;
}

.stat-row div {
    border-radius: 10px;
    border: 1px solid rgba(121, 82, 50, 0.18);
    background: rgba(255, 246, 231, 0.88);
    padding: 0.5rem;
    text-align: center;
}

.stat-row span {
    display: block;
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.stat-row strong {
    display: block;
    margin-top: 0.18rem;
    font-size: 1.1rem;
    color: #3d2b1e;
}

.compare-panel h4 {
    color: var(--accent-strong);
    margin-bottom: 0.5rem;
}

.compare-list {
    list-style: none;
    display: grid;
    gap: 0.44rem;
}

.compare-list li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 34px;
    gap: 0.5rem;
    align-items: center;
}

.compare-list .line {
    border-radius: 999px;
    height: 8px;
    background: rgba(214, 184, 149, 0.45);
    overflow: hidden;
}

.compare-list .line i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #b85225 0%, #803714 100%);
}

.compare-list strong {
    text-align: right;
}

.footnote {
    margin-top: 0.92rem;
    text-align: center;
    color: #5d4938;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 980px) {
    .home-top {
        position: static;
        flex-direction: column;
        align-items: flex-start;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lab-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 640px) {
    .datav-shell {
        width: calc(100% - 1rem);
        margin-top: 0.56rem;
    }

    .home-top {
        padding: 0.8rem 0.85rem;
        gap: 0.8rem;
    }

    .brand {
        width: 100%;
        min-width: 0;
    }

    .brand-text {
        min-width: 0;
    }

    .brand-text strong {
        font-size: 1.18rem;
        line-height: 1.1;
    }

    .brand-text small {
        font-size: 0.66rem;
        letter-spacing: 0.12em;
        line-height: 1.25;
    }

    .top-links {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        justify-content: stretch;
        gap: 0.35rem;
    }

    .top-links a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        text-align: center;
        white-space: nowrap;
        font-size: 0.88rem;
        letter-spacing: 0.01em;
        padding: 0.42rem 0.18rem;
    }

    .brand-logo {
        width: auto;
        height: 56px;
        max-width: 56px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .overview {
        grid-template-columns: 1fr;
    }

    .trend-list li {
        grid-template-columns: 50px minmax(0, 1fr) 62px;
    }

    .stat-row {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 420px) {
    .brand-text strong {
        font-size: 1.08rem;
    }

    .brand-text small {
        font-size: 0.6rem;
        letter-spacing: 0.08em;
    }

    .top-links {
        gap: 0.28rem;
    }

    .top-links a {
        font-size: 0.8rem;
        padding: 0.4rem 0.1rem;
    }
}
