/* 条款级修订标注样式
   角标贴在条款正文末尾，展开面板插在条款下方 */

/* ========================================
   1. 条款角标
   ======================================== */

.amd-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 8px;
    padding: 1px 8px 2px;
    border: 1px solid #e0c98a;
    border-radius: 999px;
    background: #fdf6e6;
    color: #8a6a16;
    font-size: 12px;
    line-height: 1.6;
    letter-spacing: 0;
    white-space: nowrap;
    cursor: pointer;
    vertical-align: middle;
    transition: background 0.15s, border-color 0.15s;
}

.amd-badge:hover,
.amd-badge:focus-visible {
    background: #f7e9c6;
    border-color: #c99a2e;
    outline: none;
}

.amd-badge-dot {
    font-size: 11px;
    color: #c99a2e;
}

/* 新增条款 */
.amd-badge-add {
    border-color: #b7dfc4;
    background: #edf9f1;
    color: #1d6b3c;
}

.amd-badge-add:hover,
.amd-badge-add:focus-visible {
    background: #dcf2e4;
    border-color: #4f9e6d;
}

.amd-badge-add .amd-badge-dot {
    color: #4f9e6d;
}

/* 后有删除 */
.amd-badge-del {
    border-color: #e6c3c3;
    background: #fbf0f0;
    color: #8d3434;
}

.amd-badge-del:hover,
.amd-badge-del:focus-visible {
    background: #f6e2e2;
    border-color: #b95252;
}

.amd-badge-del .amd-badge-dot {
    color: #b95252;
}

/* 同一条款出现两枚角标时留点间距 */
.amd-badge + .amd-badge {
    margin-left: 5px;
}

/* 被修订过的条款：左侧一道淡竖线，扫读时能一眼看出 */
.amd-revised-block {
    position: relative;
}

.amd-revised-block::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 2px;
    bottom: 2px;
    width: 2px;
    border-radius: 2px;
    background: #e8d6a8;
}

.amd-revised-block.amd-open::before {
    background: #c99a2e;
}

/* ========================================
   2. 展开面板
   ======================================== */

.amd-panel {
    margin: 8px 0 16px;
    padding: 2px 0;
    border: 1px solid #e6d9b8;
    border-radius: 8px;
    background: #fdfbf5;
    font-size: 14px;
    line-height: 1.8;
    color: #3d3a32;
    animation: amd-slide-in 0.18s ease-out;
}

@keyframes amd-slide-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.amd-version {
    padding: 12px 16px;
    letter-spacing: 0;
}

.amd-version + .amd-version {
    border-top: 1px dashed #e6d9b8;
}

.amd-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 3px 0;
    flex-wrap: wrap;
}

.amd-row-meta {
    margin-bottom: 4px;
}

.amd-date {
    font-weight: 600;
    color: #8a6a16;
    font-variant-numeric: tabular-nums;
}

.amd-type {
    padding: 0 7px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.8;
    white-space: nowrap;
}

.amd-type-modify {
    background: #f0e6cc;
    color: #7a5e12;
}

.amd-type-add {
    background: #ddf1e4;
    color: #1d6b3c;
}

.amd-type-delete {
    background: #f2dede;
    color: #a33a3a;
}

.amd-label {
    flex: 0 0 auto;
    color: #8b8578;
    font-size: 13px;
    letter-spacing: 0;
    white-space: nowrap;
}

.amd-value {
    flex: 1;
    min-width: 0;
}

.amd-summary-text {
    color: #3d3a32;
}

.amd-link {
    color: #2f5aa8;
    text-decoration: none;
    border-bottom: 1px solid rgba(47, 90, 168, 0.35);
}

.amd-link:hover {
    color: #1b3d7d;
    border-bottom-color: #1b3d7d;
}

.amd-docnum,
.amd-org {
    margin-left: 6px;
    color: #8b8578;
    font-size: 13px;
}

/* 按变更类型给面板换色 */
.amd-version-add {
    background: #fbfdfb;
    box-shadow: inset 3px 0 0 #9ed3b2;
}

.amd-version-delete {
    background: #fdfafa;
    box-shadow: inset 3px 0 0 #dda8a8;
}

/* 点另一枚角标时，对应那节闪一下，提示"你要找的在这里" */
@keyframes amd-flash-bg {
    0%   { background: #f6e9c8; }
    100% { background: transparent; }
}

.amd-flash {
    animation: amd-flash-bg 1.1s ease-out;
}

/* 编者注：本站添加的解读，样式刻意区别于上方的监管原文陈述
   （蓝灰调 + 虚线框 + 明确标签，读者一眼能看出不是修订文件里的话） */
.amd-note {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 10px;
    padding: 9px 12px;
    border: 1px dashed #c3cede;
    border-radius: 6px;
    background: #f7f9fc;
    font-size: 13.5px;
    line-height: 1.85;
    color: #41506b;
}

.amd-note-tag {
    flex: 0 0 auto;
    padding: 0 7px;
    border-radius: 999px;
    background: #dde5f2;
    color: #35507d;
    font-size: 12px;
    line-height: 1.8;
    white-space: nowrap;
}

.amd-note-body {
    flex: 1;
    min-width: 0;
}

.amd-note-link {
    margin-left: 6px;
    white-space: nowrap;
}

/* 修订前原文 */
.amd-old {
    margin-top: 10px;
    border-top: 1px solid #efe4ca;
    padding-top: 10px;
}

.amd-old-label {
    margin-bottom: 4px;
    color: #8b8578;
    font-size: 13px;
}

.amd-old-body {
    padding: 10px 14px;
    border-radius: 6px;
    background: #f4f1e8;
    color: #6a665c;
    line-height: 1.9;
}

.amd-old-body p {
    margin: 0 0 6px;
}

.amd-old-body p:last-child {
    margin-bottom: 0;
}

/* 已删除的条文：淡红底 + 左侧红条，与"修改前原文"区分开 */
.amd-old-deleted {
    background: #f9f0f0;
    border-left: 3px solid #dda8a8;
    color: #7a5f5f;
}

/* ========================================
   3. 窄屏
   ======================================== */

@media (max-width: 768px) {
    .amd-revised-block::before {
        left: -8px;
    }

    .amd-row {
        flex-direction: column;
        gap: 2px;
    }

    .amd-label {
        color: #9b9488;
    }
}
