:root {
    --home-brand: #246bfd;
    --home-brand-dark: #1554d1;
    --home-brand-soft: #eef5ff;
    --home-page: #f5f7fa;
    --home-surface: #ffffff;
    --home-text: #182033;
    --home-text-secondary: #667085;
    --home-text-muted: #98a2b3;
    --home-line: #e8edf5;
    --home-success: #18b889;
    --home-warning: #f5a524;
    --home-danger: #e85151;
    --home-shadow: 0 12px 36px rgb(26 40 72 / 9%);
    --home-radius: 12px;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--home-text);
    background: var(--home-page);
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 1180px;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
}

body,
button,
input,
select,
textarea {
    font: inherit;
}

button,
input,
select,
textarea {
    outline: none;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid rgb(36 107 253 / 24%);
    outline-offset: 2px;
}

.home-body .el-select__input:focus-visible {
    outline: none;
    outline-offset: 0;
}

[hidden] {
    display: none !important;
}

.home-body {
    color: var(--home-text);
    background: var(--home-page);
}

.home-site-shell {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.catalog-update-notice,
.catalog-page-heading > .catalog-update-notice {
    margin: 0;
    padding: 12px 16px;
    border: 1px solid #dbe7fa;
    border-radius: 10px;
    color: #315582;
    background: #eef5ff;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: break-word;
}

.catalog-page-heading > .catalog-update-notice {
    margin-top: 18px;
}

.home-main {
    flex: 1;
}

.home-container,
.content-shell {
    width: min(calc(100% - 64px), 1280px);
    margin: 0 auto;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 16px;
    z-index: 200;
    padding: 10px 14px;
    border-radius: 8px;
    color: #fff;
    background: var(--home-brand-dark);
    transform: translateY(-160%);
    transition: transform 150ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

/* Header */
.home-header {
    position: sticky;
    top: 0;
    z-index: 120;
    border-bottom: 1px solid var(--home-line);
    background: rgb(255 255 255 / 96%);
    backdrop-filter: blur(18px);
    transition: box-shadow 180ms ease, background-color 180ms ease;
}

.home-auth-body .home-header {
    position: relative;
    top: auto;
    z-index: 30;
    backdrop-filter: none;
}

.home-header-inner {
    display: grid;
    min-height: 72px;
    align-items: center;
    grid-template-columns: 240px 1fr 240px;
}

.home-brand {
    display: inline-flex;
    width: max-content;
    align-self: stretch;
    align-items: center;
    gap: 11px;
}

.home-brand-logo {
    display: block;
    width: auto;
    height: 100%;
    max-height: 60px;
    object-fit: contain;
    flex: 0 0 auto;
}

.home-brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(145deg, #4b89ff, var(--home-brand));
    box-shadow: 0 7px 18px rgb(36 107 253 / 24%);
    font-size: 20px;
    font-weight: 750;
}

.home-brand-copy {
    display: grid;
    gap: 6px;
    line-height: 1.2;
}

.home-brand-copy strong {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .02em;
}

.home-brand-copy small {
    color: var(--home-text-secondary);
    font-size: 11px;
    letter-spacing: .08em;
}

.home-nav {
    display: flex;
    align-self: stretch;
    justify-content: center;
    gap: 34px;
}

.home-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: #475467;
    font-size: 14px;
    font-weight: 500;
    transition: color 150ms ease;
}

.home-nav-link::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--home-brand);
    content: "";
    opacity: 0;
    transform: scaleX(.55);
    transition: opacity 150ms ease, transform 150ms ease;
}

.home-nav-link:hover,
.home-nav-link.is-active {
    color: var(--home-brand);
}

.home-nav-link.is-active::after {
    opacity: 1;
    transform: scaleX(1);
}

.home-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.header-account {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    color: #344054;
    text-decoration: none;
}

.header-account__avatar {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: var(--home-brand);
    font-size: 14px;
    font-weight: 700;
}

.header-account__copy {
    display: flex;
    min-width: 0;
    max-width: 150px;
    flex-direction: column;
    line-height: 1.25;
}

.header-account__copy strong,
.header-account__copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-account__copy strong { font-size: 13px; }
.header-account__copy small { color: #98a2b3; font-size: 11px; }
.header-account:hover { color: var(--home-brand); }
.header-logout-form { margin: 0; }

.header-logout {
    gap: 7px;
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid #d9e1ee;
    border-radius: 9px;
    color: #52627a;
    background: #fff;
}

.header-logout__icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.header-logout:hover {
    color: #c2415a;
    border-color: #f2c5cf;
    background: #fff7f8;
}

.header-login,
.header-register,
.primary-button,
.secondary-button,
.text-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 100ms ease;
}

.header-login {
    flex: 0 0 auto;
    min-width: 96px;
    padding: 0 22px;
    border: 0;
    color: #fff;
    white-space: nowrap;
    background: linear-gradient(145deg, #4b89ff, var(--home-brand));
    box-shadow: 0 7px 18px rgb(36 107 253 / 24%);
}

.header-login:hover,
.header-login.is-active {
    color: #fff;
    background: linear-gradient(145deg, #3f7ef5, var(--home-brand-dark));
    box-shadow: 0 9px 20px rgb(21 84 209 / 30%);
    transform: translateY(-1px);
}

.header-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgb(21 84 209 / 24%);
}

/* 已登录：头像 + 昵称（点击进入工作台） */
.header-user {
    display: inline-flex;
    min-height: 40px;
    padding: 0 16px 0 5px;
    align-items: center;
    gap: 9px;
    border: 1px solid rgb(227 232 240 / 90%);
    border-radius: 999px;
    background: #fff;
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 100ms ease;
}

.header-user:hover {
    border-color: var(--home-brand);
    box-shadow: 0 6px 16px rgb(36 107 253 / 14%);
    transform: translateY(-1px);
}

.header-user__avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef2f8;
}

.header-user__avatar--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(145deg, #4b89ff, var(--home-brand));
    font-size: 13px;
    font-weight: 700;
}

.header-user__name {
    max-width: 128px;
    overflow: hidden;
    color: #35445b;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-register,
.primary-button {
    padding: 0 18px;
    border: 1px solid var(--home-brand);
    color: #fff;
    background: var(--home-brand);
    box-shadow: 0 7px 16px rgb(36 107 253 / 16%);
}

.header-register:hover,
.header-register.is-active,
.primary-button:hover {
    border-color: var(--home-brand-dark);
    background: var(--home-brand-dark);
}

.secondary-button {
    padding: 0 18px;
    border: 1px solid #cbd5e1;
    color: #344054;
    background: #fff;
}

.secondary-button:hover {
    border-color: #9eb5df;
    color: var(--home-brand-dark);
    background: #f8fbff;
}

.text-button {
    padding: 0 8px;
    border: 0;
    color: var(--home-brand);
    background: transparent;
}

.primary-button:active,
.secondary-button:active,
.header-register:active {
    transform: translateY(1px);
}

/* Shared page structures */
.section {
    padding: 72px 0;
}

.section.is-soft,
.soft-section {
    background: #f7f9fc;
}

.section-heading {
    max-width: 720px;
    margin: 0 auto 36px;
    text-align: center;
}

.section-heading.is-left {
    margin-right: 0;
    margin-left: 0;
    text-align: left;
}

.section-eyebrow,
.page-eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--home-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.section-heading h2,
.page-title {
    margin: 0;
    font-size: 32px;
    font-weight: 680;
    letter-spacing: -.03em;
    line-height: 1.3;
}

.section-heading p,
.page-lead {
    margin: 14px 0 0;
    color: var(--home-text-secondary);
    font-size: 15px;
    line-height: 1.8;
}

.button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 100ms ease;
}

.button--primary {
    border-color: var(--home-brand);
    color: #fff;
    background: var(--home-brand);
    box-shadow: 0 7px 16px rgb(36 107 253 / 16%);
}

.button--primary:hover {
    border-color: var(--home-brand-dark);
    background: var(--home-brand-dark);
}

.button--secondary {
    border-color: #cbd5e1;
    color: #344054;
    background: #fff;
}

.button--secondary:hover {
    border-color: #9eb5df;
    color: var(--home-brand-dark);
    background: #f8fbff;
}

.button--text {
    padding-right: 4px;
    padding-left: 4px;
    color: var(--home-brand);
    background: transparent;
}

.button--text:hover {
    color: var(--home-brand-dark);
    text-decoration: underline;
}

.button--large {
    min-height: 48px;
    padding-right: 24px;
    padding-left: 24px;
}

.button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.button:active {
    transform: translateY(1px);
}

.page-hero {
    padding: 64px 0 58px;
    border-bottom: 1px solid var(--home-line);
    background: linear-gradient(180deg, #f4f8ff 0%, #fff 100%);
    text-align: center;
}

.page-hero .home-container {
    max-width: 840px;
}

.content-shell {
    padding-top: 48px;
    padding-bottom: 72px;
}

.content-card {
    border: 1px solid var(--home-line);
    border-radius: var(--home-radius);
    background: var(--home-surface);
    box-shadow: 0 8px 26px rgb(26 40 72 / 5%);
}

/* Footer */
.home-footer {
    border-top: 1px solid var(--home-line);
    color: #c7d2e6;
    background: #111a2e;
}

.home-footer-main {
    display: grid;
    padding: 48px 0 36px;
    grid-template-columns: 1fr 1.25fr;
    gap: 96px;
}

.footer-brand .home-brand-copy strong {
    color: #fff;
}

.footer-brand-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 7px 12px;
    border-radius: 10px;
    background: #fff;
}

.footer-brand-logo {
    display: block;
    width: auto;
    height: 32px;
}

.footer-brand .home-brand-copy small,
.footer-brand-block p {
    color: #8f9bb1;
}

.footer-brand-block p {
    max-width: 350px;
    margin: 18px 0 0;
    font-size: 13px;
    line-height: 1.75;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 42px;
}

.footer-links > div {
    display: grid;
    align-content: start;
    gap: 12px;
}

.footer-links strong {
    margin-bottom: 3px;
    color: #fff;
    font-size: 13px;
}

.footer-links a {
    width: max-content;
    color: #97a4ba;
    font-size: 12px;
    transition: color 150ms ease;
}

.footer-links a:hover {
    color: #fff;
}

.home-footer-bottom {
    display: flex;
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgb(255 255 255 / 8%);
    color: #7e8aa0;
    font-size: 12px;
}

.home-footer-icp {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    padding-bottom: 20px;
    color: #7e8aa0;
    font-size: 12px;
}

.home-footer-icp a {
    color: #7e8aa0;
    text-decoration: none;
}

.home-footer-icp a:hover {
    color: #aab6c9;
    text-decoration: underline;
}

.home-toast {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 100;
    max-width: 380px;
    padding: 13px 18px;
    border: 1px solid #c8d9fb;
    border-radius: 9px;
    color: #244f91;
    background: #fff;
    box-shadow: var(--home-shadow);
    font-size: 13px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.home-toast::before {
    margin-right: 8px;
    color: var(--home-brand);
    content: "i";
    font-weight: 700;
}

.home-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1280px) {
    .home-container,
    .content-shell {
        width: calc(100% - 48px);
    }

    .home-header-inner {
        grid-template-columns: 210px 1fr 210px;
    }
}

@media (max-width: 1180px) {
    .home-nav {
        gap: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* 返回顶部：院校库 el-backtop 与详情页共用同一套样式 */
.el-backtop-catalog {
    position: fixed;
    z-index: 900;
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #2869e7, #174dbd);
    box-shadow: 0 10px 24px rgb(31 91 216 / 30%);
    cursor: pointer;
    font-size: 16px;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.el-backtop-catalog:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgb(31 91 216 / 38%);
}

.el-backtop-fade-enter-active,
.el-backtop-fade-leave-active { transition: opacity 200ms ease, transform 200ms ease; }
.el-backtop-fade-enter,
.el-backtop-fade-leave-to { opacity: 0; transform: translateY(8px); }

/* 未挂载 Vue 的详情页：同一按钮由 is-visible 控制显隐 */
.el-backtop-catalog[data-backtop-toggle] {
    right: 28px;
    bottom: 30px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 200ms ease, transform 200ms ease, box-shadow 160ms ease;
}

.el-backtop-catalog[data-backtop-toggle].is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.el-backtop-catalog[data-backtop-toggle].is-visible:hover {
    transform: translateY(-2px);
}
