/* === 更新日志页 ===
   沿用全站 token（style.css :root）。版式按 1U 前端「三层」走：
   ① 当前版本是全页唯一的强调块；② 搜索是唯一的操作；③ 版本清单是分隔线行，不做卡片。
   动效只动 opacity / transform，0.16–0.22s，无回弹。 */

.page-changelog [hidden] { display: none !important; }

/* 这一页没有居中导航，「返回主站」在窄屏也留着；logo 同样回主站 */
.page-changelog .nav-link-ext { display: inline; }
.page-changelog .footer-legal { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.cl {
    max-width: 760px;
    margin: 0 auto;
    padding: 132px 24px 104px;
}

/* --- ① 标题与当前版本 --- */
.cl-hero .section-badge { margin-bottom: 14px; }

.cl-title {
    font-size: clamp(32px, 5vw, 44px);
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 14px;
}

.cl-lead {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-2);
}

.cl-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 32px;
    padding: 22px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background:
        radial-gradient(420px 160px at 0% 0%, rgba(99, 102, 241, 0.09), transparent 70%),
        var(--surface);
}

.cl-current-main { display: grid; gap: 4px; min-width: 0; }

.cl-current-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-3);
}

.cl-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.14);
}

.cl-current-version {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.cl-current-meta {
    font-size: 13px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}

.cl-sep { margin: 0 6px; }

.cl-current-cta.btn-primary {
    flex-shrink: 0;
    padding: 11px 22px;
    font-size: 14px;
    border-radius: 10px;
}

/* --- ② 搜索 --- */
.cl-search {
    position: relative;
    margin-top: 40px;
}

.cl-search-input {
    width: 100%;
    height: 46px;
    padding: 0 46px 0 42px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.025);
    color: var(--text);
    font: 15px/1 var(--font);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.cl-search-input::placeholder { color: var(--text-3); }
.cl-search-input::-webkit-search-cancel-button,
.cl-search-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.cl-search-input:hover { border-color: var(--border-hover); }
.cl-search-input:focus {
    border-color: rgba(129, 140, 248, 0.6);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.cl-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    pointer-events: none;
    transition: color 0.16s ease;
}
.cl-search:focus-within .cl-search-icon { color: var(--text-2); }

.cl-search-key {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    border: 1px solid var(--border);
    font: 500 12px/1 var(--mono);
    color: var(--text-3);
    pointer-events: none;
    transition: opacity 0.16s ease;
}
.cl-search:focus-within .cl-search-key,
.cl-search.has-value .cl-search-key { opacity: 0; }

.cl-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-3);
    cursor: pointer;
    transition: color 0.16s ease, background 0.16s ease;
}
.cl-search-clear:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.cl-search-clear:active { transform: translateY(-50%) scale(0.94); }

.cl-status {
    margin: 12px 2px 0;
    font-size: 13px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}
.cl-status:empty { display: none; }
/* 无结果时下面的空状态已经说了一遍，这行只留给读屏 */
.cl-status.is-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* --- ③ 版本清单 --- */
.cl-list { margin-top: 28px; }

.cl-month { border-top: 1px solid var(--border); }
.cl-month:last-child { border-bottom: 1px solid var(--border); }

.cl-month-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 2px;
    list-style: none;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    border-radius: 8px;
}
.cl-month-head::-webkit-details-marker { display: none; }
.cl-month-head:focus { outline: none; }
.cl-month-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.cl-month-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
    line-height: 1.3;
    transition: color 0.16s ease;
}

.cl-month-meta {
    margin-left: auto;
    font-size: 13px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.cl-month-chevron {
    flex-shrink: 0;
    color: var(--text-3);
    transition: transform 0.18s ease, color 0.16s ease;
}
.cl-month[open] > .cl-month-head .cl-month-chevron { transform: rotate(90deg); }
.cl-month-head:hover .cl-month-chevron { color: var(--text-2); }
.cl-month:not([open]) > .cl-month-head .cl-month-title { color: var(--text-2); }
.cl-month:not([open]) > .cl-month-head:hover .cl-month-title { color: var(--text); }

.cl-month[open] > .cl-month-body { animation: cl-reveal 0.22s ease both; }
.cl-month-body { padding-bottom: 10px; }

@keyframes cl-reveal {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

.cl-entry {
    position: relative;
    display: grid;
    grid-template-columns: 152px minmax(0, 1fr);
    column-gap: 28px;
    padding: 22px 0;
    scroll-margin-top: 88px;
}
.cl-entry + .cl-entry { border-top: 1px solid rgba(255, 255, 255, 0.05); }

/* 从链接打开某一版时，短暂提示落点在哪 */
.cl-entry::after {
    content: '';
    position: absolute;
    inset: 8px -14px;
    border-radius: 14px;
    border: 1px solid rgba(129, 140, 248, 0.24);
    background: rgba(129, 140, 248, 0.07);
    opacity: 0;
    pointer-events: none;
}
/* 有脚本时由脚本加 is-flash：目标在收起的月份里时，:target 的动画会在展开前就跑完 */
html:not(.cl-js) .cl-entry:target::after,
.cl-entry.is-flash::after { animation: cl-flash 2.8s ease forwards; }

@keyframes cl-flash {
    0%, 55% { opacity: 1; }
    100% { opacity: 0; }
}

.cl-entry-meta {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: start;
    gap: 4px 8px;
    padding-right: 30px;
}

.cl-version {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.2px;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
}

.cl-date {
    flex-basis: 100%;
    font-size: 13px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}
.cl-time { margin-left: 6px; }

.cl-tag {
    display: inline-block;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 11px;
    font-weight: 600;
    line-height: 19px;
    color: var(--text-2);
    white-space: nowrap;
}
.cl-tag--latest { background: rgba(52, 211, 153, 0.12); color: var(--green); }

.cl-link {
    position: absolute;
    top: 0;
    right: 0;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-3);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.16s ease, color 0.16s ease, background 0.16s ease;
}
/* 图标用 mask 画：一页近两百个按钮，每个内联一份 SVG 太占体积 */
.cl-link::before {
    content: '';
    width: 14px;
    height: 14px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E") center / contain no-repeat;
}
.cl-entry:hover .cl-link,
.cl-link:focus-visible { opacity: 1; }
.cl-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.cl-link:active { transform: scale(0.94); }
.cl-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (hover: none) { .cl-link { opacity: 0.7; } }

.cl-entry-body { min-width: 0; }

.cl-items {
    list-style: none;
    display: grid;
    gap: 6px;
}

.cl-items li {
    position: relative;
    padding-left: 16px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-2);
    overflow-wrap: anywhere;
}
.cl-items li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0.72em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.26);
}
.cl-items li.is-generic { color: var(--text-3); }

.cl-items ul {
    list-style: none;
    display: grid;
    gap: 3px;
    margin: 6px 0 2px;
}
.cl-items ul li { font-size: 14px; }
.cl-items ul li::before {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 一版几十项时先收起，脚本加类名；没有脚本时全部照常显示 */
.cl-items.is-clamped > li:nth-child(n+11) { display: none; }
.cl-list.is-searching .cl-items.is-clamped > li:nth-child(n+11) { display: block; }
.cl-list.is-searching .cl-more { display: none; }

.cl-more {
    margin-top: 8px;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--accent);
    font: 500 14px/1.5 var(--font);
    cursor: pointer;
    transition: color 0.16s ease;
}
.cl-more:hover { color: #a5b4fc; }
.cl-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.cl-list.is-searching .cl-entry:not(.show-all) li.cl-miss { display: none; }
.cl-list.is-searching .cl-entry:not(.show-all) .cl-hotfix:not(:has(mark)) { display: none; }

.cl-rest {
    display: inline-flex;
    align-items: center;
    margin-top: 6px;
    padding: 2px 0 2px 16px;
    border: 0;
    background: none;
    color: var(--text-3);
    font: 400 14px/1.6 var(--font);
    cursor: pointer;
    transition: color 0.16s ease;
}
.cl-rest::after { content: '›'; margin-left: 6px; }
.cl-rest:hover { color: var(--text-2); }
.cl-rest:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.cl-hotfix {
    margin-top: 14px;
    padding: 2px 0 2px 14px;
    border-left: 2px solid rgba(255, 255, 255, 0.08);
}
.cl-hotfix-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}
.cl-hotfix-head:last-child { margin-bottom: 0; }

.cl-entry mark {
    padding: 0 1px;
    border-radius: 3px;
    background: rgba(129, 140, 248, 0.3);
    color: var(--text);
}

.cl-origin {
    margin-top: 28px;
    text-align: center;
    font-size: 13px;
    color: var(--text-3);
}
.cl-list.is-searching + .cl-origin { display: none; }

.cl-empty {
    padding: 64px 0 24px;
    text-align: center;
}
.cl-empty-title { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.cl-empty-desc { margin-top: 6px; font-size: 14px; color: var(--text-3); }
.cl-empty-reset.btn-secondary { margin-top: 22px; padding: 10px 22px; font-size: 14px; }

/* 浮层按钮：玻璃只上这种浮在内容上的东西 */
.cl-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 900;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(23, 23, 28, 0.78);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    color: var(--text-2);
    cursor: pointer;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, color 0.16s ease, border-color 0.16s ease;
}
.cl-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.cl-top:hover { color: var(--text); border-color: var(--border-hover); }
.cl-top:active { transform: scale(0.94); }
.cl-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 640px) {
    .cl { padding: 108px 16px 80px; }
    .cl-lead { font-size: 15px; }

    .cl-current {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
        padding: 20px;
    }
    .cl-current-cta.btn-primary { justify-content: center; }

    .cl-search { margin-top: 32px; }
    .cl-search-key { display: none; }

    .cl-month-head { padding: 18px 2px; }
    .cl-month-title { font-size: 18px; }

    .cl-entry {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 10px;
        padding: 18px 0;
    }
    .cl-entry::after { inset: 6px -10px; }
    .cl-entry-meta { flex-wrap: nowrap; padding-right: 0; }
    .cl-date { flex-basis: auto; margin-left: auto; white-space: nowrap; }
    .cl-link { position: static; order: 1; margin-right: -6px; }

    .cl-top { right: 16px; bottom: 16px; }
}

@media (hover: none) {
    .cl-search-key { display: none; }
}

/* 减弱动态效果：位移全部换成淡入淡出，落点提示本来就只动透明度，保留 */
@keyframes cl-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .cl-month[open] > .cl-month-body { animation-name: cl-fade; }
    .cl-month-chevron { transition: color 0.16s ease; }
    .cl-top,
    .cl-top.is-visible { transform: none; }
}
