/* =========================================================================
   认证题库网 · 站点视觉（在 style.css 基础上叠加，不覆盖存量后台样式）
   ========================================================================= */

/* 容器宽度统一由 style.css 的 .container 定义（含 width:100% 修正），此处不再重复覆盖 */


/* 品牌 */
.brand { display: inline-flex; align-items: center; gap: 8px; letter-spacing: .5px; }
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 7px;
    background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35);
    font-size: 14px; font-weight: 700;
}
.nav > a.is-current { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

/* 页脚 */
.footer { border-top: 1px solid var(--line); background: #fff; margin-top: 48px; }
.footer-inner {
    max-width: 1200px; margin: 0 auto; padding: 18px 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    color: var(--muted); font-size: 13px; flex-wrap: wrap;
}
.footer-links a { color: var(--muted); margin-left: 16px; text-decoration: none; }
.footer-links a:hover { color: var(--primary); }

/* 通用 */
.eyebrow {
    display: inline-block; font-size: 12px; letter-spacing: 2px;
    color: var(--primary); font-weight: 700; text-transform: uppercase;
    margin-bottom: 8px;
}
.section-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; margin: 6px 0 16px; flex-wrap: wrap;
}
.section-head h2 { margin: 0; font-size: 20px; }
.section-head p { margin: 4px 0 0; font-size: 13px; }
.link-arrow { color: var(--primary); font-size: 14px; text-decoration: none; white-space: nowrap; }
.link-arrow:hover { text-decoration: underline; }
.meta-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.chip {
    display: inline-flex; align-items: baseline; gap: 6px;
    background: #fff; border: 1px solid var(--line); border-radius: 999px;
    padding: 5px 12px; font-size: 13px; color: var(--muted);
}
.chip b { color: var(--ink); font-size: 14px; }
.chip-ok { background: #eefaf3; border-color: #b7e6c8; color: #1f7a45; }
.chip-ok b { color: #1f7a45; }
.diff-tag {
    display: inline-block; padding: 2px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; background: #eef1f6; color: var(--muted);
}
.diff-1 { background: #e7f7ee; color: #1f7a45; }
.diff-2 { background: #eef3ff; color: var(--primary-d); }
.diff-3 { background: #fff4e5; color: #a15c00; }
.diff-4 { background: #fdeceb; color: #b23226; }
.clamp-2 {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}

/* -------------------------------------------------------------------------
   首页
   ------------------------------------------------------------------------- */
.hero {
    display: grid; grid-template-columns: 1.55fr 1fr; gap: 28px;
    align-items: stretch; margin: 12px 0 36px;
}
.hero-copy {
    background: linear-gradient(135deg, #ffffff 0%, #f3f7ff 100%);
    border: 1px solid #e3ebfb; border-radius: 20px; padding: 34px 34px 28px;
    box-shadow: 0 10px 30px rgba(59, 110, 245, .07);
}
.hero-copy h1 {
    font-size: 40px; line-height: 1.2; margin: 0 0 14px; letter-spacing: -1px;
    color: #16233a;
}
.hero-sub { color: var(--muted); font-size: 15.5px; line-height: 1.8; margin: 0 0 22px; max-width: 560px; }
.hero-sub b { color: var(--ink); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.hero-stats { display: flex; gap: 34px; border-top: 1px dashed var(--line); padding-top: 18px; }
.hero-stat { display: flex; flex-direction: column; }
.hero-stat b { font-size: 26px; color: var(--primary-d); line-height: 1.2; }
.hero-stat span { font-size: 12.5px; color: var(--muted); }

.hero-panel {
    background: linear-gradient(160deg, #2f59c7, #3b6ef5 55%, #6a8bff);
    color: #fff; border-radius: 20px; padding: 24px 24px 20px;
    display: flex; flex-direction: column; box-shadow: 0 14px 30px rgba(47, 89, 199, .25);
}
.hero-panel-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; opacity: .95; }
.hero-panel-head .tag { background: rgba(255, 255, 255, .18); color: #fff; }
.hero-steps { list-style: none; margin: 18px 0 20px; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.hero-steps li { display: flex; gap: 12px; align-items: flex-start; }
.hero-steps i {
    flex: none; width: 26px; height: 26px; border-radius: 50%;
    background: rgba(255, 255, 255, .2); display: flex; align-items: center; justify-content: center;
    font-style: normal; font-size: 13px; font-weight: 700;
}
.hero-steps b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.hero-steps span { font-size: 12.5px; opacity: .82; }
.hero-panel-link {
    margin-top: auto; color: #fff; text-decoration: none; font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, .22); padding-top: 14px;
}
.hero-panel-link:hover { opacity: .85; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.vendor-grid { display: flex; flex-direction: column; gap: 18px; }
.vendor-card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.vendor-head {
    display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
    padding: 20px 22px 14px; border-bottom: 1px solid var(--line);
}
.vendor-head h3 { margin: 0 0 6px; font-size: 19px; }
.vendor-head h3 a { color: var(--ink); text-decoration: none; }
.vendor-head h3 a:hover { color: var(--primary); }
.vendor-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.vendor-count {
    flex: none; background: #eef3ff; color: var(--primary-d);
    border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 600;
}
.vendor-body { padding: 16px 22px 6px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px 22px; }
.dir-block { min-width: 0; }
.dir-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.dir-title a { color: var(--ink); text-decoration: none; }
.dir-title a:hover { color: var(--primary); }
.dir-count { color: var(--muted); font-size: 12px; font-weight: 500; }
.leaf-links { display: flex; flex-direction: column; gap: 5px; }
.leaf-link {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 6px 10px; border-radius: 8px; text-decoration: none;
    color: #46536a; font-size: 13px; background: #f8fafd; border: 1px solid transparent;
}
.leaf-link em { font-style: normal; color: var(--muted); font-size: 11.5px; }
.leaf-link:hover { background: #eef3ff; border-color: #d8e4ff; color: var(--primary-d); }
.vendor-foot { padding: 12px 22px 16px; }
.vendor-foot a { color: var(--primary); font-size: 13px; text-decoration: none; }
.vendor-foot a:hover { text-decoration: underline; }

.home-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 16px; }
.side-card { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 18px; }
.side-card h3 { margin: 0 0 8px; font-size: 15px; }
.side-card p { margin: 0 0 12px; font-size: 13px; line-height: 1.7; }
.side-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.side-me { border-left: 3px solid var(--primary); }

/* 排行榜卡 */
.rank-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.rank-head h3 { margin: 0; font-size: 15px; }
.rank-period-note { font-size: 12px; color: var(--muted); }
.rank-tabs { display: inline-flex; background: #f1f4f9; border-radius: 9px; padding: 3px; margin-bottom: 12px; }
.rank-tabs button, .rank-tabs a {
    border: 0; background: transparent; padding: 6px 14px; border-radius: 7px;
    font-size: 13px; color: var(--muted); cursor: pointer; text-decoration: none;
}
.rank-tabs button.active, .rank-tabs a.active { background: #fff; color: var(--primary-d); font-weight: 600; box-shadow: 0 1px 3px rgba(20, 30, 50, .12); }
.rank-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; }
.rank-item {
    display: grid; grid-template-columns: 24px minmax(0, 1fr) auto;
    grid-template-areas: "no name points" ". meta meta";
    row-gap: 2px; align-items: center; padding: 8px 4px; border-bottom: 1px dashed var(--line);
}
.rank-item:last-child { border-bottom: 0; }
.rank-no {
    grid-area: no; width: 22px; height: 22px; border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: var(--muted); background: #f1f4f9;
}
.rank-1 .rank-no { background: #ffd76e; color: #7a4b00; }
.rank-2 .rank-no { background: #dfe6ef; color: #46536a; }
.rank-3 .rank-no { background: #f3d3b8; color: #8a4b1e; }
.rank-name { grid-area: name; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-points { grid-area: points; font-size: 14px; font-weight: 700; color: var(--primary-d); }
.rank-points em { font-style: normal; font-size: 11px; margin-left: 2px; color: var(--muted); font-weight: 500; }
.rank-meta { grid-area: meta; font-size: 11.5px; color: var(--muted); }
.rank-empty { padding: 18px 4px; color: var(--muted); font-size: 13px; text-align: center; }
.rank-more { display: block; text-align: center; font-size: 13px; color: var(--primary); text-decoration: none; padding-top: 10px; border-top: 1px solid var(--line); }
.rank-more:hover { text-decoration: underline; }

/* -------------------------------------------------------------------------
   认证页
   ------------------------------------------------------------------------- */
.breadcrumb { font-size: 13px; color: var(--muted); margin: -6px 0 16px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { margin: 0 7px; color: #c3ccda; }
.breadcrumb-current { color: var(--ink); }

.cert-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.cert-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 16px; }
.cert-main { min-width: 0; }

.cert-hero {
    background: linear-gradient(135deg, #ffffff, #f4f8ff);
    border: 1px solid #e3ebfb; border-radius: 18px; padding: 28px 30px; margin-bottom: 22px;
}
.cert-hero h1 { margin: 0 0 10px; font-size: 30px; line-height: 1.3; color: #16233a; }
.cert-hero-sub { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.8; }
.cert-hero-leaf { background: linear-gradient(135deg, #f7faff, #eef4ff); }
.leaf-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.leaf-score { flex: none; text-align: center; background: #fff; border: 1px solid #e3ebfb; border-radius: 14px; padding: 14px 18px; min-width: 96px; }
.leaf-score-num { display: block; font-size: 28px; font-weight: 700; color: var(--primary-d); line-height: 1.2; }
.leaf-score-label { font-size: 12px; color: var(--muted); }

.cert-section { margin-bottom: 26px; }
.direction-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.direction-card { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 18px 20px; }
.direction-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.direction-card h3 { margin: 0; font-size: 16.5px; }
.direction-card h3 a { color: var(--ink); text-decoration: none; }
.direction-card h3 a:hover { color: var(--primary); }
.direction-card p { font-size: 13px; line-height: 1.7; margin: 0 0 10px; }
.cert-level-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cert-level-list a {
    display: flex; justify-content: space-between; gap: 10px; font-size: 13px;
    padding: 7px 10px; border-radius: 8px; background: #f8fafd; text-decoration: none; color: #46536a;
}
.cert-level-list a:hover { background: #eef3ff; color: var(--primary-d); }
.cert-level-list em { font-style: normal; color: var(--muted); font-size: 11.5px; }
.direction-single { display: inline-block; margin-top: 6px; font-size: 13px; color: var(--primary); text-decoration: none; }

.cert-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.cert-card { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.cert-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cert-card h3 { margin: 0; font-size: 17px; }
.cert-card h3 a { color: var(--ink); text-decoration: none; }
.cert-card h3 a:hover { color: var(--primary); }
.cert-card-name { margin: 0; font-size: 12.5px; color: var(--muted); }
.cert-card p.muted { font-size: 13px; line-height: 1.7; margin: 0; }
.cert-card footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.cert-card footer a { font-size: 13px; color: var(--primary); text-decoration: none; }

.intro-card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 24px 26px; margin-bottom: 26px; }
.intro-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.intro-head h2 { margin: 0; font-size: 20px; }
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 26px; }
.intro-item { border-left: 3px solid #e3ebfb; padding-left: 14px; }
.intro-item h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 6px; color: var(--primary-d); }
.intro-item h3 i { font-style: normal; font-size: 13px; opacity: .85; }
.intro-item p { margin: 0; font-size: 13.5px; line-height: 1.8; color: #46536a; }
.intro-wide { grid-column: 1 / -1; border-left-color: #ffe2b8; }
.intro-wide h3 { color: #a15c00; }
.intro-diff { display: flex; align-items: center; gap: 10px; }
.diff-meter { display: inline-flex; gap: 4px; }
.diff-meter i { width: 18px; height: 6px; border-radius: 3px; background: #e6eaf0; display: inline-block; }
.diff-meter i.on { background: var(--primary); }

.question-table { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.question-row { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.question-row:last-child { border-bottom: 0; }
.question-row-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.question-stem { margin: 0 0 10px; font-size: 14.5px; line-height: 1.75; }
.option-preview { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.option-preview li { display: flex; gap: 8px; font-size: 13px; color: #5a6679; }
.option-preview b { flex: none; width: 18px; height: 18px; border-radius: 5px; background: #f1f4f9; color: var(--muted); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }

.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; font-size: 13px; }
.pager-btn { padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; }
.pager-btn:hover { border-color: var(--primary); color: var(--primary); }
.pager-info { color: var(--muted); }

.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.related-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.related-card:hover { border-color: #c9d9ff; box-shadow: var(--shadow); }
.related-name { font-size: 14px; color: var(--ink); font-weight: 600; }
.related-meta { font-size: 12px; color: var(--muted); }

.empty-box { background: var(--card); border: 1px dashed var(--line); border-radius: 14px; padding: 36px 24px; text-align: center; }
.empty-box h3, .empty-box h2, .empty-box h1 { margin: 0 0 8px; font-size: 22px; }
.empty-box p { margin: 0 0 16px; }
.empty-page { margin: 60px auto; max-width: 520px; }

/* -------------------------------------------------------------------------
   每日答题
   ------------------------------------------------------------------------- */
.quiz-hero { margin: 6px 0 22px; }
.quiz-hero h1 { margin: 0 0 8px; font-size: 30px; }
.quiz-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.quiz-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 16px; }
.quiz-stage { min-width: 0; }
.quiz-panel { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 24px 26px; }
.quiz-panel-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.quiz-panel-head h2 { margin: 0; font-size: 18px; }
.picker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.field > span { font-weight: 600; color: #46536a; }
.field select {
    width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line);
    border-radius: 9px; background: #fff; font-size: 14px; font-family: inherit; color: var(--ink);
}
.field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 110, 245, .14); }
.picker-info { margin: 16px 0 20px; padding: 12px 14px; background: #f8fafd; border-radius: 10px; font-size: 13px; display: flex; gap: 18px; flex-wrap: wrap; }
.picker-info b { color: var(--ink); }
.quiz-start-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.login-hint { font-size: 12.5px; }

.quiz-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.quiz-progress-wrap { flex: 1; display: flex; align-items: center; gap: 12px; }
.quiz-progress { flex: 1; height: 8px; background: #eef1f6; border-radius: 999px; overflow: hidden; }
.quiz-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, #3b6ef5, #6a8bff); transition: width .2s; }
.quiz-progress-text { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.quiz-timer { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--primary-d); background: #eef3ff; padding: 4px 10px; border-radius: 8px; }
.quiz-question-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.quiz-stem { font-size: 18px; line-height: 1.7; margin: 0 0 18px; }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
    display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
    border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; line-height: 1.65;
    transition: border-color .15s, background .15s;
}
.quiz-option:hover { border-color: #c9d9ff; background: #f8faff; }
.quiz-option input { margin-top: 3px; accent-color: var(--primary); }
.quiz-option.checked { border-color: var(--primary); background: #eef3ff; }
.quiz-option b { flex: none; width: 22px; height: 22px; border-radius: 6px; background: #f1f4f9; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.quiz-option.checked b { background: var(--primary); color: #fff; }
.quiz-actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.quiz-tip { margin-left: auto; font-size: 12px; }

.score-ring {
    width: 118px; height: 118px; border-radius: 50%; flex: none;
    background: conic-gradient(var(--primary) var(--p, 0%), #eef1f6 0);
    display: flex; align-items: baseline; justify-content: center; gap: 2px;
    position: relative;
}
.score-ring::before { content: ""; position: absolute; inset: 9px; background: #fff; border-radius: 50%; }
.score-value { position: relative; font-size: 36px; font-weight: 700; color: var(--primary-d); }
.score-unit { position: relative; font-size: 12px; color: var(--muted); }
.result-head { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.result-summary h2 { margin: 0 0 6px; font-size: 20px; }
.result-summary p { margin: 0 0 12px; font-size: 13px; }
.result-stats { display: flex; gap: 26px; }
.result-stats div { display: flex; flex-direction: column; }
.result-stats b { font-size: 20px; color: var(--ink); }
.result-stats span { font-size: 12px; color: var(--muted); }
.result-actions { display: flex; gap: 10px; margin: 20px 0 6px; flex-wrap: wrap; }
.review-title { margin: 22px 0 12px; font-size: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.review-list { display: flex; flex-direction: column; gap: 12px; }
.review-item { border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 10px; padding: 14px 16px; }
.review-item.wrong { border-left-color: var(--bad); }
.review-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.review-stem { margin: 0 0 10px; font-size: 14px; line-height: 1.7; }
.review-answers { display: flex; gap: 18px; font-size: 13px; flex-wrap: wrap; }
.review-answers .yours.bad { color: var(--bad); }
.review-answers .right { color: var(--ok); font-weight: 600; }
.review-exp { margin: 10px 0 0; padding: 10px 12px; background: #f8fafd; border-radius: 8px; font-size: 13px; line-height: 1.75; color: #46536a; }
.rule-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 2; }
.rule-list b { color: var(--ink); }

/* -------------------------------------------------------------------------
   排行榜 / 个人荣誉
   ------------------------------------------------------------------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 6px 0 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0 0 8px; font-size: 30px; }
.page-head .cert-hero-sub { max-width: 720px; }
.rank-tabs-lg { background: #eef1f6; padding: 4px; border-radius: 11px; }
.rank-tabs-lg a { padding: 8px 20px; font-size: 14px; }
.ranking-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; align-items: start; }
.ranking-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 16px; }
.my-rank-card {
    display: flex; align-items: center; gap: 16px; background: linear-gradient(120deg, #eef4ff, #f8fbff);
    border: 1px solid #dbe6ff; border-radius: 14px; padding: 16px 20px; margin-bottom: 16px;
}
.my-rank-no { font-size: 26px; font-weight: 700; color: var(--primary-d); min-width: 62px; }
.my-rank-copy { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.my-rank-copy b { font-size: 15px; }
.my-rank-copy span { font-size: 12.5px; }
.ranking-table { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.ranking-row {
    display: grid; grid-template-columns: 72px minmax(0, 1fr) 90px 100px 90px;
    align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: 14px;
}
.ranking-row:last-child { border-bottom: 0; }
.ranking-head { background: #f7f9fc; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.ranking-row.is-me { background: #f5f9ff; box-shadow: inset 3px 0 0 var(--primary); }
.rank-cell { display: flex; }
.rank-medal { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-weight: 700; font-size: 13px; background: #f1f4f9; color: var(--muted); }
.medal-1 { background: #ffd76e; color: #7a4b00; }
.medal-2 { background: #dfe6ef; color: #46536a; }
.medal-3 { background: #f3d3b8; color: #8a4b1e; }
.name-cell { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.points-cell { color: var(--primary-d); font-weight: 700; font-size: 15px; }

.trend-chart { width: 100%; height: 150px; }
.trend-legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.trend-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--primary); display: inline-block; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat-card { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; }
.stat-card .stat-label { font-size: 12.5px; color: var(--muted); }
.stat-card b { font-size: 28px; color: var(--primary-d); line-height: 1.25; }
.stat-card em { font-style: normal; font-size: 12px; color: var(--muted); }
.honor-section { margin-bottom: 28px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.badge-card { background: var(--card); border-radius: 14px; padding: 18px; text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.badge-card .badge-icon { font-size: 26px; color: #cbd4e1; }
.badge-card b { font-size: 14px; color: var(--muted); }
.badge-card span:last-child { font-size: 12px; color: #9aa5b5; }
.badge-card.earned { background: linear-gradient(160deg, #fffdf5, #fff7e0); border: 1px solid #ffe2b8; }
.badge-card.earned .badge-icon { color: #e0a300; }
.badge-card.earned b { color: #7a4b00; }
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.recent-card { background: var(--card); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.recent-score { font-size: 24px; font-weight: 700; color: var(--primary-d); }
.recent-score em { font-size: 12px; color: var(--muted); font-style: normal; margin-left: 2px; }
.recent-cert { font-size: 13px; font-weight: 600; }
.recent-meta { font-size: 12px; color: var(--muted); }
.history-table { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.history-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 80px 100px 80px; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: center; }
.history-row:last-child { border-bottom: 0; }
.history-head { background: #f7f9fc; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.history-score { color: var(--primary-d); font-weight: 700; }

/* -------------------------------------------------------------------------
   响应式
   ------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .hero { grid-template-columns: 1fr; }
    .home-grid, .cert-layout, .quiz-layout, .ranking-layout { grid-template-columns: 1fr; }
    .home-side, .cert-side, .quiz-side, .ranking-side { position: static; }
    .hero-copy h1 { font-size: 32px; }
}
@media (max-width: 720px) {
    .hero-copy, .hero-panel, .cert-hero, .quiz-panel, .intro-card { padding: 22px 18px; }
    .hero-copy h1, .cert-hero h1, .page-head h1, .quiz-hero h1 { font-size: 26px; }
    .hero-stats { gap: 20px; }
    .picker-grid { grid-template-columns: 1fr; }
    .intro-grid { grid-template-columns: 1fr; }
    .option-preview { grid-template-columns: 1fr; }
    .ranking-row { grid-template-columns: 46px minmax(0, 1fr) 66px 70px 60px; padding: 10px 14px; font-size: 13px; }
    .history-row { grid-template-columns: 120px minmax(0, 1fr) 56px 72px 56px; padding: 10px 14px; font-size: 12.5px; }
    .result-head { gap: 16px; }
    .leaf-head { flex-direction: column; }
    .leaf-score { align-self: flex-start; }
}

/* ===== 个人中心 /profile（原个人荣誉页并入） ===== */
.profile-hero {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    flex-wrap: wrap; margin: 6px 0 16px; padding: 24px 28px;
    background: linear-gradient(135deg, #ffffff, #f4f8ff);
    border: 1px solid #e3ebfb; border-radius: 18px;
}
.profile-main { display: flex; align-items: center; gap: 18px; min-width: 0; }
.profile-avatar {
    width: 64px; height: 64px; flex: none; display: grid; place-items: center;
    border-radius: 18px; background: linear-gradient(135deg, #3b6ef5, #6a8bff);
    color: #fff; font-size: 26px; font-weight: 700;
    box-shadow: 0 8px 20px rgba(59, 110, 245, .28);
    overflow: hidden; position: relative;
}
/* DiceBear 头像：加载成功时铺满容器；失败或被拦截时回退昵称首字母 */
.profile-avatar .avatar-img { width: 100%; height: 100%; display: block; object-fit: cover; }
.profile-avatar .avatar-fallback { display: none; line-height: 1; }
.profile-avatar.is-fallback .avatar-fallback { display: block; }
.profile-ident h1 { margin: 2px 0 6px; font-size: 26px; line-height: 1.2; color: #16233a; }
.profile-sub { margin: 0; font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.profile-sub b { color: var(--ink); }
.dot-sep { color: #c2ccdb; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.rank-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.rank-chip {
    display: flex; flex-direction: column; gap: 2px; padding: 14px 18px;
    background: var(--card); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--shadow); text-decoration: none;
    transition: border-color .16s ease, transform .16s ease;
}
.rank-chip:hover { border-color: #bcd0ff; transform: translateY(-1px); text-decoration: none; }
.rank-chip-label { font-size: 12.5px; color: var(--muted); }
.rank-chip-num { font-size: 24px; line-height: 1.2; color: var(--primary-d); }
.rank-chip-num.muted-rank { color: #c2ccdb; }
.rank-chip em { font-style: normal; font-size: 12px; color: var(--muted); }

@media (max-width: 720px) {
    .profile-hero { padding: 20px 18px; }
    .profile-avatar { width: 52px; height: 52px; border-radius: 14px; font-size: 22px; }
    .profile-ident h1 { font-size: 22px; }
    .rank-strip { grid-template-columns: 1fr; }
}
