/* === 设计变量与基础设置 === */
:root {
    /* 色板 */
    --color-dark: #271334;
    --color-paper: #E9E8EA;
    --color-text: #1D1523;
    --color-brand: #8A13DD;
    --color-accent: #9EED6E;
    
    /* 几何与间距 */
    --radius-card: 20px;
    --radius-btn: 12px;
    --card-border: 2px solid var(--color-text);
    --card-shadow: 4px 4px 0 var(--color-text);
    --section-y: clamp(3.5rem, 7vw, 6rem);
    --gap: clamp(1rem, 2vw, 1.75rem);
    --content-max: 960px;
    
    /* 字体 */
    --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-main);
    line-height: 1.65;
    color: var(--color-text);
    background-color: var(--color-paper);
    -webkit-font-smoothing: antialiased;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    padding-left: 0;
    list-style: none;
}

/* === 布局容器 === */
.container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--gap);
}

.section {
    padding-top: var(--section-y);
    padding-bottom: var(--section-y);
}

.section--dark {
    background-color: var(--color-dark);
    color: var(--color-paper);
}

/* 深色面上的文字覆盖 */
.section--dark .hl {
    color: var(--color-accent);
}
.section--dark h2, .section--dark h3, .section--dark p, .section--dark li {
    color: var(--color-paper);
}
.section--dark .badge {
    color: var(--color-accent);
}
.section--dark a:not(.btn) {
    color: var(--color-accent);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* 纸面上的文字覆盖 */
.section--paper .hl {
    color: var(--color-brand);
}
.section--paper h2, .section--paper h3, .section--paper p, .section--paper li {
    color: var(--color-text);
}
.section--paper .badge {
    color: var(--color-brand);
}
.section--paper a:not(.btn) {
    color: var(--color-brand);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* === 排版 === */
h1, h2, h3, h4 {
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-top: 0;
}

h1 {
    font-size: clamp(2.6rem, 6.4vw, 5rem);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
    font-size: clamp(1rem, 1.1vw, 1.125rem);
}

.badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 1.5rem;
}

.badge::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: currentColor;
}

.hl {
    /* 高亮关键词样式由父级控制颜色 */
}

/* === 组件：按钮 === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 48px;
    padding: 0 24px;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    border: none;
    text-align: center;
}

.btn--primary {
    background-color: var(--color-accent);
    color: var(--color-dark);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}

.btn--primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.btn--primary:focus-visible {
    outline: 3px solid var(--color-paper);
    outline-offset: 2px;
}

.btn--secondary {
    background-color: transparent;
    border: 2px solid currentColor;
    color: inherit;
}

.btn--secondary:hover {
    background-color: rgba(128, 128, 128, 0.1);
}

/* === 组件：卡片 === */
.card {
    background-color: var(--color-paper);
    border: var(--card-border);
    box-shadow: var(--card-shadow);
    border-radius: var(--radius-card);
    padding: 2rem;
    transition: transform 0.2s ease;
}

.card--dark {
    background-color: var(--color-dark);
    border-color: var(--color-paper);
    box-shadow: 4px 4px 0 var(--color-paper);
    color: var(--color-paper);
}

.card--dark .hl {
    color: var(--color-accent);
}
.card--dark h3, .card--dark p {
    color: var(--color-paper);
}

/* === 组件：表格 === */
.table-wrapper {
    overflow-x: auto;
    border: var(--card-border);
    border-radius: var(--radius-card);
    background: var(--color-paper);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-text);
}

th {
    font-weight: 700;
    background-color: rgba(0,0,0,0.03);
}

tr:last-child td {
    border-bottom: none;
}

/* === 组件：FAQ === */
details {
    border: var(--card-border);
    border-radius: var(--radius-card);
    margin-bottom: 1rem;
    background: var(--color-paper);
    overflow: hidden;
}

summary {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 3rem;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 300;
}

details[open] summary::after {
    content: '−';
}

details p {
    margin: 0 1.5rem 1.5rem 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--color-text);
}

/* === 页头与页脚 === */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--color-paper);
    border-bottom: 1px solid var(--color-text);
    padding: 1rem 0;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo img {
    height: 32px;
    width: auto;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav__link {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav__link[aria-current="page"] {
    color: var(--color-brand);
    font-weight: 700;
}

.footer {
    background-color: var(--color-dark);
    color: var(--color-paper);
    padding: 4rem 0 2rem;
    margin-top: var(--section-y);
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__col h4 {
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer__links li {
    margin-bottom: 0.75rem;
}

.footer__links a {
    color: var(--color-paper);
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer__links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    opacity: 0.6;
}

/* === SVG 动效系统 === */
.svg-container {
    width: 100%;
    height: auto;
    overflow: visible;
}

/* 同心轨道呼吸 */
@keyframes orbit-breathe {
    0%, 100% {
        transform: scale(0.95);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

@keyframes orbit-breathe-alt {
    0%, 100% {
        transform: scale(1.05);
        opacity: 0.4;
    }
    50% {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

.anim-orbit {
    transform-origin: center;
    transform-box: fill-box;
    animation: orbit-breathe 6s ease-in-out infinite;
}

.anim-orbit-alt {
    transform-origin: center;
    transform-box: fill-box;
    animation: orbit-breathe-alt 8s ease-in-out infinite;
}

/* 描边绘制 */
@keyframes draw-line {
    0% {
        stroke-dashoffset: 1;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.anim-draw {
    pathLength: 1;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    animation: draw-line 2s ease forwards;
}

/* 浮动 */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.anim-float {
    animation: float 4s ease-in-out infinite;
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === 响应式调整 === */
@media (max-width: 768px) {
    .nav {
        display: none; /* 简化处理，实际项目需汉堡菜单 */
    }
    
    /* 移动端简单显示导航 */
    .nav.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-paper);
        padding: 1rem;
        border-bottom: 1px solid var(--color-text);
    }
    
    h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}

/* 新闻卡片网格 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--gap);
    overflow-x: auto;
}

.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card time {
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

/* 场景对照 */
.scenario-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
    margin-bottom: var(--gap);
}

@media (max-width: 768px) {
    .scenario-row {
        grid-template-columns: 1fr;
    }
}

/* 特性标签页模拟 (无JS方案: 垂直堆叠) */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

.feature-item {
    border: var(--card-border);
    border-radius: var(--radius-card);
    padding: 2rem;
    background: var(--color-paper);
}

.feature-item__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.feature-icon {
    width: 32px;
    height: 32px;
    color: var(--color-brand);
}

/* 深度专题排版 */
.deep-dive-section {
    columns: 1;
}

@media (min-width: 768px) {
    .deep-dive-section {
        columns: 2;
        column-gap: 2rem;
    }
    .deep-dive-section h3 {
        break-after: avoid;
    }
    .deep-dive-section p {
        break-inside: avoid;
    }
}

/* 兜底：裁掉横向溢出 */
div {
  overflow-x: clip;
}
