/* ============================================================
   数学工具箱 · 首页
   ============================================================ */
:root {
    --bg: #f7f8fc;
    --surface: #ffffff;
    --line: #e7e9f2;
    --line-2: #d8dce9;
    --ink: #101728;
    --ink-2: #4b5568;
    --ink-3: #8a90a5;
    --accent: #4f46e5;
    --accent-soft: #eef0ff;
    --r-lg: 16px;
    --shadow: 0 1px 2px rgba(16, 23, 40, .04), 0 18px 40px -28px rgba(16, 23, 40, .45);
    --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background:
        radial-gradient(900px 420px at 78% -8%, #edefff 0%, rgba(237, 239, 255, 0) 62%),
        radial-gradient(700px 360px at 8% 4%, #f2f7ff 0%, rgba(242, 247, 255, 0) 60%),
        var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
.grow { flex: 1; }
code {
    font-family: var(--mono);
    font-size: .92em;
    background: #f3f4fa;
    border: 1px solid #ebedf5;
    padding: 1px 5px;
    border-radius: 5px;
    color: #3f4761;
}

.ico {
    width: 16px; height: 16px;
    fill: none; stroke: currentColor;
    stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

.wrap {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 28px 40px;
}

/* ---------- 导航 ---------- */
.nav {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 68px;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
    width: 27px; height: 27px;
    border-radius: 8px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, #5b52ea, #8b5cf6);
    color: #fff; font-size: 15px; font-weight: 700;
    box-shadow: 0 5px 12px -5px rgba(79, 70, 229, .9);
}
.brand-name { font-weight: 650; letter-spacing: .2px; font-size: 14px; }
.nav-note { font-size: 11.5px; color: var(--ink-3); }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 36px; padding: 0 16px;
    border: 1px solid transparent; border-radius: 10px;
    font-size: 13px; font-weight: 550; letter-spacing: .2px;
    cursor: pointer; white-space: nowrap;
    transition: transform .15s, box-shadow .18s, background .18s, border-color .18s, color .18s;
}
.btn.sm { height: 32px; padding: 0 13px; font-size: 12.5px; }
.btn.lg { height: 46px; padding: 0 24px; font-size: 14.5px; border-radius: 12px; }
.btn.primary {
    background: linear-gradient(180deg, #5b52ea, #4f46e5);
    color: #fff; border-color: #463dd6;
    box-shadow: 0 1px 2px rgba(79, 70, 229, .4), 0 12px 26px -14px rgba(79, 70, 229, .95);
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(79, 70, 229, .4), 0 16px 30px -14px rgba(79, 70, 229, 1); }
.btn.ghost { background: rgba(255, 255, 255, .8); border-color: var(--line-2); color: var(--ink-2); }
.btn.ghost:hover { background: #fff; color: var(--ink); border-color: #c6cbdd; }

/* ---------- 首屏 ---------- */
.hero {
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    gap: 56px;
    align-items: center;
    padding: 44px 0 56px;
}

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 12px 5px 10px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .8);
    border-radius: 99px;
    font-size: 11.5px; color: var(--ink-2); letter-spacing: .2px;
}
.eyebrow .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .16);
}

h1 {
    margin: 20px 0 16px;
    font-size: clamp(42px, 5.4vw, 66px);
    line-height: 1.06;
    letter-spacing: -.035em;
    font-weight: 700;
}
h1::after {
    content: "";
    display: block;
    width: 54px; height: 4px;
    margin-top: 22px;
    border-radius: 99px;
    background: linear-gradient(90deg, #4f46e5, #a78bfa);
}

.lede {
    font-size: 14.5px;
    color: var(--ink-2);
    max-width: 460px;
    line-height: 1.75;
    text-wrap: pretty;
}

.hero-actions { display: flex; gap: 10px; margin: 26px 0 30px; }

.facts {
    display: flex;
    gap: 34px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    max-width: 440px;
}
.facts div { display: flex; flex-direction: column; gap: 2px; }
.facts dt { font-size: 11px; color: var(--ink-3); letter-spacing: .3px; }
.facts dd { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }

/* ---------- 预览卡片 ---------- */
.hero-art { position: relative; }

.art-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 12px 12px 10px;
    box-shadow: 0 2px 4px rgba(16, 23, 40, .03), 0 30px 60px -34px rgba(16, 23, 40, .5);
    transform: perspective(1200px) rotateY(-4deg) rotateX(1.5deg);
    transition: transform .4s cubic-bezier(.2, .8, .3, 1);
}
.art-card:hover { transform: perspective(1200px) rotateY(0deg) rotateX(0deg); }

.art-svg {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: #fff;
}

.art-legend {
    display: flex; flex-wrap: wrap; gap: 14px;
    padding: 10px 6px 2px;
}
.lg-item {
    display: flex; align-items: center; gap: 7px;
    font-family: var(--mono); font-size: 11.5px; color: var(--ink-2);
}
.lg-item i { width: 14px; height: 3px; border-radius: 2px; display: block; }

.art-note {
    margin-top: 14px;
    text-align: center;
    font-size: 11.5px;
    color: var(--ink-3);
}

/* ---------- 三步 ---------- */
.how { padding: 26px 0 40px; }
.how h2, .features h2 {
    font-size: 13px; font-weight: 650; color: var(--ink-3);
    letter-spacing: 1.2px; text-transform: uppercase;
    margin-bottom: 18px;
}

.steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.steps li {
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 20px 20px 18px;
}
.step-no {
    font-family: var(--mono); font-size: 11px; font-weight: 600;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 2px 7px; border-radius: 6px;
    letter-spacing: .5px;
}
.steps h3 { margin: 12px 0 7px; font-size: 14.5px; font-weight: 620; letter-spacing: -.01em; }
.steps p { font-size: 12.8px; color: var(--ink-2); line-height: 1.75; }

/* ---------- 特性 ---------- */
.features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding-bottom: 40px;
}
.features > h2 { grid-column: 1 / -1; margin-bottom: -2px; }

.feature {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 22px;
    box-shadow: 0 1px 2px rgba(16, 23, 40, .03);
    transition: box-shadow .2s, transform .2s, border-color .2s;
}
.feature:hover {
    border-color: var(--line-2);
    box-shadow: 0 2px 4px rgba(16, 23, 40, .04), 0 20px 40px -30px rgba(16, 23, 40, .5);
    transform: translateY(-2px);
}
.f-ico {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    margin-bottom: 14px;
}
.f-ico svg {
    width: 19px; height: 19px;
    fill: none; stroke: currentColor;
    stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.feature h3 { font-size: 14px; font-weight: 620; margin-bottom: 7px; letter-spacing: -.01em; }
.feature p { font-size: 12.8px; color: var(--ink-2); line-height: 1.75; }

/* ---------- 页脚 ---------- */
.foot {
    display: flex; align-items: center; gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 11.5px; color: var(--ink-3);
}
.foot a { color: var(--ink-2); }
.foot a:hover { color: var(--accent); }
.foot-dot { color: #ccd2e0; }

/* ---------- 响应式 ---------- */
@media (max-width: 920px) {
    .wrap { padding: 0 20px 32px; }
    .hero { grid-template-columns: 1fr; gap: 32px; padding: 22px 0 40px; }
    .art-card { transform: none; }
    .steps { grid-template-columns: 1fr; }
    .features { grid-template-columns: 1fr; }
    .nav-note { display: none; }
    h1::after { margin-top: 16px; }
}

/* ---------- 顶栏里的登录状态 ---------- */
.sso-who {
    display: inline-flex; align-items: baseline; gap: 7px;
    font-size: 12px; color: #8d95a8; white-space: nowrap;
}
.sso-who b { font-weight: 600; color: #5b6480; }
.sso-who a { color: #a4abbe; text-decoration: none; }
.sso-who a:hover { color: #4f46e5; }

.sso-login {
    display: inline-flex; align-items: center; height: 28px; padding: 0 13px;
    border: 1px solid #d8dcf5; border-radius: 8px; background: #fff;
    font-size: 12px; color: #4f46e5; text-decoration: none; white-space: nowrap;
    transition: border-color .15s, background .15s;
}
.sso-login:hover { border-color: #b6b9f0; background: #f4f4ff; }

@media (max-width: 760px) {
    .sso-who b { display: none; }
}
