/* 盛廷大事记 (jieshao-32): serpentine year timeline on desktop, one vertical rail below 1024px. */
.st-milestones-page {
    --ms-red: #a51e25;
    --ms-red-deep: #7d161c;
    --ms-ink: #23282f;
    --ms-muted: #5f666e;
    --ms-line: #e4d6d2;
    --ms-card-line: #ece4e0;
    --ms-paper: #faf7f5;
    --ms-ease: cubic-bezier(.16, 1, .3, 1);
}
.st-milestones-page .main { width: min(1200px, calc(100% - 32px)); overflow: visible; }

.st-ms { padding: 0 40px 64px; color: var(--ms-ink); font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; }
.st-ms ::selection { background: rgba(165, 30, 37, .16); }
.st-ms h2, .st-ms h3, .st-ms p { margin: 0; letter-spacing: 0; }
.st-ms ol, .st-ms ul { list-style: none; margin: 0; padding: 0; }

/* Heading band: title and lead on the left, the span of years as a quiet typographic anchor. */
.st-ms-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 48px 0 32px; margin-bottom: 56px; border-bottom: 1px solid var(--ms-card-line); }
.st-ms-head h2 { font-size: 28px; line-height: 1.4; font-weight: 600; color: var(--ms-ink); }
.st-ms-head h2::after { content: ""; display: block; width: 1em; height: 2px; margin-top: 10px; background: var(--ms-red); }
.st-ms-head p { margin-top: 16px; font-size: 16px; line-height: 1.8; color: var(--ms-muted); }
.st-ms-head .st-ms-span { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; margin: 0; font: 400 44px/1 Georgia, "Times New Roman", serif; color: var(--ms-ink); font-variant-numeric: lining-nums; }
.st-ms-span i { display: block; width: 56px; height: 2px; background: var(--ms-red); }
.st-ms-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* One node: year, dot on the track, and the event's text box. */
.st-ms-item { position: relative; box-sizing: border-box; }
.st-ms-year { color: var(--ms-red); font: 400 30px/1 Georgia, "Times New Roman", serif; font-variant-numeric: lining-nums; }
.st-ms-year b { font-weight: 400; }
.st-ms-year span { margin-left: 3px; font: 13px/1 "Microsoft YaHei", "PingFang SC", Arial, sans-serif; color: var(--ms-muted); }
.st-ms-dot { position: absolute; z-index: 1; box-sizing: border-box; width: 14px; height: 14px; border: 3px solid var(--ms-red); border-radius: 50%; background: #fff; transition: background-color .24s var(--ms-ease), box-shadow .24s var(--ms-ease); }
.st-ms-item.is-key .st-ms-dot { background: var(--ms-red); box-shadow: 0 0 0 5px rgba(165, 30, 37, .12); }
.st-ms-card { position: relative; box-sizing: border-box; padding: 16px 16px 18px; border: 1px solid var(--ms-card-line); border-radius: 4px; background: var(--ms-paper); transition: border-color .24s var(--ms-ease), box-shadow .24s var(--ms-ease), transform .24s var(--ms-ease); }
.st-ms-card h3 { font-size: 16px; line-height: 1.5; font-weight: 600; color: var(--ms-ink); }
.st-ms-card p { margin-top: 8px; font-size: 13px; line-height: 1.8; color: var(--ms-muted); }
.st-ms-item.is-key .st-ms-card { border-color: rgba(165, 30, 37, .28); background: #fff; }
.st-ms-item.is-key .st-ms-card h3 { color: var(--ms-red-deep); }
/* Events whose article has content open it; the arrow says so before the hover does. */
a.st-ms-card { display: block; padding-right: 36px; color: inherit; text-decoration: none; }
a.st-ms-card svg { position: absolute; top: 16px; right: 14px; width: 16px; height: 16px; fill: none; stroke: var(--ms-red); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ms-ease); }
a.st-ms-card:focus-visible { outline: 2px solid var(--ms-red); outline-offset: 2px; }
.st-ms-empty { margin: 0; padding: 56px 16px; border: 1px dashed var(--ms-line); border-radius: 4px; background: var(--ms-paper); color: var(--ms-muted); font-size: 16px; line-height: 1.8; text-align: center; }
@media (hover: hover) {
    a.st-ms-card:hover svg { transform: translate(2px, -2px); }
    a.st-ms-card:hover h3 { color: var(--ms-red-deep); }
    .st-ms-item:hover a.st-ms-card { border-color: rgba(165, 30, 37, .32); box-shadow: 0 12px 24px -14px rgba(35, 40, 47, .28); transform: translateY(-2px); }
    .st-ms-item:hover .st-ms-dot { background: var(--ms-red); box-shadow: 0 0 0 5px rgba(165, 30, 37, .12); }
}

/* Desktop serpentine. Rows alternate direction; a turn on the outer edge joins each track to the next. */
@media (min-width: 1024px) {
    .st-ms {
        --ms-per: 5;
        --ms-turn: 48px;
        --ms-track: 58px;
        --ms-drop: 32px;
        --ms-row-gap: 56px;
    }
    .st-ms-path { padding: 0 var(--ms-turn); }
    .st-ms-row { position: relative; display: flex; }
    .st-ms-row + .st-ms-row { margin-top: var(--ms-row-gap); }
    .st-ms-row.is-reverse { flex-direction: row-reverse; }
    .st-ms-item { display: flex; flex-direction: column; flex: 0 0 calc(100% / var(--ms-per)); padding: calc(var(--ms-track) + var(--ms-drop)) 8px 0; }
    .st-ms-item::before { content: ""; position: absolute; top: calc(var(--ms-track) - 1px); left: 0; right: 0; height: 2px; background: var(--ms-line); }
    .st-ms-row.is-first .st-ms-item:first-child::before { left: 50%; }
    .st-ms-row.is-last:not(.is-reverse) .st-ms-item:last-child::before { right: 50%; }
    .st-ms-row.is-last.is-reverse .st-ms-item:last-child::before { left: 50%; }
    /* The path keeps going past the latest year. */
    .st-ms-row.is-last .st-ms-item:last-child::after { content: ""; position: absolute; top: calc(var(--ms-track) - 1px); left: 50%; width: 64%; border-top: 2px dashed var(--ms-line); -webkit-mask-image: linear-gradient(90deg, #000 30%, transparent); mask-image: linear-gradient(90deg, #000 30%, transparent); }
    .st-ms-row.is-last.is-reverse .st-ms-item:last-child::after { left: auto; right: 50%; -webkit-mask-image: linear-gradient(270deg, #000 30%, transparent); mask-image: linear-gradient(270deg, #000 30%, transparent); }
    /* Height spans this row, the gap, and the 2px track of the next row. */
    .st-ms-row:not(.is-last)::after { content: ""; position: absolute; top: calc(var(--ms-track) - 1px); right: calc(-1 * var(--ms-turn)); box-sizing: border-box; width: var(--ms-turn); height: calc(100% + var(--ms-row-gap) + 2px); border: 2px solid var(--ms-line); border-left: 0; border-radius: 0 var(--ms-turn) var(--ms-turn) 0; }
    .st-ms-row.is-reverse:not(.is-last)::after { right: auto; left: calc(-1 * var(--ms-turn)); border: 2px solid var(--ms-line); border-right: 0; border-radius: var(--ms-turn) 0 0 var(--ms-turn); }
    .st-ms-year { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: flex-end; justify-content: center; height: calc(var(--ms-track) - 16px); }
    .st-ms-dot { top: calc(var(--ms-track) - 7px); left: calc(50% - 7px); }
    .st-ms-card { flex: 1 1 auto; }
    .st-ms-card::before { content: ""; position: absolute; left: 50%; top: calc(-1 * var(--ms-drop) - 1px); width: 1px; height: calc(var(--ms-drop) - 6px); background: var(--ms-line); }
}

/* Small laptops: give the text boxes the gutter space back. */
@media (min-width: 1024px) and (max-width: 1199px) {
    .st-ms { --ms-turn: 32px; padding: 0 20px 56px; }
    .st-ms-item { padding-left: 5px; padding-right: 5px; }
    .st-ms-card { padding: 14px 12px 16px; }
    .st-ms-card h3 { font-size: 15px; }
}

/* Narrow screens: one rail down the left edge, still in year order. */
@media (max-width: 1023px) {
    .st-ms { padding: 0 20px 40px; }
    .st-ms-head { flex-direction: column; align-items: flex-start; gap: 20px; padding: 28px 0 24px; margin-bottom: 32px; }
    .st-ms-head h2 { font-size: 22px; }
    .st-ms-head p { margin-top: 12px; font-size: 15px; }
    .st-ms-head .st-ms-span { gap: 12px; font-size: 28px; }
    .st-ms-span i { width: 40px; }
    .st-ms-item { padding: 0 0 24px 36px; }
    .st-ms-item::before { content: ""; position: absolute; top: 0; bottom: 0; left: 9px; width: 2px; background: var(--ms-line); }
    .st-ms-row.is-first .st-ms-item:first-child::before { top: 12px; }
    .st-ms-row.is-last .st-ms-item:last-child { padding-bottom: 48px; }
    .st-ms-row.is-last .st-ms-item:last-child::before { bottom: 0; border-left: 0; background: linear-gradient(var(--ms-line) 40%, transparent); }
    .st-ms-year { display: flex; align-items: baseline; margin-bottom: 10px; font-size: 24px; }
    .st-ms-dot { top: 5px; left: 3px; }
    .st-ms-card { padding: 14px 16px 16px; }
    .st-ms-card h3 { font-size: 15px; }
    .st-ms-card p { font-size: 14px; }
}

/* The flipbooks that used to be this page stay one click away. */
.st-ms-books { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--ms-card-line); }
.st-ms-books h2 { font-size: 20px; line-height: 1.5; font-weight: 600; color: var(--ms-ink); }
.st-ms-books-head p { margin-top: 8px; font-size: 14px; line-height: 1.7; color: var(--ms-muted); }
.st-ms-books ul { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.st-ms-books a { position: relative; display: block; box-sizing: border-box; height: 100%; padding: 14px 36px 16px 16px; border: 1px solid var(--ms-card-line); border-radius: 4px; background: #fff; color: var(--ms-ink); text-decoration: none; transition: border-color .2s var(--ms-ease), color .2s var(--ms-ease); }
.st-ms-books a span { display: block; font-size: 12px; line-height: 1.6; color: var(--ms-muted); }
.st-ms-books a strong { display: block; margin-top: 4px; font-size: 15px; line-height: 1.5; font-weight: 600; }
.st-ms-books svg { position: absolute; top: 15px; right: 14px; width: 16px; height: 16px; fill: none; stroke: var(--ms-red); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ms-ease); }
.st-ms-books a:hover { border-color: rgba(165, 30, 37, .4); color: var(--ms-red-deep); }
.st-ms-books a:hover svg { transform: translate(2px, -2px); }
.st-ms-books a:focus-visible { outline: 2px solid var(--ms-red); outline-offset: 2px; }
@media (max-width: 1023px) {
    .st-ms-books { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 40px; padding-top: 28px; }
    .st-ms-books ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .st-ms-books li:first-child { grid-column: 1 / -1; }
}

/* One authored moment: on the way in, the years arrive one after another along the path. */
.st-ms.is-armed .st-ms-item { opacity: 0; transform: translateY(14px); }
.st-ms.is-armed .st-ms-row.is-in .st-ms-item { opacity: 1; transform: none; transition: opacity .7s var(--ms-ease), transform .7s var(--ms-ease); transition-delay: calc(var(--ms-i) * 90ms); }
@media (prefers-reduced-motion: reduce) {
    .st-ms.is-armed .st-ms-item { opacity: 1; transform: none; }
    .st-ms-card, .st-ms-dot, .st-ms-books a, .st-ms-books svg { transition: none; }
}
