/**
 * Earn Chances 页面。
 *
 * 颜色全部走主题自己的 CSS 变量，深浅色模式自动跟着走，不写死黑底白字：
 *   --card-bg / --primary-text / --secondary-text / --border-subtle / --accent
 * 每个都带 fallback，主题换了变量名也不至于变成透明的字。
 */

.cje-page {
    padding: 40px 20px 72px;
}

.cje-wrap {
    max-width: 760px;
    margin: 0 auto;
}

.cje-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-subtle, rgba(127, 127, 127, 0.22));
    border-radius: 16px;
    padding: 28px 28px 24px;
    color: var(--primary-text, #1a1a1a);
    font-family: inherit;
}

.cje-title {
    margin: 0 0 10px;
    font-size: 1.5rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--primary-text, #1a1a1a);
}

.cje-lead {
    margin: 0 0 4px;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--secondary-text, #6b7280);
}

/* 上边距统一交给 label：每一段小标题自己撑开距离，比给上一个元素加
   margin-bottom 稳——段落有几段、最后一段是什么，都不影响这一段的位置。 */
.cje-label {
    margin: 22px 0 10px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-text, #1a1a1a);
}

.cje-linkrow {
    margin: 0 0 16px;
    overflow: hidden;
}

.cje-link {
    display: inline-block;
    max-width: 100%;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--primary-text, #1a1a1a);
    text-decoration: underline;
    text-underline-offset: 3px;
    word-break: break-all;
}

.cje-link:hover {
    color: var(--accent, #7b2d3b);
}

.cje-link-arrow {
    display: inline-block;
    margin-left: 4px;
    text-decoration: none;
    font-size: 0.8125rem;
    opacity: 0.7;
}

.cje-actions {
    margin: 0 0 10px;
}

/* 主按钮：浅色主题下是黑底白字，深色主题下反过来——用主题自己的两个变量对调，
   两种模式都保持足够对比，也不用写两套 media query。 */
.cje-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 18px;
    border: 0;
    border-radius: 999px;
    background: var(--primary-text, #1a1a1a);
    color: var(--card-bg, #fff);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.cje-btn:hover,
.cje-btn:focus-visible {
    opacity: 0.86;
}

.cje-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* 复制图标：两个错开的圆角方块，和设计稿里那个一致。纯 CSS，不额外拉图标库。 */
.cje-btn-ico {
    position: relative;
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 1.6px solid currentColor;
    border-radius: 3px;
    opacity: 0.9;
}

.cje-btn-ico::after {
    content: "";
    position: absolute;
    top: -4px;
    left: 3px;
    width: 9px;
    height: 9px;
    border: 1.6px solid currentColor;
    border-radius: 3px;
    background: var(--primary-text, #1a1a1a);
}

.cje-note {
    margin: 8px 0 0;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--secondary-text, #6b7280);
}

.cje-note code {
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    padding: 1px 6px;
    border-radius: 5px;
    background: rgba(127, 127, 127, 0.14);
    color: var(--primary-text, #1a1a1a);
}

.cje-copied {
    margin-left: 6px;
    color: var(--accent, #7b2d3b);
    font-weight: 600;
}

.cje-steps {
    margin: 0 0 4px;
    padding: 0;
    list-style: none;
    counter-reset: cje-step;
}

.cje-steps li {
    position: relative;
    counter-increment: cje-step;
    padding: 6px 0 6px 26px;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--primary-text, #1a1a1a);
}

.cje-steps li::before {
    content: counter(cje-step) ".";
    position: absolute;
    left: 0;
    top: 6px;
    font-weight: 600;
    color: var(--secondary-text, #6b7280);
}

/*
 * .cje-amount / .cje-sep 随「双方各几次」那一行一起撤了（1.7.4）：奖励改成
 * 两段，数字直接写进句子（「they get +1 chance」），不再需要徽章和斜杠。
 */
.cje-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle, rgba(127, 127, 127, 0.22));
}

.cje-stat-num {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.1;
    font-weight: 700;
    color: var(--primary-text, #1a1a1a);
}

.cje-stat-cap {
    margin: 6px 0 0;
    font-size: 0.8125rem;
    color: var(--secondary-text, #6b7280);
}

/* 统计下面那句话和数字差一点点就该分开了：同一条灰字贴着「Chances Earned」
   会读成第四格。 */
.cje-stats + .cje-note {
    margin-top: 18px;
}

@media (max-width: 560px) {
    .cje-page {
        padding: 24px 16px 56px;
    }

    .cje-card {
        padding: 22px 18px 20px;
        border-radius: 14px;
    }

    .cje-title {
        font-size: 1.3125rem;
    }

    .cje-stat-num {
        font-size: 1.5rem;
    }
}
