/* ==========================================================================
   SCL-90 H5 前台样式
   ========================================================================== */

:root {
    --brand: #4B6BFB;
    --brand-d: #3A59E8;
    --mint: #38C0A8;
    --ink: #1B2233;
    --ink-2: #46506B;
    --sub: #77819A;
    --line: #E8ECF6;
    --bg: #F5F7FC;
    --card: #FFFFFF;
    --radius: 18px;
    --shadow: 0 8px 30px rgba(30, 44, 90, .07);
    --shadow-lg: 0 18px 50px rgba(30, 44, 90, .12);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.wrap-sm { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 16px; }

/* ---------------- 导航 ---------------- */
.nav {
    position: sticky; top: 0; z-index: 20;
    backdrop-filter: saturate(180%) blur(14px);
    background: rgba(245, 247, 252, .82);
    border-bottom: 1px solid rgba(232, 236, 246, .9);
}
.nav-in { display: flex; align-items: center; gap: 10px; height: 60px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: .3px; font-size: 15.5px; }
.logo svg { display: block; }
.nav-badge {
    margin-left: auto; font-size: 12px; color: var(--brand);
    background: #EDF1FF; border: 1px solid #E0E7FF;
    padding: 4px 10px; border-radius: 999px;
}

/* ---------------- Hero ---------------- */
.hero { position: relative; overflow: hidden; padding: 54px 0 40px; }
.hero::before, .hero::after {
    content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.hero::before {
    width: 460px; height: 460px; right: -140px; top: -180px;
    background: radial-gradient(circle, rgba(75, 107, 251, .16), rgba(75, 107, 251, 0) 68%);
}
.hero::after {
    width: 380px; height: 380px; left: -160px; top: 120px;
    background: radial-gradient(circle, rgba(56, 192, 168, .16), rgba(56, 192, 168, 0) 68%);
}
.hero-in { position: relative; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12.5px; color: var(--brand);
    background: #fff; border: 1px solid #E3E9FF;
    padding: 6px 13px; border-radius: 999px;
    box-shadow: 0 4px 14px rgba(75, 107, 251, .10);
}
.hero h1 {
    font-size: 40px; line-height: 1.28; margin: 20px 0 14px;
    letter-spacing: -.5px; font-weight: 800;
}
.hero h1 em {
    font-style: normal;
    background: linear-gradient(100deg, #4B6BFB 10%, #38C0A8 90%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: 16px; color: var(--sub); max-width: 560px; margin: 0 0 28px; line-height: 1.85; }
.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn-lg {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 52px; padding: 0 34px; border-radius: 14px;
    background: linear-gradient(120deg, #5474FF, #4B6BFB);
    color: #fff; font-size: 16px; font-weight: 600; letter-spacing: .5px;
    box-shadow: 0 12px 28px rgba(75, 107, 251, .30);
    border: none; cursor: pointer; transition: .2s;
}
.btn-lg:hover { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(75, 107, 251, .36); }
.btn-lg:active { transform: translateY(0); }
.btn-lg.mint { background: linear-gradient(120deg, #35C3AA, #2FB39B); box-shadow: 0 12px 28px rgba(47, 179, 155, .28); }
.hero-hint { font-size: 13px; color: var(--sub); }
.hero-hint b { color: var(--ink-2); font-weight: 600; }

.hero-stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 12px; margin-top: 40px;
}
.hstat {
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    padding: 14px 16px; box-shadow: var(--shadow);
}
.hstat .n { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.hstat .n small { font-size: 12px; font-weight: 500; color: var(--sub); margin-left: 2px; }
.hstat .t { font-size: 12px; color: var(--sub); margin-top: 2px; }

/* ---------------- 通用区块 ---------------- */
.section { padding: 48px 0; }
.section-h { margin-bottom: 24px; }
.section-h h2 { font-size: 24px; margin: 0 0 8px; letter-spacing: -.3px; }
.section-h p { margin: 0; color: var(--sub); font-size: 14px; }

/* 维度网格 */
.dim-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.dim-card {
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    padding: 16px 14px; transition: .22s; position: relative; overflow: hidden;
}
.dim-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #DCE3F8; }
.dim-card .di {
    width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 10px;
}
.dim-card h3 { font-size: 14px; margin: 0 0 4px; font-weight: 700; }
.dim-card p { font-size: 11.5px; color: var(--sub); margin: 0; line-height: 1.65; }

/* 介绍 */
.intro-box {
    background: #fff; border: 1px solid var(--line); border-radius: 20px;
    padding: 34px 36px; box-shadow: var(--shadow);
}
.intro-box h2 { margin: 0 0 16px; font-size: 21px; }
.intro-box p { color: var(--ink-2); font-size: 14.5px; line-height: 2; margin: 0 0 14px; text-align: justify; }
.intro-box p:last-child { margin-bottom: 0; }

/* 隐私三栏 */
.privacy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pv {
    background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px;
}
.pv .ic {
    width: 36px; height: 36px; border-radius: 11px; background: #EEF2FF; color: var(--brand);
    display: flex; align-items: center; justify-content: center; margin-bottom: 12px; font-size: 17px;
}
.pv h4 { margin: 0 0 6px; font-size: 14.5px; }
.pv p { margin: 0; font-size: 12.5px; color: var(--sub); line-height: 1.75; }

/* 页脚 */
.foot {
    padding: 34px 0 46px; text-align: center;
    color: #98A2B8; font-size: 12px; line-height: 2;
}
.foot a { color: var(--sub); border-bottom: 1px dashed #CBD4E6; }

/* ---------------- 入口卡 ---------------- */
.entry-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px 16px; }
.entry-card {
    width: 100%; max-width: 480px; background: #fff; border-radius: 24px;
    box-shadow: var(--shadow-lg); padding: 38px 32px 30px; text-align: center;
}
.entry-card .em {
    width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px;
    background: linear-gradient(135deg, #EEF2FF, #E9FAF6);
    display: flex; align-items: center; justify-content: center;
}
.entry-card h1 { font-size: 22px; margin: 0 0 10px; letter-spacing: -.2px; }
.entry-card .desc { font-size: 13.5px; color: var(--sub); margin: 0 0 24px; line-height: 1.9; }
.entry-meta {
    display: flex; justify-content: center; gap: 18px; margin-bottom: 26px;
    font-size: 12.5px; color: var(--sub);
}
.entry-meta span { display: inline-flex; align-items: center; gap: 5px; }
.entry-meta i { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); display: inline-block; }
.entry-note { font-size: 12px; color: #98A2B8; margin-top: 18px; line-height: 1.8; }
.entry-warn {
    background: #FFF7F0; border: 1px solid #FFE6D2; color: #B96A2E;
    border-radius: 12px; padding: 12px 14px; font-size: 13px; margin: 0 0 20px; text-align: left;
}
.entry-card .btn-lg { width: 100%; }

/* ---------------- 测评页 ---------------- */
body.quiz-page { background: #F5F7FC; padding-bottom: 120px; }

.quiz-top {
    position: sticky; top: 0; z-index: 20;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    padding: 12px 0 10px;
}
.quiz-top .qt-in { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; }
.quiz-top .qt-title { font-size: 14px; font-weight: 600; }
.quiz-top .qt-count { margin-left: auto; font-size: 12.5px; color: var(--sub); }
.quiz-top .qt-count b { color: var(--brand); font-weight: 700; }
.progress { height: 6px; background: #EAEEF8; border-radius: 99px; overflow: hidden; }
.progress i {
    display: block; height: 100%; width: 0; border-radius: 99px;
    background: linear-gradient(90deg, #5A79FF, #38C0A8);
    transition: width .35s cubic-bezier(.3, .9, .4, 1);
}

.qpage { display: none; padding-top: 18px; }
.qpage.on { display: block; animation: qIn .28s cubic-bezier(.25, .8, .35, 1) both; }
.qpage.on.rev { animation-name: qInBack; }
@keyframes qIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes qInBack { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }

.qstep {
    display: flex; align-items: center; gap: 9px;
    font-size: 12px; color: var(--sub); margin: 0 0 13px;
}
.qstep span { color: var(--brand); font-weight: 700; letter-spacing: .5px; }
.qstep em { font-style: normal; color: #A6B0C6; letter-spacing: .5px; }
.qstep::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* 单题卡片 */
.q-one {
    background: #fff; border: 1px solid var(--line); border-radius: 20px;
    padding: 24px 20px 20px; box-shadow: 0 10px 30px rgba(30, 44, 90, .06);
}
.q-sentence {
    margin: 0; font-size: 20px; line-height: 1.6; font-weight: 600;
    color: var(--ink); letter-spacing: .2px;
}
.q-hint-line { font-size: 12px; color: #A6B0C6; margin: 9px 0 0; }

/* 竖排选项：一题一页时空间充裕，做大幅度点击区 */
.q-opts-v { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.q-opts-v label { position: relative; cursor: pointer; display: block; }
.q-opts-v input { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.q-opts-v .opv {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: 14px;
    border: 1px solid #E9EEF8; background: #FBFCFE;
    transition: border-color .16s, background .16s, box-shadow .16s, transform .12s;
}
.q-opts-v .opv i {
    flex: none; width: 26px; height: 26px; border-radius: 9px;
    background: #F0F3FA; color: #98A2B8;
    font-size: 12.5px; font-weight: 700; font-style: normal;
    display: flex; align-items: center; justify-content: center;
    transition: .16s;
}
.q-opts-v .opv b { font-size: 15.5px; font-weight: 600; color: var(--ink-2); }
.q-opts-v .opv small { margin-left: auto; font-size: 12px; color: #AEB7CA; }
.q-opts-v label:active .opv { transform: scale(.985); }
.q-opts-v input:checked + .opv {
    border-color: var(--brand);
    background: linear-gradient(120deg, #F2F5FF, #EAF8F5);
    box-shadow: 0 6px 18px rgba(75, 107, 251, .14);
}
.q-opts-v input:checked + .opv i { background: var(--brand); color: #fff; }
.q-opts-v input:checked + .opv b { color: var(--brand); font-weight: 700; }
.q-opts-v input:checked + .opv small { color: #6D86D8; }

/* 收尾页 */
.finish-hero { text-align: center; padding: 6px 0 20px; }
.finish-hero .fh-ic { display: flex; justify-content: center; margin-bottom: 14px; }
.finish-hero h2 { font-size: 19px; margin: 0 0 9px; letter-spacing: -.2px; }
.finish-hero p { font-size: 13px; color: var(--sub); margin: 0; line-height: 1.85; }

/* 提交前的资料 */
.submit-card {
    background: #fff; border: 1px solid var(--line); border-radius: 18px;
    padding: 22px; margin-top: 18px;
}
.submit-card h3 { margin: 0 0 4px; font-size: 16px; }
.submit-card .sc-sub { font-size: 12.5px; color: var(--sub); margin: 0 0 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.field label { display: block; font-size: 12px; color: var(--sub); margin-bottom: 6px; }
.field input, .field select {
    width: 100%; height: 42px; border-radius: 10px;
    border: 1px solid #E4E9F4; background: #FBFCFE;
    padding: 0 12px; font-size: 14px; color: var(--ink);
    outline: none; transition: .2s; font-family: inherit;
}
.field input:focus, .field select:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(75,107,251,.10); }

/* 底部操作条 */
.quiz-actions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--line);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    backdrop-filter: blur(10px);
}
.quiz-actions .qa-in { max-width: 640px; margin: 0 auto; display: flex; gap: 10px; }
.btn-nav {
    height: 50px; border-radius: 13px; border: 1px solid #E0E6F3; background: #fff;
    color: var(--ink-2); font-size: 15px; font-weight: 500; cursor: pointer;
    padding: 0 22px; transition: .2s; font-family: inherit;
}
.btn-nav:hover { background: #F8FAFF; }
.btn-nav.primary {
    flex: 1; background: linear-gradient(120deg, #5474FF, #4B6BFB); color: #fff;
    border: none; box-shadow: 0 8px 22px rgba(75, 107, 251, .28); font-weight: 600;
}
.btn-nav.primary.mint { background: linear-gradient(120deg, #35C3AA, #2FB39B); box-shadow: 0 8px 22px rgba(47,179,155,.28); }
.btn-nav:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-nav[hidden] { display: none; }

/* Toast */
.toast {
    position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 12px);
    background: rgba(27, 34, 51, .92); color: #fff; font-size: 13.5px;
    padding: 10px 18px; border-radius: 10px; z-index: 99;
    opacity: 0; pointer-events: none; transition: .25s;
    max-width: 84vw; text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* 结果页提示 */
.alert {
    border-radius: 12px; padding: 13px 16px; font-size: 13.5px;
    margin: 16px 0; line-height: 1.8;
}
.alert-warn { background: #FFF7F0; border: 1px solid #FFE6D2; color: #B96A2E; }
.alert-info { background: #F1F5FF; border: 1px solid #E0E8FF; color: #3F59B8; }
.alert-err { background: #FEF2F2; border: 1px solid #FBDADA; color: #B43636; }

/* 响应式 */
@media (max-width: 860px) {
    .dim-grid { grid-template-columns: repeat(3, 1fr); }
    .privacy-grid { grid-template-columns: 1fr; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    body { font-size: 14.5px; }
    .wrap { padding: 0 16px; }
    .hero { padding: 34px 0 24px; }
    .hero h1 { font-size: 29px; margin: 16px 0 12px; }
    .hero-sub { font-size: 14px; }
    .btn-lg { height: 50px; font-size: 15.5px; padding: 0 26px; width: 100%; }
    .hero-cta { gap: 12px; }
    .hero-hint { text-align: center; width: 100%; }
    .dim-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .dim-card { padding: 13px 12px; }
    .intro-box { padding: 24px 20px; }
    .intro-box p { font-size: 13.5px; }
    .section { padding: 34px 0; }
    .section-h h2 { font-size: 20px; }
    .q-one { padding: 20px 16px 16px; border-radius: 18px; }
    .q-sentence { font-size: 18.5px; line-height: 1.55; }
    .q-opts-v { gap: 9px; margin-top: 18px; }
    .q-opts-v .opv { padding: 13px 14px; gap: 11px; }
    .q-opts-v .opv b { font-size: 15px; }
    .q-opts-v .opv small { font-size: 11.5px; }
    .field-row { grid-template-columns: 1fr 1fr; }
    .field-row .field:first-child { grid-column: 1 / -1; }
    .entry-card { padding: 30px 22px 24px; border-radius: 20px; }
    .nav-badge { font-size: 11px; padding: 3px 9px; }
    .logo span { font-size: 14.5px; }
}
