* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, "Microsoft YaHei", 微软雅黑, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 20px;
}

::selection {
    background: #dbeafe;
    color: #1e40af;
}

body {
    line-height: 1.75;
    color: #23272f;
    padding: 0;
    max-width: none;
    margin: 0;
    background-color: #f5f7fa;
}

/* 正文内容容器 —— 固定宽度、居中、留白 */
.page-content {
    max-width: 1400px;
    margin: 2rem auto 0.5rem;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

/* header、footer 内部容器依然维持原有内边距与居中 */
header .container,
footer .container {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* 保证 header 背景完全延伸 */
header {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* footer 同样全宽 */
footer {
    width: 100%;
    margin: 0;
    padding: 0;
}

.back-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(30, 64, 175, 0.3);
    border: none;
    font-size: 20px;
    z-index: 999;
    transition: all 0.2s ease;
}

.back-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(30, 64, 175, 0.4);
}

.header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 2rem 1.5rem;
    padding-bottom: 1.8rem;
    border-bottom: 3px solid #1e40af;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
}

.header h1 {
    font-size: 1.9rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    color: #1e40af;
    font-weight: 700;
    letter-spacing: 0.6px;
    line-height: 1.4;
}

.header .standard-id {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 1rem 0;
    color: #0f172a;
    letter-spacing: 1px;
}

.header .note {
    font-size: 0.98rem;
    color: #475569;
    font-style: italic;
    margin-top: 0.5rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.section {
    margin-bottom: 2.8rem;
    padding: 1.8rem 1.5rem;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease-in-out;
    border: 1px solid #f1f5f9;
}

.section:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
    border-color: #e2e8f0;
}

.section h2 {
    font-size: 1.45rem;
    margin-bottom: 1.3rem;
    color: #1e40af;
    border-left: 5px solid #1e40af;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    padding-bottom: 0.7rem;
    font-weight: 600;
    border-radius: 2px 0 0 2px;
}

.section h3 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.8rem;
    color: #1e3a8a;
    padding-left: 0.8rem;
    border-left: 3px solid #3b82f6;
    font-weight: 600;
}

.section p {
    margin-left: 1rem;
    margin-bottom: 1.2rem;
    font-size: 1rem;
    color: #23272f;
    text-indent: 2em;
}

.section ul {
    margin-left: 2.5rem;
    margin-bottom: 1.2rem;
    list-style-type: disc;
    color: #23272f;
}

.section ul li {
    margin-bottom: 0.6rem;
    font-size: 1rem;
    line-height: 1.7;
}

.section ol {
    margin-left: 2.5rem;
    margin-bottom: 1.2rem;
    color: #23272f;
}

.section ol li {
    margin-bottom: 0.6rem;
    font-size: 1rem;
    line-height: 1.7;
}

.table-container {
    overflow-x: auto;
    margin: 2rem 0;
    padding: 0.8rem;
    border-radius: 8px;
    background-color: #f8fafc;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

table th {
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    color: #ffffff;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    padding: 0.9rem;
    text-align: center;          /* 表头内容居中 */
    font-size: 0.95rem;
    white-space: nowrap;
}

table td {
    border: 1px solid #e2e8f0;
    padding: 0.9rem;
    text-align: center;          /* 数据内容居中 */
    font-size: 0.92rem;
    color: #23272f;
}

/* 脚注单元格保持左对齐，以便注释清晰 */
table tfoot th,
table tfoot td {
    text-align: left;
}

table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

table tbody tr:hover {
    background-color: #eff6ff;
    transition: background-color 0.2s ease;
}

table caption {
    font-size: 1rem;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 1rem;
    text-align: center;
    padding-left: 0.5rem;
}

.figure {
    text-align: center;
    margin: 2.8rem 0;
    padding: 1.5rem;
    background-color: #fdfdfd;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.figure img {
    max-width: 80%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.figure-caption {
    font-size: 0.98rem;
    color: #475569;
    margin-top: 1rem;
    font-style: italic;
    line-height: 1.6;
    text-align: center;
    padding: 0 1rem;
}

.supplementary {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 3px solid #1e40af;
    background-color: #ffffff;
    border-radius: 10px;
    padding: 2rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}

.keywords {
    font-style: italic;
    color: #334155;
    font-size: 1rem;
    padding-left: 1rem;
    line-height: 1.8;
}

.note {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.7;
    margin-top: 0.8rem;
    padding-left: 0.5rem;
}

sup {
    color: #dc2626;
    font-weight: 600;
    font-size: 0.8rem;
}

.sub-clause {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.sub-clause p {
    text-indent: 0;
    margin-left: 0;
}

.clause {
    margin-bottom: 1rem;
}

.math-equation {
    background-color: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid #3b82f6;
    font-family: 'Courier New', monospace;
    text-align: center;
}

.formula {
    background-color: #f8fafc;
    padding: 1.2rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid #10b981;
    font-family: 'Cambria', 'Times New Roman', serif;
    font-size: 1.1rem;
    text-align: center;
}

.formula-var {
    font-style: italic;
}

/* ===================== 移动端适配 ===================== */
@media (max-width: 768px) {
    /* 页面容器 */
    .page-content {
        margin-top: 1rem;
        padding: 0 0.75rem;
    }

    /* 页头 */
    .header {
        padding: 1.2rem 0.75rem 1rem;
        margin-bottom: 1rem;
    }
    .header h1 {
        font-size: 1.25rem;
        letter-spacing: 0;
        text-transform: none;
        line-height: 1.5;
    }
    .header .standard-id {
        font-size: 1.2rem;
        margin: 0.6rem 0;
    }
    .header .note {
        font-size: 0.85rem;
        text-align: left;
    }

    /* 内容区块 */
    .section {
        padding: 1rem 0.75rem;
        margin-bottom: 1.5rem;
    }
    .section h2 {
        font-size: 1.1rem;
        padding: 0.4rem 0.6rem;
        padding-bottom: 0.5rem;
    }
    .section h3 {
        font-size: 1rem;
        padding-left: 0.5rem;
    }
    .section p {
        text-indent: 0;
        margin-left: 0;
        font-size: 0.95rem;
    }
    .section ul,
    .section ol {
        margin-left: 1.2rem;
        padding-left: 0;
    }
    .section ul li,
    .section ol li {
        font-size: 0.95rem;
    }

    /* 表格 */
    .table-container {
        margin: 1rem 0;
        padding: 0.4rem;
    }
    table th,
    table td {
        padding: 0.5rem 0.4rem;
        font-size: 0.8rem;
        white-space: normal;
        word-break: break-word;
    }
    table th {
        font-size: 0.78rem;
    }
    table caption {
        font-size: 0.88rem;
        text-align: left;
    }

    /* 图片 */
    .figure {
        padding: 0.75rem 0.5rem;
    }
    .figure img {
        max-width: 100%;
    }
    .figure-caption {
        font-size: 0.85rem;
        padding: 0;
    }

    /* 公式 */
    .formula {
        padding: 0.75rem 0.5rem;
        font-size: 0.95rem;
        overflow-x: auto;
    }
    .math-equation {
        padding: 0.75rem 0.5rem;
        overflow-x: auto;
    }

    /* pre 标签（目录等） */
    pre {
        overflow-x: auto;
        white-space: pre-wrap;
        word-break: break-word;
        font-size: 0.8rem;
    }

    /* 补录区 */
    .supplementary {
        padding: 1rem 0.75rem;
        margin-top: 2rem;
    }

    /* 回到顶部 */
    .back-top {
        width: 38px;
        height: 38px;
        font-size: 16px;
        right: 12px;
        bottom: 12px;
    }

    /* 双列列表（移动端改为单列） */
    .multi-col-list {
        column-count: 1 !important;
        column-gap: 0 !important;
    }
}

/* 极窄屏（< 480px）进一步优化 */
@media (max-width: 480px) {
    .header h1 {
        font-size: 1.1rem;
    }
    .header .standard-id {
        font-size: 1rem;
    }
    .section {
        padding: 0.75rem 0.5rem;
    }
    table th,
    table td {
        padding: 0.4rem 0.3rem;
        font-size: 0.75rem;
    }
}