/* 基础样式与排版（v2） */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--paper), var(--bg);
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: var(--text-body);
    line-height: var(--leading-body);
    letter-spacing: 0.005em;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.is-locked {
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
    margin: 0;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: var(--weight-semibold);
    letter-spacing: -0.02em;
}

h1 { font-size: var(--text-h1); line-height: var(--leading-h1); }
h2 { font-size: var(--text-h2); line-height: var(--leading-h2); }
h3 { font-size: var(--text-h3); line-height: var(--leading-h3); }

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

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

button, input, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: 0;
    background: none;
    padding: 0;
}

img, svg {
    display: block;
    max-width: 100%;
}

svg {
    width: 1.15em;
    height: 1.15em;
    flex: none;
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 0;
}

::selection {
    background: var(--brand-soft);
    color: var(--ink);
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 99px;
    border: 3px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--muted-2);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.num {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}

.text-muted { color: var(--muted); }
.text-soft { color: var(--muted-2); }
.text-brand { color: var(--brand); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-accent { color: var(--accent); }

.en {
    font-family: var(--font-en);
    letter-spacing: 0.005em;
}

.display {
    font-family: var(--font-display);
    font-size: var(--text-display);
    line-height: var(--leading-display);
    font-weight: var(--weight-medium);
    letter-spacing: -0.03em;
}

.caption {
    font-size: var(--text-caption);
    line-height: var(--leading-caption);
    color: var(--muted-2);
}

.meta-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: var(--text-small);
    color: var(--muted);
}

.meta-line .sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--line-strong);
    flex: none;
}

.prose {
    max-width: var(--reading-max);
    font-size: var(--text-body);
    line-height: var(--leading-body);
    color: var(--ink-2);
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); }
.gap-6 { gap: var(--sp-6); }
.grow { flex: 1 1 auto; min-width: 0; }
.wrap { flex-wrap: wrap; }

.section-title {
    font-family: var(--font-display);
    font-size: var(--text-h2);
    font-weight: var(--weight-semibold);
    letter-spacing: -0.02em;
    color: var(--ink);
}

/* 英文眉题在 v2 中全部隐藏，改用中文分区标题 */
.eyebrow {
    display: none !important;
}

.divider {
    height: 1px;
    background: var(--line);
    width: 100%;
}

/* 编辑部式分区：细线 + 标题 + 内容，不用卡片 */
.band {
    border-top: 1px solid var(--line);
    padding-top: var(--sp-5);
}

.band + .band {
    margin-top: var(--sp-7);
}

.band-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--sp-4);
    margin-bottom: var(--sp-4);
}

.band-title {
    font-family: var(--font-display);
    font-size: var(--text-h2);
    font-weight: var(--weight-semibold);
    letter-spacing: -0.02em;
    line-height: var(--leading-h2);
}

.band-sub {
    font-size: var(--text-small);
    color: var(--muted);
    line-height: var(--leading-small);
}

.overline {
    font-size: var(--text-caption);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.08em;
    color: var(--muted-2);
    text-transform: none;
}

/* 入场动画：只保留一次轻微淡入 */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scale-in {
    from { opacity: 0; transform: scale(0.99); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
    0% { background-position: -420px 0; }
    100% { background-position: 420px 0; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

@keyframes draw-ring {
    from { stroke-dashoffset: var(--ring-len); }
    to { stroke-dashoffset: var(--ring-offset); }
}

.animate-in {
    animation: fade-up var(--dur-3) var(--ease-out) both;
}

.animate-in-delay-1,
.animate-in-delay-2,
.animate-in-delay-3 {
    animation-delay: 0ms;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
