
:root {
    --nav: #111b2d;
    --nav-raised: #18243a;
    --blue: #1d5fd1;
    --blue-strong: #164aa5;
    --blue-soft: #eaf2ff;
    --orange: #c2410c;
    --orange-strong: #9a3412;
    --ink: #182235;
    --muted: #5d6b7d;
    --subtle: #7b8797;
    --line: #dfe5ee;
    --surface: #ffffff;
    --canvas: #f4f7fb;
    --success: #087f5b;
    --shadow-sm: 0 5px 16px rgba(18, 35, 61, .07);
    --shadow-md: 0 18px 46px rgba(18, 35, 61, .12);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --container: 1180px;
    --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", sans-serif;
    --font-display: "HarmonyOS Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.65;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
img, svg { max-width: 100%; }
.ui-icon {
    display: block;
    inline-size: 1em;
    block-size: 1em;
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
}
.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.skip-link {
    position: fixed; left: 14px; top: 10px; z-index: 999;
    padding: 9px 13px; border-radius: 8px; background: #fff; color: var(--ink);
    transform: translateY(-160%); transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid rgba(84, 154, 255, .55); outline-offset: 3px; }

/* Header: desktop is intentionally split into two menu rows. */
.site-header {
    position: sticky; top: 0; z-index: 80;
    color: #fff; background: var(--nav);
    box-shadow: 0 8px 24px rgba(5, 12, 25, .18);
}
.header-primary {
    min-height: 68px; display: flex; align-items: center; gap: 22px;
}
.brand {
    display: inline-flex; align-items: center; gap: 11px; min-width: 230px;
    color: #fff; white-space: nowrap;
}
.brand-mark {
    inline-size: 40px; block-size: 40px; aspect-ratio: 1 / 1;
    border-radius: 11px; background: var(--blue); color: #fff;
    display: grid; place-items: center; flex: 0 0 40px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}
.brand-mark .ui-icon { inline-size: 24px; block-size: 24px; }
.brand-copy { min-width: 0; }
.brand-copy strong {
    display: block; font-family: var(--font-display); font-size: 18px;
    line-height: 1.15; letter-spacing: .02em;
}
.brand-copy small { display: block; color: #aeb9ca; font-size: 10px; margin-top: 4px; letter-spacing: .08em; }
.primary-nav { display: flex; align-items: center; gap: 3px; margin-left: auto; }
.primary-nav a, .secondary-nav a {
    color: #d8dfeb; border-radius: 8px; white-space: nowrap;
    transition: background-color .18s ease, color .18s ease;
}
.primary-nav a { padding: 9px 11px; font-size: 14px; font-weight: 650; }
.primary-nav a:hover, .primary-nav a.active { background: rgba(255,255,255,.10); color: #fff; }
.header-cta {
    min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 0 15px; border-radius: 9px; background: #fff; color: var(--blue-strong);
    font-size: 14px; font-weight: 750; box-shadow: 0 5px 13px rgba(0,0,0,.16);
}
.header-cta .ui-icon { inline-size: 18px; block-size: 18px; }
.header-secondary { background: var(--nav-raised); border-top: 1px solid rgba(255,255,255,.08); padding: 6px 12px; }
.secondary-nav {
    width: min(100%, var(--container));
    min-height: 44px; display: flex; align-items: center; gap: 2px; overflow-x: auto;
    scrollbar-width: none;
}
.secondary-nav::-webkit-scrollbar { display: none; }
.secondary-nav a { padding: 7px 12px; font-size: 13px; color: #bcc7d8; }
.secondary-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.menu-toggle {
    display: none; margin-left: auto; inline-size: 44px; block-size: 44px;
    border: 1px solid rgba(255,255,255,.22); border-radius: 10px;
    background: rgba(255,255,255,.08); color: #fff; align-items: center; justify-content: center;
    cursor: pointer;
}
.menu-toggle .ui-icon { inline-size: 24px; block-size: 24px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
.mobile-menu {
    display: none; position: fixed; inset: 64px 0 0; z-index: 75;
    background: #0c1627; padding: 18px 20px 32px; overflow-y: auto;
}
.mobile-menu[hidden] { display: none !important; }
.mobile-menu-grid { width: min(100%, 560px); margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.mobile-menu a {
    min-height: 46px; display: flex; align-items: center; padding: 10px 13px;
    border: 1px solid rgba(255,255,255,.09); border-radius: 10px;
    color: #e5ebf4; background: rgba(255,255,255,.045); font-size: 14px;
}
.mobile-menu a.active { border-color: rgba(103, 163, 255, .58); background: rgba(60, 121, 222, .2); }
.mobile-menu .mobile-cta { grid-column: 1 / -1; justify-content: center; background: #fff; color: var(--blue-strong); font-weight: 750; }

/* Home */
.home-hero {
    background: linear-gradient(122deg, #16489e 0%, #1d5fd1 64%, #2468d8 100%);
    color: #fff; padding: 54px 0 78px; position: relative; overflow: hidden;
}
.home-hero::after {
    content: ""; position: absolute; inline-size: 360px; block-size: 360px;
    border: 70px solid rgba(255,255,255,.045); border-radius: 50%;
    right: -170px; top: -160px; pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 38px; align-items: center; }
.hero-copy { position: relative; z-index: 1; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px; min-height: 34px;
    padding: 6px 12px; border: 1px solid rgba(255,255,255,.30); border-radius: 999px;
    background: rgba(255,255,255,.11); color: #fff; font-size: 13px; font-weight: 650;
}
.hero-badge .ui-icon { inline-size: 17px; block-size: 17px; }
.home-hero h1 {
    max-width: 780px; margin: 20px 0 16px; font-family: var(--font-display);
    font-size: clamp(37px, 5vw, 58px); line-height: 1.12; letter-spacing: -.022em;
}
.hero-title-row {
    display: flex; align-items: baseline; flex-wrap: wrap; column-gap: .16em;
}
.hero-title-row + .hero-title-row { margin-top: .04em; }
.home-hero h1 .hero-title-accent { color: #ffd7c4; }
.hero-title-prefix, .hero-title-accent { display: inline-block; }
.hero-title-row-sub { letter-spacing: .015em; }
.hero-subtitle {
    max-width: 720px; margin: 0 0 28px; color: #f3f7ff; font-size: 16px;
    line-height: 1.9; letter-spacing: .012em;
}
.hero-search {
    width: min(100%, 690px); display: grid; grid-template-columns: minmax(0,1fr) auto;
    background: #fff; border: 3px solid rgba(255,255,255,.28); border-radius: 14px;
    overflow: hidden; box-shadow: 0 15px 35px rgba(8, 27, 64, .20);
}
.hero-search input { min-width: 0; min-height: 54px; border: 0; outline: 0; padding: 0 18px; color: var(--ink); }
.hero-search button {
    min-width: 122px; min-height: 54px; border: 0; background: var(--orange); color: #fff;
    padding: 0 20px; font-weight: 760; cursor: pointer;
    transition: background-color .18s ease;
}
.hero-search button:hover { background: var(--orange-strong); }
.hero-search button:active { transform: translateY(1px); }
.hero-search button .ui-icon { display: inline-block; inline-size: 18px; block-size: 18px; vertical-align: -3px; margin-right: 6px; }
.hero-hints { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; color: #d6e4f8; font-size: 12px; }
.hero-hints a { padding: 4px 8px; border: 1px solid rgba(255,255,255,.18); border-radius: 7px; }
.info-board {
    position: relative; z-index: 1; background: rgba(13, 31, 62, .72);
    border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius-lg); padding: 23px;
    backdrop-filter: blur(10px);
}
.info-board-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.info-board-head h2 { margin: 0; font-family: var(--font-display); font-size: 19px; }
.info-board-head span { color: #a9c6ee; font-size: 12px; }
.info-entry { display: grid; grid-template-columns: 36px 1fr auto; gap: 11px; align-items: center; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.10); }
.info-entry:first-of-type { border-top: 0; }
.info-entry-icon { inline-size: 36px; block-size: 36px; aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; color: #dbeafe; background: rgba(255,255,255,.08); }
.info-entry-icon .ui-icon { inline-size: 20px; block-size: 20px; }
.info-entry b { display: block; font-size: 14px; }
.info-entry small { display: block; color: #aebfd7; font-size: 11px; margin-top: 2px; }
.info-entry > .ui-icon { inline-size: 16px; block-size: 16px; color: #a8bbd7; }

.quick-section { margin-top: -38px; position: relative; z-index: 4; }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 17px; }
.action-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
    padding: 23px; box-shadow: var(--shadow-sm); display: grid;
    grid-template-columns: 54px 1fr auto; gap: 15px; align-items: center;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.action-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #b8cae5; }
.action-icon {
    inline-size: 54px; block-size: 54px; aspect-ratio: 1 / 1; border-radius: 50%;
    background: var(--blue-soft); color: var(--blue); display: grid; place-items: center;
}
.action-card:nth-child(2) .action-icon { background: #fff2e9; color: var(--orange); }
.action-card:nth-child(3) .action-icon { background: #e7f7f1; color: var(--success); }
.action-icon .ui-icon { inline-size: 28px; block-size: 28px; }
.action-copy h2 { margin: 0 0 4px; font-family: var(--font-display); font-size: 16px; }
.action-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.action-card > .ui-icon { inline-size: 19px; block-size: 19px; color: #8d9aac; }

.stats-section { padding: 50px 0 44px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.stat-item { background: #fff; text-align: center; padding: 24px 18px; }
.stat-number { display: block; font-family: var(--font-display); color: var(--blue); font-size: 35px; font-weight: 800; line-height: 1.15; }
.stat-label { display: block; margin-top: 7px; color: var(--muted); font-size: 13px; }

.section { padding: 58px 20px; }
.section > .container { width: min(100%, var(--container)); }
.section-white { background: #fff; border-block: 1px solid var(--line); }
.section-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-kicker { color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.section-title { margin: 5px 0 7px; font-family: var(--font-display); font-size: clamp(26px, 3vw, 34px); line-height: 1.25; }
.section-subtitle { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; letter-spacing: .012em; }
.section-icon {
    inline-size: 52px; block-size: 52px; aspect-ratio: 1; border-radius: 14px;
    display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: none;
}
.section-icon .ui-icon { inline-size: 28px; block-size: 28px; }

.timeline-container { position: relative; padding-top: 3px; }
.timeline-track { position: absolute; left: 5%; right: 5%; top: 31px; height: 3px; background: #e1e7ef; border-radius: 99px; overflow: hidden; }
.timeline-progress { width: 100%; height: 100%; background: var(--blue); transform: scaleX(0); transform-origin: left center; transition: transform .6s ease; }
.timeline-items { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); position: relative; z-index: 1; }
.timeline-node { text-align: center; padding-inline: 4px; }
.timeline-circle {
    inline-size: 60px; block-size: 60px; aspect-ratio: 1; margin: 0 auto 13px;
    border-radius: 50%; border: 3px solid var(--blue); background: #fff; color: var(--blue);
    display: grid; place-items: center; font-weight: 800; font-size: 15px;
    transition: transform .18s ease, background-color .18s ease, color .18s ease;
}
.timeline-node.is-complete .timeline-circle { background: var(--blue); color: #fff; }
.timeline-node.is-current .timeline-circle { box-shadow: 0 0 0 6px rgba(29, 95, 209, .12); }
.timeline-node:hover .timeline-circle { transform: translateY(-2px); }
.timeline-label { color: var(--muted); font-size: 12px; }

.features-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; }
.feature-card {
    min-height: 192px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
    padding: 22px; display: flex; flex-direction: column; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.feature-card:nth-child(1), .feature-card:nth-child(4) { grid-column: span 2; }
.feature-card:hover { transform: translateY(-3px); border-color: #b8cae5; box-shadow: var(--shadow-sm); }
.feature-icon { inline-size: 42px; block-size: 42px; aspect-ratio: 1; color: var(--blue); display: grid; place-items: center; }
.feature-icon .ui-icon { inline-size: 29px; block-size: 29px; }
.feature-title { margin: 15px 0 7px; font-family: var(--font-display); font-size: 16px; font-weight: 750; }
.feature-desc { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.feature-link { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-size: 12px; font-weight: 750; }
.feature-link .ui-icon { inline-size: 15px; block-size: 15px; }

/* School library */
.library-hero { background: linear-gradient(125deg, #17468f, #1d5fd1); color: #fff; padding: 44px 0 67px; }
.breadcrumb { display: flex; align-items: center; gap: 7px; color: #d1e0f5; font-size: 12px; margin-bottom: 16px; }
.breadcrumb .ui-icon { inline-size: 15px; block-size: 15px; }
.library-hero h1 { margin: 0 0 10px; font-family: var(--font-display); font-size: 42px; line-height: 1.2; }
.library-hero p { margin: 0 0 24px; color: #dce9fa; font-size: 14px; }
.library-search { width: min(100%, 720px); display: grid; grid-template-columns: minmax(0,1fr) auto; background: #fff; border-radius: 13px; overflow: hidden; box-shadow: 0 14px 35px rgba(8, 27, 64, .20); }
.library-search input { min-width: 0; min-height: 52px; border: 0; outline: 0; padding: 0 17px; color: var(--ink); }
.library-search button { min-width: 118px; border: 0; background: var(--orange); color: #fff; padding: 0 18px; font-weight: 750; cursor: pointer; }
.library-search button:hover { background: var(--orange-strong); }
.library-search button .ui-icon { display: inline-block; inline-size: 17px; block-size: 17px; vertical-align: -3px; margin-right: 5px; }
.library-main { margin-top: -31px; padding-bottom: 58px; position: relative; z-index: 3; }
.filter-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-md); }
.filter-title { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-family: var(--font-display); font-size: 15px; font-weight: 750; }
.filter-title .ui-icon { inline-size: 19px; block-size: 19px; color: var(--blue); }
.filter-row { display: grid; grid-template-columns: 74px minmax(0,1fr); gap: 14px; align-items: start; padding: 12px 0; }
.filter-row + .filter-row { border-top: 1px solid #edf0f4; }
.filter-label { padding-top: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.filter-options { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.filter-btn { min-height: 40px; border: 1px solid transparent; background: #f2f5f9; color: #465268; border-radius: 8px; padding: 7px 13px; cursor: pointer; font-size: 13px; transition: border-color .18s ease, background-color .18s ease, color .18s ease; }
.filter-btn:hover { border-color: #a9c1e8; color: var(--blue); }
.filter-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.filter-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.filter-note .ui-icon { inline-size: 17px; block-size: 17px; color: var(--blue); margin-top: 2px; }
.summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 27px 0 15px; }
.summary h2 { margin: 0; display: inline; font-family: var(--font-display); font-size: 20px; }
.summary > div:first-child > span { color: var(--muted); font-size: 13px; }
.legend { display: flex; gap: 7px; flex-wrap: wrap; }
.region-section { margin-bottom: 31px; scroll-margin-top: 130px; }
.region-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-family: var(--font-display); font-size: 23px; }
.region-title::before { content: ""; inline-size: 5px; block-size: 24px; border-radius: 5px; background: var(--blue); }
.province-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 21px; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(18,35,61,.04); }
.province-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid #edf0f4; padding-bottom: 14px; margin-bottom: 15px; }
.province-head h3 { margin: 0; font-family: var(--font-display); font-size: 18px; }
.province-head span { color: var(--muted); font-size: 12px; }
.school-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 11px; }
.school-card {
    width: 100%; min-height: 108px; border: 1px solid #e2e7ef; border-radius: 12px;
    background: #fff; padding: 15px; text-align: left; cursor: pointer; display: flex; flex-direction: column;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.school-card:hover { transform: translateY(-2px); border-color: #9bb9e7; box-shadow: var(--shadow-sm); }
.school-card:disabled { opacity: 1; color: inherit; }
.school-name-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; }
.school-name { min-width: 0; font-family: var(--font-display); font-size: 15px; font-weight: 750; line-height: 1.4; }
.school-link-icon { inline-size: 17px; block-size: 17px; aspect-ratio: 1; object-fit: contain; flex: 0 0 17px; margin-top: 2px; }
.school-meta { margin-top: auto; padding-top: 11px; display: flex; align-items: center; gap: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { display: inline-flex; align-items: center; min-height: 23px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.tag-985 { color: #a1281b; background: #fee5e2; }
.tag-211 { color: #9b4a08; background: #ffead5; }
.tag-双一流 { color: #164e9e; background: #dceaff; }
.tag-normal { color: #465268; background: #edf1f6; }
.empty { text-align: center; padding: 70px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); color: var(--muted); }
.empty .ui-icon { inline-size: 38px; block-size: 38px; color: var(--blue); margin: 0 auto 12px; }
.load-more-wrap { display: flex; justify-content: center; padding: 8px 0 4px; }
.load-more-wrap[hidden] { display: none; }
.load-more-btn { min-height: 44px; border: 1px solid #b9c9df; border-radius: 10px; background: #fff; color: var(--blue-strong); padding: 0 18px; font-weight: 750; cursor: pointer; }
.load-more-btn:hover { border-color: var(--blue); background: var(--blue-soft); }


/* 404 */
.error-page { min-height: 100dvh; background: linear-gradient(135deg, #f5f8fc, #eaf1fb); display: grid; place-items: center; padding: 24px; }
.error-card { width: min(100%, 600px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 42px; box-shadow: var(--shadow-md); text-align: center; }
.error-icon { inline-size: 68px; block-size: 68px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: #fff1ea; color: var(--orange); }
.error-icon .ui-icon { inline-size: 36px; block-size: 36px; }
.error-card h1 { margin: 0; font-family: var(--font-display); font-size: 34px; }
.error-card p { color: var(--muted); }
.error-actions { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.error-actions a { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; padding: 0 16px; border-radius: 9px; background: var(--blue); color: #fff; font-weight: 750; }
.error-actions a.secondary { background: #edf3fb; color: var(--blue-strong); }
.error-actions .ui-icon { inline-size: 17px; block-size: 17px; }

.site-footer { background: #172236; color: #c3cedd; padding: 38px 0 22px; }
.footer-grid { display: grid; grid-template-columns: 1.35fr repeat(3,.65fr); gap: 28px; }
.footer-brand p { max-width: 430px; margin: 13px 0 0; color: #95a5ba; font-size: 12px; line-height: 1.8; }
.footer-column h3 { margin: 0 0 12px; color: #fff; font-family: var(--font-display); font-size: 14px; }
.footer-column a, .footer-column p { display: block; margin: 8px 0; color: #9eacbf; font-size: 12px; }
.footer-column a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid rgba(255,255,255,.09); padding-top: 18px; margin-top: 27px; color: #7f8fa4; font-size: 11px; }
.public-security { display: inline-flex; align-items: center; gap: 5px; }
.public-security img { inline-size: 16px; block-size: 16px; aspect-ratio: 1; object-fit: contain; flex: 0 0 16px; }


/* Search process motion */
.search-process {
    --search-duration: 680ms;
    width: min(100%, 720px); max-height: 0; margin-top: 0; padding: 0 14px;
    border: 1px solid transparent; border-radius: 12px; overflow: hidden;
    background: rgba(9, 27, 58, .42); color: #fff; opacity: 0; transform: translateY(-6px);
    backdrop-filter: blur(9px);
    transition: max-height .22s ease, margin-top .22s ease, padding .22s ease, opacity .18s ease, transform .22s ease, border-color .22s ease;
}
.search-process.is-visible {
    max-height: 132px; margin-top: 11px; padding: 11px 14px 12px;
    border-color: rgba(255,255,255,.18); opacity: 1; transform: translateY(0);
}
.search-process-head { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; gap: 9px; align-items: center; }
.search-process-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.search-process-percent { color: #c9dcfa; font-size: 11px; font-variant-numeric: tabular-nums; }
.search-process-orbit { inline-size: 20px; block-size: 20px; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.26); border-radius: 50%; display: grid; place-items: center; }
.search-process-orbit i { inline-size: 5px; block-size: 5px; border-radius: 50%; background: #fff; transform-origin: 8px 2.5px; animation: orbit .72s linear infinite; }
.search-process.is-complete .search-process-orbit { border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.10); }
.search-process.is-complete .search-process-orbit i { inline-size: 8px; block-size: 5px; border: solid #fff; border-width: 0 0 2px 2px; border-radius: 0; background: transparent; transform: rotate(-45deg); animation: none; }
.search-process-track { display: block; block-size: 3px; margin: 9px 0 8px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.13); }
.search-process-track i { display: block; inline-size: 100%; block-size: 100%; border-radius: inherit; background: #8bb8ff; transform: scaleX(0); transform-origin: left; }
.search-process.is-visible .search-process-track i { animation: search-progress var(--search-duration) cubic-bezier(.2,.7,.2,1) forwards; }
.search-process-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.search-process-steps span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #9eb0ca; font-size: 10px; }
.search-process-steps span::before { content: ""; display: inline-block; inline-size: 5px; block-size: 5px; margin-right: 5px; border-radius: 50%; background: #70819a; vertical-align: 1px; }
.search-process-steps span.active { color: #fff; }
.search-process-steps span.active::before { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.12); }
.search-process-steps span.done { color: #cfe1ff; }
.search-process-steps span.done::before { background: #78aaff; }
.hero-search.is-searching button, .library-search.is-searching button { cursor: wait; }
.button-spinner {
    display: inline-block; inline-size: 17px; block-size: 17px; aspect-ratio: 1; margin-right: 7px;
    border: 2px solid rgba(255,255,255,.40); border-top-color: #fff; border-radius: 50%;
    vertical-align: -3px; animation: spinner .62s linear infinite;
}
#schoolLibrary { transition: opacity .18s ease, transform .18s ease; }
#schoolLibrary.is-searching { opacity: .38; transform: translateY(3px); pointer-events: none; }
@keyframes search-progress { 0% { transform: scaleX(0); } 72% { transform: scaleX(.78); } 100% { transform: scaleX(1); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes spinner { to { transform: rotate(360deg); } }
}
}

@media (hover: none) {
    .action-card:hover, .feature-card:hover, .school-card:hover, .timeline-node:hover .timeline-circle { transform: none; box-shadow: none; }
}

@media (max-width: 1080px) {
    .primary-nav, .header-cta, .header-secondary { display: none; }
    .header-primary { min-height: 64px; }
    .brand { min-width: 0; }
    .menu-toggle { display: inline-flex; }
    .mobile-menu:not([hidden]) { display: block; }
    .hero-grid { grid-template-columns: minmax(0,1fr) minmax(280px,.65fr); gap: 24px; }
    .quick-grid { gap: 12px; }
    .action-card { grid-template-columns: 48px 1fr; }
    .action-card > .ui-icon { display: none; }
    .features-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .feature-card:nth-child(1), .feature-card:nth-child(4) { grid-column: span 1; }
    .school-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 768px) {

    .search-process { width: 100%; }
    .container { width: min(100% - 28px, var(--container)); }
    .brand-copy strong { font-size: 16px; }
    .brand-copy small { display: none; }
    .brand-mark { inline-size: 36px; block-size: 36px; flex-basis: 36px; padding: 5px; border-radius: 10px; }
    .brand-mark .ui-icon { inline-size: 22px; block-size: 22px; }
    .home-hero { padding: 36px 0 60px; }
    .hero-grid { grid-template-columns: 1fr; gap: 25px; }
    .home-hero h1 { margin-top: 15px; }
    .hero-subtitle { font-size: 14px; }
    .info-board { padding: 18px; }
    .quick-section { margin-top: -27px; }
    .quick-grid { grid-template-columns: 1fr; }
    .action-card { grid-template-columns: 48px 1fr auto; padding: 18px; }
    .action-card > .ui-icon { display: block; }
    .stats-section { padding: 37px 0; }
    .stat-number { font-size: 29px; }
    .section { padding: 45px 14px; }
    .section-header { align-items: flex-start; margin-bottom: 22px; }
    .section-icon { inline-size: 46px; block-size: 46px; }
    .timeline-track { display: none; }
    .timeline-items { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px 10px; }
    .timeline-node:last-child { grid-column: 1 / -1; }
    .timeline-circle { inline-size: 56px; block-size: 56px; }
    .features-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .feature-card { min-height: 178px; }
    .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .footer-brand { grid-column: 1 / -1; }
    .library-hero { padding: 34px 0 57px; }
    .library-hero h1 { font-size: 34px; }
    .library-main { margin-top: -25px; }
    .filter-panel { padding: 16px; }
    .filter-row { grid-template-columns: 1fr; gap: 7px; }
    .filter-label { padding-top: 0; }
    .filter-options { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
    .filter-options::-webkit-scrollbar { display: none; }
    .filter-btn { flex: 0 0 auto; min-height: 42px; scroll-snap-align: start; }
    .province-card { padding: 16px; }
}

@media (max-width: 520px) {
    .library-hero h1 { font-size: 31px; }
    .container { width: min(100% - 24px, var(--container)); }
    .mobile-menu-grid { grid-template-columns: 1fr 1fr; }
    .home-hero h1 { font-size: 32px; line-height: 1.16; letter-spacing: -.018em; }
    .hero-title-row { column-gap: .13em; }
    .hero-title-row-sub { margin-top: .08em; }
    .hero-search, .library-search { grid-template-columns: 1fr; overflow: visible; background: transparent; box-shadow: none; gap: 9px; border: 0; }
    .hero-search input, .library-search input { min-height: 50px; background: #fff; border-radius: 11px; padding-inline: 14px; }
    .hero-search button, .library-search button { min-height: 48px; border-radius: 11px; width: 100%; }
    .hero-hints { line-height: 1.8; }
    .info-board-head { align-items: flex-start; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-item { padding: 18px; }
    .section-header { display: block; }
    .section-icon { margin-top: 15px; }
    .features-grid { grid-template-columns: 1fr; }
    .feature-card { min-height: auto; }
    .school-grid { grid-template-columns: 1fr; }
    .summary { flex-direction: column; align-items: flex-start; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-brand { grid-column: auto; }
    .footer-bottom { flex-direction: column; }
    .error-card { padding: 31px 20px; }
    .error-actions { flex-direction: column; }
    .error-actions a { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .search-process-orbit i, .button-spinner { animation: none !important; }
}

@media (max-width: 360px) { .home-hero h1 { font-size: 30px; } }


/* Supplied brand artwork: preserve the source image and give it breathing room. */
.brand-mark {
    inline-size: 42px; block-size: 42px; flex: 0 0 42px;
    padding: 6px; overflow: hidden; border-radius: 12px;
    background: rgba(255,255,255,.98); border: 1px solid rgba(255,255,255,.20);
    box-shadow: 0 5px 14px rgba(3,14,35,.22), inset 0 0 0 1px rgba(9,61,128,.06);
}
.brand-mark img {
    inline-size: 100%; block-size: 100%; display: block; object-fit: contain;
    transform: none !important; filter: none !important;
}
.site-footer .brand-mark { inline-size: 40px; block-size: 40px; flex-basis: 40px; padding: 6px; }

/* Saved schools and comparison */
.summary { flex-wrap:wrap; }
.summary-actions { display:flex; gap:8px; margin-left:auto; }
.utility-btn { min-height:36px; display:inline-flex; align-items:center; justify-content:center; border:1px solid #c9d4e4; border-radius:9px; background:#fff; color:var(--blue-strong); padding:0 13px; font-size:12px; font-weight:750; cursor:pointer; }
.utility-btn.active { background:var(--blue); border-color:var(--blue); color:#fff; }
.school-card { padding:0; overflow:hidden; cursor:default; }
.school-card-main { width:100%; min-height:78px; border:0; background:#fff; padding:15px; color:inherit; text-align:left; cursor:pointer; display:flex; flex-direction:column; }
a.school-card-main:hover, button.school-card-main:hover { background:#f8fbff; }
.school-actions { display:flex; align-items:center; justify-content:flex-end; gap:7px; border-top:1px solid #edf0f4; padding:8px 10px; background:#fafbfd; }
.school-action { min-height:30px; border:1px solid #d7dfeb; border-radius:8px; background:#fff; color:#536078; padding:0 10px; font-size:11px; font-weight:750; display:inline-flex; align-items:center; gap:5px; cursor:pointer; }
.favorite-action.active { color:#b42318; background:#fff0ee; border-color:#ffc8c1; }
.compare-action input { accent-color:var(--blue); }
.compare-dock { position:fixed; z-index:80; left:50%; bottom:20px; transform:translateX(-50%); width:min(760px, calc(100% - 28px)); display:flex; align-items:center; gap:10px; padding:12px 14px; border-radius:15px; background:#101b2f; color:#fff; box-shadow:0 18px 45px rgba(0,0,0,.28); }
.compare-dock[hidden] { display:none; }
.compare-selected { flex:1; display:flex; gap:7px; min-width:0; overflow:auto; }
.compare-selected span { white-space:nowrap; border-radius:7px; background:rgba(255,255,255,.1); padding:7px 9px; font-size:11px; }
.compare-clear { border:0; background:transparent; color:#aeb9ca; cursor:pointer; }
.compare-open { min-height:36px; border:0; border-radius:9px; background:#d54108; color:#fff; padding:0 15px; font-weight:800; cursor:pointer; }
.compare-modal { position:fixed; z-index:100; inset:0; display:grid; place-items:center; padding:20px; background:rgba(5,12,25,.68); }
.compare-modal[hidden] { display:none; }
.compare-dialog { width:min(900px,100%); max-height:84vh; overflow:auto; border-radius:17px; background:#fff; box-shadow:0 28px 80px rgba(0,0,0,.32); }
.compare-dialog-head { position:sticky; top:0; z-index:2; display:flex; align-items:center; justify-content:space-between; padding:18px 20px; border-bottom:1px solid var(--line); background:#fff; }
.compare-dialog-head h2 { margin:0; font-size:20px; }
.compare-dialog-head button { width:34px; height:34px; border:0; border-radius:8px; background:#edf1f6; font-size:22px; cursor:pointer; }
.compare-table { min-width:620px; padding-bottom:8px; }
.compare-row { display:grid; grid-template-columns:110px repeat(3,minmax(160px,1fr)); }
.compare-row > * { padding:13px 14px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); }
.compare-row > *:last-child { border-right:0; }
.compare-row b { background:#f6f8fb; color:#526078; }
.compare-head strong { color:var(--blue-strong); }
.compare-row a { color:var(--blue); font-weight:750; }
.modal-open { overflow:hidden; }
.my-hero { background:linear-gradient(135deg,#123b88,#1f6ce5); color:#fff; padding:44px 0; }
.my-hero h1 { margin:0 0 8px; }
.my-main { padding:34px 0 55px; }
.my-toolbar { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-bottom:17px; }
.my-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; }
.my-item { background:#fff; border:1px solid var(--line); border-radius:13px; padding:16px; }
.my-item h2 { font-size:16px; margin:0 0 9px; }
.my-item p { margin:0 0 13px; color:var(--muted); font-size:12px; }
.my-item-actions { display:flex; gap:8px; }
.my-empty { padding:70px 20px; border:1px solid var(--line); border-radius:14px; background:#fff; text-align:center; color:var(--muted); }
@media(max-width:768px){
  .brand-mark { inline-size:36px; block-size:36px; flex-basis:36px; padding:5px; border-radius:10px; }
  .summary-actions { width:100%; margin-left:0; }
  .legend { display:none; }
  .compare-dock strong { display:none; }
  .compare-selected span { max-width:88px; overflow:hidden; text-overflow:ellipsis; }
  .compare-dock { gap:6px; padding:10px; bottom:10px; }
  .compare-clear { display:none; }
  .my-grid { grid-template-columns:1fr; }
}


/* === Interaction motion refinement === */
html { scroll-behavior: smooth; }
body { opacity: 1; }
.site-header {
    transition: box-shadow .28s ease, background-color .28s ease, border-color .28s ease;
}
.site-header.is-scrolled { box-shadow: 0 10px 28px rgba(4, 15, 35, .20); }
.primary-nav a, .secondary-nav a, .mobile-menu a { position: relative; }
.primary-nav a::after, .secondary-nav a::after {
    content: ""; position: absolute; left: 50%; right: 50%; bottom: 5px; height: 2px;
    border-radius: 999px; background: currentColor; opacity: .72;
    transition: left .22s cubic-bezier(.2,.8,.2,1), right .22s cubic-bezier(.2,.8,.2,1), opacity .22s ease;
}
.primary-nav a:hover::after, .primary-nav a.active::after,
.secondary-nav a:hover::after, .secondary-nav a.active::after { left: 12px; right: 12px; }

.is-pressed { transform: translateY(1px) scale(.992) !important; transition-duration: .08s !important; }

button, .btn, .filter-btn, .action-card, .info-link, .school-card, .feature-card {
    -webkit-tap-highlight-color: transparent;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid rgba(65, 140, 255, .48); outline-offset: 3px;
}
.hero-search, .library-search {
    transition: box-shadow .25s ease, transform .25s cubic-bezier(.2,.8,.2,1), border-color .25s ease;
}
.hero-search:focus-within, .library-search:focus-within {
    transform: translateY(-2px); box-shadow: 0 18px 40px rgba(7, 32, 78, .24), 0 0 0 4px rgba(255,255,255,.14);
}
.hero-search button, .library-search button {
    transition: background-color .2s ease, transform .16s ease, box-shadow .2s ease;
}
.hero-search button:hover, .library-search button:hover { box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.hero-search button:active, .library-search button:active { transform: scale(.98); }

.action-card, .feature-card, .school-card, .info-link {
    transition: transform .28s cubic-bezier(.2,.8,.2,1), border-color .24s ease, box-shadow .28s ease, background-color .24s ease;
}
.action-card:hover, .feature-card:hover, .school-card:hover { transform: translateY(-5px); }
.info-link:hover { transform: translateX(4px); }
.action-card .ui-icon, .feature-card .ui-icon, .info-link .ui-icon, .school-link-icon {
    transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
.action-card:hover .ui-icon, .feature-card:hover .ui-icon { transform: translateY(-2px) scale(1.05); }
.info-link:hover .ui-icon:last-child, .school-card:hover .school-link-icon { transform: translateX(3px); }

.filter-btn { transition: transform .16s ease, color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease; }
.filter-btn:hover { transform: translateY(-1px); }
.filter-btn.active { box-shadow: 0 6px 16px rgba(29,95,209,.20); }

.search-process { transform-origin: top; }
.search-process.is-visible { animation: search-panel-in .25s cubic-bezier(.2,.8,.2,1) both; }
.search-process.is-complete { animation: search-panel-complete .28s ease both; }
@keyframes search-panel-in { from { opacity: 0; transform: translateY(-5px) scaleY(.96); } to { opacity:1; transform:none; } }
@keyframes search-panel-complete { 50% { transform: scale(1.01); } 100% { transform: none; } }

.mobile-menu:not([hidden]) { animation: mobile-menu-in .28s cubic-bezier(.2,.8,.2,1) both; }
@keyframes mobile-menu-in { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:none; } }

@media (max-width: 720px) {
    .action-card:hover, .feature-card:hover, .school-card:hover, .info-link:hover { transform: none; }
    .brand-mark { flex: 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    [data-motion-ready] { opacity: 1 !important; transform: none !important; }
}


/* Saved-list navigation status */
.primary-nav a[href="my.html"], .mobile-menu a[href="my.html"] { display: inline-flex; align-items: center; gap: 6px; }
.saved-nav-badge { min-width: 17px; height: 17px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-size: 10px; line-height: 1; font-variant-numeric: tabular-nums; }
.saved-nav-badge:empty, .saved-nav-badge[data-count="0"] { display: none; }
@media (max-width: 768px) {
  .site-footer .brand-mark { inline-size: 36px; block-size: 36px; flex-basis: 36px; padding: 5px; }
}


/* === Dual-row channel navigation refinement (Taste / GSAP / Ponytail pass) === */
.header-primary { gap: 16px; }
.primary-nav { gap: 2px; }
.primary-nav a { padding-inline: 10px; }
.header-cta { flex: 0 0 auto; }

.secondary-nav {
    gap: 1px;
    padding-inline: 0;
    align-items: center;
}
.secondary-nav a { padding: 7px 10px; }
.secondary-nav .nav-channel {
    padding: 6px 11px;
    border: 1px solid rgba(255,255,255,.18);
    color: #fff;
    font-weight: 800;
    letter-spacing: .01em;
}
.secondary-nav .nav-channel::after { display: none; }
.secondary-nav .nav-channel-kaoyan {
    background: rgba(37, 105, 218, .34);
    border-color: rgba(102, 161, 255, .42);
}
.secondary-nav .nav-channel-baoyan {
    background: rgba(173, 69, 35, .26);
    border-color: rgba(231, 142, 111, .34);
}
.nav-divider {
    inline-size: 1px;
    block-size: 24px;
    margin-inline: 7px;
    background: rgba(255,255,255,.16);
    flex: 0 0 auto;
}

.mobile-menu-grid {
    display: block;
}
.mobile-menu-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.mobile-menu-section:last-of-type { margin-bottom: 12px; }
.mobile-menu-title {
    display: block;
    margin: 0 0 9px;
    color: #9eacc1;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
}
.mobile-menu a.mobile-menu-title {
    min-height: 36px;
    padding: 7px 11px;
    border-radius: 9px;
    color: #fff;
}
.mobile-menu-channel-kaoyan { background: rgba(37, 105, 218, .24) !important; border-color: rgba(102, 161, 255, .32) !important; }
.mobile-menu-channel-baoyan { background: rgba(173, 69, 35, .22) !important; border-color: rgba(231, 142, 111, .28) !important; }
.mobile-menu-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
}
.mobile-menu .mobile-cta {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.mobile-menu .mobile-cta .ui-icon { inline-size: 18px; block-size: 18px; }

@media (min-width: 1081px) and (max-width: 1240px) {
    .brand { min-width: 218px; }
    .header-primary { gap: 10px; }
    .primary-nav a { padding-inline: 8px; font-size: 13px; }
    .header-cta { padding-inline: 12px; }
    .secondary-nav a { padding-inline: 8px; font-size: 12px; }
    .secondary-nav .nav-channel { padding-inline: 9px; }
    .nav-divider { margin-inline: 4px; }
}

@media (max-width: 520px) {
    .mobile-menu-links { grid-template-columns: 1fr 1fr; }
}


/* === Balanced channel cards === */
.features-section-header { align-items: flex-end; }
.feature-tabs {
    display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto;
    padding: 5px; border: 1px solid #dce4ef; border-radius: 12px; background: #fff;
    box-shadow: 0 8px 22px rgba(20, 45, 82, .06);
}
.feature-tab {
    min-height: 38px; border: 0; border-radius: 8px; background: transparent; color: #56637a;
    padding: 0 15px; display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
    font-size: 13px; font-weight: 800; transition: color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .16s ease;
}
.feature-tab > span:first-child { inline-size: 7px; block-size: 7px; flex: 0 0 7px; border-radius: 50%; background: #9aa8bb; transition: background-color .2s ease, box-shadow .2s ease; }
.feature-tab > span:last-child { inline-size: auto; block-size: auto; min-inline-size: max-content; white-space: nowrap; background: transparent; border-radius: 0; }
.feature-tab:hover { color: var(--blue-strong); background: #f3f7fd; }
.feature-tab:active { transform: translateY(1px); }
.feature-tab.is-active { color: #fff; background: var(--blue); box-shadow: 0 7px 17px rgba(29,95,209,.22); }
.feature-tab.is-active > span:first-child { background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.16); }
.feature-tab[data-feature-tab="baoyan"].is-active { background: #bd4b24; box-shadow: 0 7px 17px rgba(189,75,36,.20); }

.feature-panels { position: relative; }
.feature-panel[hidden] { display: none !important; }
.features-grid {
    display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px;
}
.features-grid .feature-card { grid-column: auto; }
.features-grid .feature-card--lead { grid-column: span 2; }
.feature-card {
    min-height: 205px; padding: 22px; color: inherit; text-decoration: none;
    background: #fff; border: 1px solid var(--line); border-radius: 16px;
    display: flex; flex-direction: column; overflow: hidden; position: relative;
    transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .22s ease, box-shadow .25s ease, background-color .22s ease;
}
.feature-card::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
    background: linear-gradient(135deg, rgba(29,95,209,.05), transparent 48%); transition: opacity .22s ease;
}
.feature-card:hover { transform: translateY(-4px); border-color: #acc3e6; box-shadow: 0 15px 32px rgba(23,53,94,.10); }
.feature-card:hover::before { opacity: 1; }
.feature-card--lead {
    background: linear-gradient(135deg, #eef5ff 0%, #fff 72%); border-color: #cbdcf5;
}
.feature-panel[data-feature-panel="baoyan"] .feature-card--lead {
    background: linear-gradient(135deg, #fff2e9 0%, #fff 72%); border-color: #f1d3c4;
}
.feature-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; position: relative; z-index: 1; }
.feature-icon {
    inline-size: 44px; block-size: 44px; flex: 0 0 44px; aspect-ratio: 1; border-radius: 12px;
    display: grid; place-items: center; color: var(--blue); background: #edf4ff; border: 1px solid #dbe8fb;
}
.feature-panel[data-feature-panel="baoyan"] .feature-icon { color: #b64620; background: #fff0e6; border-color: #f4d8c9; }
.feature-icon .ui-icon { inline-size: 25px; block-size: 25px; }
.feature-label {
    min-height: 26px; display: inline-flex; align-items: center; border-radius: 999px; padding: 0 10px;
    color: var(--blue-strong); background: rgba(255,255,255,.82); border: 1px solid #cedcf1; font-size: 11px; font-weight: 800;
}
.feature-panel[data-feature-panel="baoyan"] .feature-label { color: #a53d1c; border-color: #ebcdbf; }
.feature-title { margin: 17px 0 7px; position: relative; z-index: 1; font-family: var(--font-display); font-size: 18px; line-height: 1.35; font-weight: 800; }
.feature-card--lead .feature-title { font-size: 21px; }
.feature-desc { margin: 0; position: relative; z-index: 1; color: var(--muted); font-size: 13px; line-height: 1.78; letter-spacing: .012em; }
.feature-card--lead .feature-desc { max-width: 590px; font-size: 14px; }
.feature-link {
    margin-top: auto; padding-top: 16px; position: relative; z-index: 1;
    display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
    color: var(--blue); font-size: 12px; font-weight: 800;
}
.feature-panel[data-feature-panel="baoyan"] .feature-link { color: #b64620; }
.feature-link .ui-icon { inline-size: 16px; block-size: 16px; transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.feature-card:hover .feature-link .ui-icon { transform: translateX(4px); }

@media (max-width: 1080px) {
    .features-section-header { align-items: flex-start; }
    .features-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .features-grid .feature-card--lead { grid-column: span 2; }
}
@media (max-width: 680px) {
    .features-section-header { display: block; }
    .feature-tabs { width: 100%; margin-top: 17px; }
    .feature-tab { flex: 1; justify-content: center; padding-inline: 10px; }
    .features-grid { grid-template-columns: 1fr; gap: 12px; }
    .features-grid .feature-card--lead { grid-column: span 1; }
    .feature-card, .feature-card--lead { min-height: 180px; padding: 19px; }
    .feature-card--lead .feature-title { font-size: 19px; }
    .feature-card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .feature-card, .feature-tab, .feature-link .ui-icon { transition: none !important; }
}


/* === Tool-first information architecture and matching pages === */
.primary-nav a { padding-inline: 8px; font-size: 13px; }
.primary-nav { gap: 1px; }
.brand { min-width: 218px; }
.footer-grid { grid-template-columns: 1.3fr repeat(4,.55fr); }
.utility-btn-primary { color: #fff !important; background: var(--blue) !important; border-color: var(--blue) !important; }

/* Five-card balanced module: lead + one, then three. */
.features-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.features-grid .feature-card--lead { grid-column: span 2; }

.channel-hero, .match-hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(125deg,#153f8d,#1d5fd1 70%,#2468d8); padding: 58px 0; }
.channel-hero--baoyan { background: linear-gradient(125deg,#6f2f22,#a94323 48%,#cc5a2b); }
.channel-hero::after, .match-hero::after { content:""; position:absolute; width:340px; height:340px; border:65px solid rgba(255,255,255,.05); border-radius:50%; right:-150px; top:-150px; pointer-events:none; }
.channel-hero-grid, .match-hero-grid { position:relative; z-index:1; display:grid; grid-template-columns:minmax(0,1.25fr) minmax(280px,.55fr); gap:42px; align-items:center; }
.channel-eyebrow { display:inline-flex; align-items:center; min-height:32px; padding:5px 11px; border:1px solid rgba(255,255,255,.28); border-radius:999px; background:rgba(255,255,255,.1); font-size:12px; font-weight:800; }
.channel-hero h1, .match-hero h1 { margin:17px 0 11px; font:800 clamp(35px,4.5vw,54px)/1.16 var(--font-display); letter-spacing:-.025em; }
.channel-hero p, .match-hero p { max-width:720px; margin:0; color:#e5efff; font-size:15px; line-height:1.9; }
.channel-hero aside, .match-hero aside { border:1px solid rgba(255,255,255,.17); border-radius:18px; background:rgba(9,26,55,.42); padding:22px; backdrop-filter:blur(10px); }
.channel-hero aside strong, .match-hero aside strong { display:block; margin-bottom:11px; font-size:16px; }
.channel-hero aside ol, .match-hero aside ul { margin:0; padding-left:22px; color:#d5e5fa; font-size:13px; line-height:2.05; }
.channel-hero-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:25px; }
.button-primary, .button-secondary { min-height:44px; display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:0 17px; border-radius:10px; font-size:13px; font-weight:800; }
.button-primary { color:var(--blue-strong); background:#fff; box-shadow:0 10px 24px rgba(6,24,58,.2); }
.channel-hero--baoyan .button-primary { color:#9a3412; }
.button-secondary { color:#fff; border:1px solid rgba(255,255,255,.28); background:rgba(255,255,255,.08); }

.channel-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.channel-card { min-height:230px; padding:23px; border:1px solid var(--line); border-radius:16px; background:#fff; display:flex; flex-direction:column; scroll-margin-top:150px; transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease; }
.channel-card:first-child { grid-column:span 2; background:linear-gradient(135deg,#edf4ff,#fff 72%); border-color:#cadcf7; }
.channel-hero--baoyan + .section .channel-card:first-child { background:linear-gradient(135deg,#fff0e7,#fff 72%); border-color:#efd2c4; }
.channel-card:hover { transform:translateY(-3px); border-color:#acc3e6; box-shadow:0 14px 30px rgba(23,53,94,.09); }
.channel-card-icon { width:44px; height:44px; display:grid; place-items:center; border-radius:12px; color:var(--blue); background:#edf4ff; border:1px solid #dbe8fb; }
.channel-card-icon .ui-icon { width:25px; height:25px; }
.channel-card h2 { margin:18px 0 7px; font:800 19px/1.35 var(--font-display); }
.channel-card p { margin:0; color:var(--muted); font-size:13px; line-height:1.8; }
.channel-card a { margin-top:auto; padding-top:20px; display:flex; align-items:center; justify-content:space-between; color:var(--blue); font-size:12px; font-weight:800; }
.channel-card a .ui-icon { width:16px; height:16px; }
.channel-steps { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; }
.channel-step { min-height:145px; padding:20px; border:1px solid var(--line); border-radius:15px; background:#fff; display:grid; grid-template-columns:34px 1fr auto; gap:11px; align-items:start; }
.channel-step>span { width:31px; height:31px; display:grid; place-items:center; border-radius:9px; color:#fff; background:var(--blue); font-size:11px; font-weight:850; }
.channel-step h3 { margin:2px 0 6px; font:800 15px/1.35 var(--font-display); }
.channel-step p { margin:0; color:var(--muted); font-size:12px; line-height:1.7; }
.channel-step>.ui-icon { width:16px; height:16px; margin-top:7px; color:#8190a4; }

.match-section { padding-bottom:28px; }
.match-layout { display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:18px; align-items:start; }
.match-builder, .match-guide { background:#fff; border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow-sm); }
.match-builder { padding:24px; }
.match-panel-head { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; margin-bottom:20px; }
.match-panel-head h2, .match-guide h2 { margin:4px 0 5px; font:800 22px/1.3 var(--font-display); }
.match-panel-head p { margin:0; color:var(--muted); font-size:13px; }
.match-data-count { flex:0 0 auto; padding:6px 10px; border-radius:999px; color:var(--blue-strong); background:var(--blue-soft); font-size:11px; font-weight:800; }
.book-selector { display:grid; grid-template-columns:1.05fr 1.3fr .7fr .65fr auto; gap:9px; align-items:end; }
.book-selector label { min-width:0; display:block; }
.book-selector label span { display:block; margin-bottom:6px; color:#4d5b70; font-size:11px; font-weight:800; }
.book-selector select, .match-filters select { width:100%; min-height:44px; border:1px solid #d7e0ec; border-radius:9px; background:#fff; color:var(--ink); padding:0 10px; outline:0; }
.book-selector select:focus, .match-filters select:focus { border-color:#78a4e7; box-shadow:0 0 0 3px rgba(29,95,209,.10); }
.add-book-btn, .match-run-btn { min-height:44px; border:0; border-radius:9px; padding:0 15px; cursor:pointer; font-weight:800; }
.add-book-btn { color:#fff; background:var(--blue); white-space:nowrap; }
.selected-books { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:18px 0; }
.selected-books-empty { grid-column:1/-1; margin:0; padding:14px; border:1px dashed #ccd6e4; border-radius:10px; color:var(--subtle); text-align:center; font-size:12px; }
.selected-book { min-width:0; display:grid; grid-template-columns:27px 1fr 28px; gap:9px; align-items:center; padding:11px; border:1px solid #dbe5f2; border-radius:11px; background:#f7faff; }
.selected-book>span { width:25px; height:25px; display:grid; place-items:center; border-radius:7px; color:#fff; background:var(--blue); font-size:10px; font-weight:800; }
.selected-book strong, .selected-book small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.selected-book strong { font-size:13px; }
.selected-book small { color:var(--muted); font-size:10px; }
.selected-book button { border:0; background:transparent; color:#8895a7; cursor:pointer; font-size:20px; }
.match-filters { display:grid; grid-template-columns:auto 150px 150px 1fr; gap:9px; align-items:center; border-top:1px solid var(--line); padding-top:18px; }
.match-filters>span { color:#4d5b70; font-size:12px; font-weight:800; }
.match-run-btn { display:flex; align-items:center; justify-content:center; gap:7px; color:#fff; background:var(--orange); }
.match-run-btn .ui-icon { width:17px; height:17px; }
.match-guide { padding:22px; }
.match-guide ol { list-style:none; padding:0; margin:16px 0; counter-reset:guide; }
.match-guide li { display:grid; grid-template-columns:31px 1fr; gap:10px; padding:12px 0; border-top:1px solid var(--line); }
.match-guide li::before { counter-increment:guide; content:counter(guide); width:27px; height:27px; display:grid; place-items:center; border-radius:8px; color:var(--blue); background:var(--blue-soft); font-size:11px; font-weight:900; }
.match-guide li strong, .match-guide li span { display:block; }
.match-guide li strong { font-size:13px; }
.match-guide li span { color:var(--muted); font-size:11px; line-height:1.65; }
.match-guide>p { margin:0; padding:13px; border-radius:10px; color:#5a6678; background:#f5f7fa; font-size:11px; line-height:1.75; }
.match-results { display:grid; gap:14px; }
.match-empty { min-height:210px; display:flex; flex-direction:column; align-items:center; justify-content:center; border:1px dashed #cbd6e5; border-radius:16px; background:#fff; text-align:center; color:var(--muted); }
.match-empty .ui-icon { width:38px; height:38px; color:#7ba0d7; }
.match-empty h3 { margin:11px 0 4px; color:var(--ink); }
.match-empty p { margin:0; font-size:13px; }
.match-school-card { padding:22px; border:1px solid var(--line); border-radius:16px; background:#fff; }
.match-school-card.is-exact { border-color:#a9c7ee; box-shadow:inset 4px 0 0 var(--blue); }
.match-school-head { display:flex; justify-content:space-between; gap:20px; }
.match-state { display:inline-flex; padding:4px 8px; border-radius:999px; color:#7a4a17; background:#fff1dc; font-size:10px; font-weight:850; }
.is-exact .match-state { color:#0d569c; background:#e8f2ff; }
.match-school-head h3 { margin:8px 0 2px; font:800 19px/1.35 var(--font-display); }
.match-school-head p { margin:0; color:var(--muted); font-size:11px; }
.match-score { flex:0 0 auto; min-width:78px; text-align:center; }
.match-score strong { display:block; color:var(--blue); font-size:27px; line-height:1.15; }
.match-score span { color:var(--subtle); font-size:10px; }
.match-school-tags { display:flex; gap:6px; flex-wrap:wrap; margin:13px 0; }
.match-book-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.match-book-columns>div { padding:14px; border-radius:11px; background:#f6f9fd; }
.match-book-columns h4 { margin:0 0 8px; font-size:12px; }
.match-book-columns ul { list-style:none; margin:0; padding:0; }
.match-book-columns li { padding:7px 0; border-top:1px solid #e2e8f1; }
.match-book-columns li:first-child { border-top:0; }
.match-book-columns strong, .match-book-columns span { display:block; }
.match-book-columns strong { font-size:12px; }
.match-book-columns span { color:var(--muted); font-size:10px; }
.match-missing { background:#fff8f4 !important; }
.match-note { margin:12px 0 0; padding:10px 12px; border-radius:9px; color:#77543e; background:#fff4e9; font-size:11px; }
.match-school-actions { display:flex; justify-content:space-between; gap:15px; align-items:center; border-top:1px solid var(--line); margin-top:15px; padding-top:14px; color:var(--subtle); font-size:10px; }
.match-school-actions>div { display:flex; gap:8px; }
.match-school-actions a { padding:6px 9px; border:1px solid #d7e0ec; border-radius:8px; color:var(--blue-strong); background:#fff; font-weight:800; }

@media (max-width:1180px) {
  .brand { min-width:205px; }
  .primary-nav a { padding-inline:6px; font-size:12px; }
  .header-cta { padding-inline:11px; }
}
@media (max-width:1080px) {
  .footer-grid { grid-template-columns:1.2fr repeat(2,minmax(0,1fr)); }
  .footer-column:nth-child(4), .footer-column:nth-child(5) { margin-top:4px; }
  .features-grid, .channel-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .features-grid .feature-card--lead, .channel-card:first-child { grid-column:span 2; }
  .channel-steps { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .book-selector { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .add-book-btn { grid-column:1/-1; }
  .match-layout { grid-template-columns:1fr; }
  .match-guide { display:none; }
}
@media (max-width:768px) {
  .channel-hero, .match-hero { padding:38px 0; }
  .channel-hero-grid, .match-hero-grid { grid-template-columns:1fr; gap:22px; }
  .channel-hero aside, .match-hero aside { padding:17px; }
  .footer-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .selected-books, .match-book-columns { grid-template-columns:1fr; }
  .match-filters { grid-template-columns:1fr 1fr; }
  .match-filters>span, .match-run-btn { grid-column:1/-1; }
  .match-panel-head { display:block; }
  .match-data-count { display:inline-block; margin-top:10px; }
}
@media (max-width:560px) {
  .features-grid, .channel-grid, .channel-steps { grid-template-columns:1fr; }
  .features-grid .feature-card--lead, .channel-card:first-child { grid-column:span 1; }
  .book-selector, .match-filters { grid-template-columns:1fr; }
  .add-book-btn, .match-filters>span, .match-run-btn { grid-column:auto; }
  .match-builder { padding:17px; }
  .match-school-head, .match-school-actions { align-items:flex-start; flex-direction:column; }
  .match-school-actions>div { flex-wrap:wrap; }
  .footer-grid { grid-template-columns:1fr; }
}
@media (hover:none) {
  .channel-card:hover { transform:none; box-shadow:none; }
}
@media (prefers-reduced-motion:reduce) {
  .channel-card { transition:none !important; }
}

/* Final responsive QA fixes */
.stats-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.match-guide li strong, .match-guide li span { grid-column: 2; }
@media (max-width:768px){ .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:520px){ .stats-grid { grid-template-columns:1fr; } }
.match-book-columns > div:only-child { grid-column: 1 / -1; }


/* Reference-book cover presentation */
.book-version-preview { display:flex; align-items:center; gap:16px; margin:18px 0 16px; padding:13px 15px; min-height:112px; border:1px solid #dbe4f0; border-radius:14px; background:linear-gradient(135deg,#f8fbff,#f2f6fc); }
.book-version-preview figure { flex:0 0 66px; width:66px; height:88px; margin:0; border-radius:9px; overflow:hidden; background:#fff; border:1px solid #d8e1ed; box-shadow:0 7px 18px rgba(34,65,110,.09); }
.book-version-preview img { width:100%; height:100%; object-fit:cover; display:block; }
.book-version-preview.is-placeholder img { object-fit:contain; }
.book-version-preview-copy { min-width:0; }
.book-version-preview-copy span { display:block; margin-bottom:6px; color:var(--blue); font-size:10px; font-weight:850; letter-spacing:.08em; }
.book-version-preview-copy strong { display:block; font:800 18px/1.35 var(--font-display); }
.book-version-preview-copy small { display:block; margin-top:6px; color:var(--muted); font-size:11px; line-height:1.55; }
.selected-book { position:relative; grid-template-columns:46px 28px minmax(0,1fr) 32px !important; align-items:center; }
.selected-book figure { width:42px; height:56px; margin:0; overflow:hidden; border:1px solid #d9e2ee; border-radius:7px; background:#fff; }
.selected-book figure img { display:block; width:100%; height:100%; object-fit:cover; }
.selected-book-index { width:26px !important; height:26px !important; }
.match-book-columns li { display:grid; grid-template-columns:34px minmax(0,1fr); gap:9px; align-items:center; }
.match-book-columns li > div { min-width:0; }
.match-book-cover { width:34px; height:46px; object-fit:cover; border:1px solid #dce4ee; border-radius:5px; background:#fff; }
@media(max-width:620px){
  .book-version-preview { align-items:flex-start; }
  .book-version-preview figure { flex-basis:58px; width:58px; height:78px; }
  .selected-book { grid-template-columns:40px 25px minmax(0,1fr) 30px !important; }
  .selected-book figure { width:38px; height:51px; }
}


/* === Reference-book library and current-subsection state === */
.secondary-nav a.sub-current {
  color: #fff;
  background: rgba(255,255,255,.075);
}
.secondary-nav a.sub-current::after { left: 12px; right: 12px; opacity: .86; }
.mobile-menu a.sub-current { color:#fff; border-color:rgba(104,158,241,.38); background:rgba(37,105,218,.18); }

.book-library-hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(125deg,#153f8d,#1d5fd1 70%,#2468d8);
  padding: 52px 0;
}
.book-library-hero::after {
  content:""; position:absolute; width:320px; height:320px; border:60px solid rgba(255,255,255,.05);
  border-radius:50%; right:-140px; top:-160px; pointer-events:none;
}
.book-library-hero-grid {
  position:relative; z-index:1; display:grid; grid-template-columns:minmax(0,1.25fr) minmax(260px,.55fr);
  gap:42px; align-items:center;
}
.book-library-hero h1 { margin:17px 0 11px; font:800 clamp(36px,4.3vw,52px)/1.15 var(--font-display); letter-spacing:-.025em; }
.book-library-hero p { max-width:760px; margin:0; color:#e5efff; font-size:15px; line-height:1.85; }
.book-library-stats {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1px; padding:1px;
  border:1px solid rgba(255,255,255,.17); border-radius:18px; overflow:hidden;
  background:rgba(255,255,255,.12); backdrop-filter:blur(10px);
}
.book-library-stats div { min-width:0; padding:22px 12px; text-align:center; background:rgba(9,26,55,.42); }
.book-library-stats strong { display:block; font:850 27px/1 var(--font-display); }
.book-library-stats span { display:block; margin-top:8px; color:#d5e5fa; font-size:11px; white-space:nowrap; }
.book-library-section { padding-top:36px; }
.book-library-toolbar { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:18px; }
.book-library-toolbar h2 { margin:5px 0 6px; font:800 27px/1.3 var(--font-display); }
.book-library-toolbar p { margin:0; color:var(--muted); font-size:13px; }
.book-library-controls { display:grid; grid-template-columns:minmax(260px,1fr) 170px; gap:10px; width:min(100%,540px); }
.book-library-controls label { min-width:0; }
.book-library-controls input, .book-library-controls select {
  width:100%; min-height:44px; border:1px solid #d7e0ec; border-radius:10px; background:#fff; color:var(--ink); outline:0;
}
.book-library-controls input { padding:0 13px 0 39px; }
.book-library-controls select { padding:0 11px; }
.book-library-controls input:focus, .book-library-controls select:focus { border-color:#78a4e7; box-shadow:0 0 0 3px rgba(29,95,209,.10); }
.book-search-field { position:relative; }
.book-search-field>.ui-icon { position:absolute; left:13px; top:50%; transform:translateY(-50%); width:17px; height:17px; color:#75849a; pointer-events:none; }
.book-library-summary { display:flex; justify-content:space-between; gap:18px; align-items:center; margin-bottom:14px; color:var(--muted); font-size:12px; }
.book-library-summary a { color:var(--blue); font-weight:800; }
.book-library-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.book-library-card {
  min-width:0; overflow:hidden; display:grid; grid-template-rows:250px 1fr;
  border:1px solid var(--line); border-radius:16px; background:#fff; color:inherit;
  transition:transform .24s ease,border-color .22s ease,box-shadow .24s ease;
}
.book-library-card:hover { transform:translateY(-4px); border-color:#b8cbea; box-shadow:0 15px 34px rgba(23,53,94,.10); }
.book-library-card figure { margin:0; padding:18px; display:grid; place-items:center; background:linear-gradient(145deg,#f3f7fd,#eaf1fb); border-bottom:1px solid var(--line); }
.book-library-card figure img { width:min(100%,150px); height:214px; object-fit:cover; border-radius:8px; background:#fff; box-shadow:0 13px 28px rgba(24,53,95,.16); }
.book-library-card-copy { min-width:0; padding:18px; display:flex; flex-direction:column; }
.book-library-version { align-self:flex-start; padding:4px 8px; border-radius:999px; color:var(--blue-strong); background:var(--blue-soft); font-size:10px; font-weight:850; }
.book-library-card h2 { margin:13px 0 6px; font:800 18px/1.35 var(--font-display); }
.book-library-card p { margin:0; color:var(--muted); font-size:12px; line-height:1.65; }
.book-library-card-foot { margin-top:auto; padding-top:17px; display:flex; align-items:center; justify-content:space-between; gap:10px; border-top:1px solid var(--line); color:var(--subtle); font-size:10px; }
.book-library-card-foot strong { display:inline-flex; align-items:center; gap:5px; color:var(--blue); font-size:11px; white-space:nowrap; }
.book-library-card-foot .ui-icon { width:14px; height:14px; transition:transform .2s ease; }
.book-library-card:hover .book-library-card-foot .ui-icon { transform:translateX(3px); }
.book-library-empty { grid-column:1/-1; min-height:240px; display:grid; place-content:center; text-align:center; border:1px dashed #cbd6e5; border-radius:16px; background:#fff; color:var(--muted); }
.book-library-empty h3 { margin:0 0 7px; color:var(--ink); }
.book-library-empty p { margin:0; font-size:13px; }
.sr-only { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important; }

@media (max-width:1180px) {
  .book-library-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:900px) {
  .book-library-hero-grid { grid-template-columns:1fr; gap:22px; }
  .book-library-stats { max-width:520px; }
  .book-library-toolbar { align-items:flex-start; flex-direction:column; }
  .book-library-controls { width:100%; }
  .book-library-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:560px) {
  .book-library-hero { padding:38px 0; }
  .book-library-stats div { padding:17px 8px; }
  .book-library-stats strong { font-size:23px; }
  .book-library-controls { grid-template-columns:1fr; }
  .book-library-summary { align-items:flex-start; flex-direction:column; gap:7px; }
  .book-library-grid { grid-template-columns:1fr; }
  .book-library-card { grid-template-columns:104px minmax(0,1fr); grid-template-rows:auto; }
  .book-library-card figure { min-height:180px; padding:12px; border-bottom:0; border-right:1px solid var(--line); }
  .book-library-card figure img { width:82px; height:118px; }
  .book-library-card-copy { padding:15px; }
  .book-library-card-foot { align-items:flex-start; flex-direction:column; }
}
@media (prefers-reduced-motion: reduce) {
  .book-library-card, .book-library-card-foot .ui-icon { transition:none !important; }
}
/* === Persistent navigation state system === */
/* Hover is a temporary cue; .nav-current is the persistent location cue. */
.primary-nav a,
.secondary-nav a:not(.nav-channel),
.mobile-menu a {
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}

.primary-nav a::after,
.secondary-nav a:not(.nav-channel)::after {
  opacity: 0;
  left: 50%;
  right: 50%;
}

.primary-nav a:hover,
.secondary-nav a:not(.nav-channel):hover {
  color: #fff;
  background: rgba(255,255,255,.065);
}
.primary-nav a:hover::after,
.secondary-nav a:not(.nav-channel):hover::after {
  left: 38%;
  right: 38%;
  opacity: .42;
}

.primary-nav a.nav-current,
.primary-nav a[aria-current="page"] {
  color: #fff;
  background: rgba(255,255,255,.115);
  box-shadow: inset 0 -3px 0 rgba(255,255,255,.95), 0 5px 14px rgba(0,0,0,.10);
  font-weight: 800;
}
.primary-nav a.nav-current::after,
.primary-nav a[aria-current="page"]::after {
  display: none;
}

.secondary-nav a.nav-current:not(.nav-channel),
.secondary-nav a[aria-current="page"]:not(.nav-channel) {
  color: #fff;
  background: rgba(50,112,216,.18);
  box-shadow: inset 0 -2px 0 #7eafff;
  font-weight: 800;
}
.secondary-nav a.nav-current--baoyan:not(.nav-channel) {
  background: rgba(180,75,39,.19);
  box-shadow: inset 0 -2px 0 #f3a082;
}
.secondary-nav a.nav-current:not(.nav-channel)::after,
.secondary-nav a[aria-current="page"]:not(.nav-channel)::after {
  display: none;
}

/* Channel labels keep their established blue/orange identity and are not used as hover/current pills. */
.secondary-nav .nav-channel:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.secondary-nav .nav-channel.nav-current,
.secondary-nav .nav-channel[aria-current="page"] {
  box-shadow: none;
}

.mobile-menu a:hover {
  color: #fff;
  background: rgba(255,255,255,.075);
}
.mobile-menu a.nav-current,
.mobile-menu a[aria-current="page"] {
  color: #fff;
  border-color: rgba(116,174,255,.72);
  background: rgba(48,111,218,.25);
  box-shadow: inset 3px 0 0 #7eafff;
  font-weight: 800;
}
.mobile-menu a.nav-current--baoyan {
  border-color: rgba(241,157,126,.55);
  background: rgba(178,72,36,.22);
  box-shadow: inset 3px 0 0 #f3a082;
}

/* Selected books remain readable after cover images are added. */
.selected-book > div { min-width: 0; }
.selected-book strong { white-space: normal; line-height: 1.35; }
.selected-book small { margin-top: 3px; }
@media (min-width: 860px) {
  .selected-books:has(.selected-book:only-child) { grid-template-columns: minmax(0, 1fr); }
  .selected-books:has(.selected-book:only-child) .selected-book { max-width: 640px; }
}

@media (prefers-reduced-motion: reduce) {
  .secondary-nav .nav-channel:hover { transform: none; }
}


/* ===== Flat-cover to 3D book presentation ===== */
.book-version-preview[hidden] { display:none !important; }
.book-cover-slot { margin:0; display:grid; place-items:center; overflow:visible !important; border:0 !important; background:transparent !important; box-shadow:none !important; }
.book-mockup {
  --book-w:72px;
  --book-h:102px;
  --book-depth:7px;
  position:relative;
  display:inline-block;
  flex:0 0 auto;
  width:var(--book-w);
  height:var(--book-h);
  transform-style:preserve-3d;
  perspective:800px;
  filter:drop-shadow(0 10px 11px rgba(22,43,76,.18));
  transition:transform .28s cubic-bezier(.2,.7,.2,1), filter .28s ease;
}
.book-mockup-front {
  position:absolute;
  inset:0;
  z-index:3;
  overflow:hidden;
  border:1px solid rgba(17,37,70,.14);
  border-radius:3px 8px 8px 3px;
  background:#fff;
  transform:rotateY(-7deg) translateZ(2px);
  transform-origin:left center;
  box-shadow:inset 2px 0 0 rgba(255,255,255,.35), inset -2px 0 4px rgba(17,37,70,.09);
}
.book-mockup-front img { display:block !important; width:100% !important; height:100% !important; max-width:none !important; object-fit:cover !important; border:0 !important; border-radius:0 !important; box-shadow:none !important; background:#fff; }
.book-mockup-spine {
  position:absolute;
  z-index:1;
  left:-5px;
  top:4px;
  bottom:4px;
  width:calc(var(--book-depth) + 2px);
  border-radius:4px 0 0 4px;
  background:linear-gradient(90deg,#d5dce8 0,#f8fafc 34%,#aeb9c9 100%);
  transform:skewY(-11deg);
  box-shadow:inset -1px 0 1px rgba(0,0,0,.13);
}
.book-mockup-pages {
  position:absolute;
  z-index:2;
  right:-5px;
  top:5px;
  bottom:4px;
  width:7px;
  border-radius:0 4px 4px 0;
  background:repeating-linear-gradient(180deg,#fdfdfb 0 2px,#dfe4e9 2px 3px);
  transform:skewY(8deg);
  box-shadow:2px 2px 5px rgba(20,35,60,.13);
}
.book-mockup::after {
  content:"";
  position:absolute;
  z-index:0;
  left:8%;
  right:-9%;
  bottom:-7px;
  height:11px;
  border-radius:50%;
  background:rgba(25,45,80,.20);
  filter:blur(5px);
  transform:rotate(-2deg);
}
.book-mockup--library { --book-w:148px; --book-h:212px; --book-depth:10px; }
.book-mockup--preview { --book-w:76px; --book-h:108px; --book-depth:7px; }
.book-mockup--selected { --book-w:40px; --book-h:56px; --book-depth:4px; filter:drop-shadow(0 5px 5px rgba(22,43,76,.16)); }
.book-mockup--result { --book-w:31px; --book-h:44px; --book-depth:3px; filter:drop-shadow(0 4px 4px rgba(22,43,76,.14)); }
.book-library-card:hover .book-mockup--library { transform:translateY(-3px) rotateY(-2deg); filter:drop-shadow(0 16px 15px rgba(22,43,76,.23)); }
.book-library-card figure.book-cover-slot { min-height:272px; padding:24px 18px 20px; }
.book-version-preview figure.book-cover-slot { flex:0 0 92px; width:92px; height:126px; }
.selected-book figure.book-cover-slot { width:46px; height:62px; }
.match-book-columns li > .book-mockup { margin-right:8px; }
.match-book-columns li { align-items:center; }

@media (max-width:700px) {
  .book-mockup--library { --book-w:84px; --book-h:120px; --book-depth:6px; }
  .book-library-card figure.book-cover-slot { min-height:166px; padding:18px 12px; }
  .book-version-preview figure.book-cover-slot { flex-basis:72px; width:72px; height:102px; }
  .book-mockup--preview { --book-w:60px; --book-h:86px; --book-depth:5px; }
}
@media (prefers-reduced-motion: reduce) {
  .book-mockup { transition:none !important; }
  .book-library-card:hover .book-mockup--library { transform:none; }
}

/* ===== Scheme B: refined light-3D reference-book cards ===== */
/* Keep uploaded cover artwork unchanged. Depth is created only with CSS. */
.book-library-card {
  grid-template-rows: 276px 1fr;
  border-color: #d9e2ef;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(23, 53, 94, .035);
}
.book-library-card figure.book-cover-slot {
  min-height: 276px;
  padding: 24px 18px 18px;
  background: #fff !important;
  border-bottom: 0;
}
.book-mockup--library {
  --book-w: 148px;
  --book-h: 212px;
  --book-depth: 5px;
  filter: drop-shadow(0 12px 12px rgba(25, 47, 80, .14));
}
.book-mockup-front {
  border: 1px solid rgba(19, 42, 74, .10);
  border-radius: 2px 6px 6px 2px;
  transform: rotateY(-2.2deg) translateZ(1px);
  box-shadow:
    inset 1px 0 0 rgba(255,255,255,.36),
    inset -1px 0 2px rgba(17,37,70,.05);
}
.book-mockup-spine {
  left: -3px;
  top: 3px;
  bottom: 3px;
  width: calc(var(--book-depth) + 1px);
  border-radius: 3px 0 0 3px;
  background: linear-gradient(90deg, rgba(76,94,123,.38), rgba(239,243,249,.92));
  transform: skewY(-5deg);
  box-shadow: inset -1px 0 1px rgba(0,0,0,.08);
}
.book-mockup-pages {
  right: -2px;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(90deg, #f3f4f5, #fff);
  transform: skewY(3deg);
  box-shadow: 1px 1px 3px rgba(20,35,60,.08);
}
.book-mockup::after {
  left: 10%;
  right: -6%;
  bottom: -6px;
  height: 9px;
  background: rgba(25,45,80,.14);
  filter: blur(6px);
  transform: none;
}
.book-library-card:hover {
  transform: translateY(-3px);
  border-color: #bfd0e8;
  box-shadow: 0 14px 30px rgba(23,53,94,.085);
}
.book-library-card:hover .book-mockup--library {
  transform: translateY(-2px);
  filter: drop-shadow(0 15px 14px rgba(25,47,80,.18));
}
.book-library-card-copy {
  padding: 0 18px 18px;
}
.book-library-version {
  padding: 5px 10px;
  color: #fff;
  background: #0b63d8;
  border-radius: 7px;
  box-shadow: 0 4px 10px rgba(11,99,216,.16);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .015em;
}
.book-library-card h2 {
  margin-top: 14px;
}
.book-library-card-foot {
  margin-top: 16px;
}

/* The same restrained depth is used in match-page previews. */
.book-mockup--preview {
  --book-depth: 4px;
  filter: drop-shadow(0 7px 8px rgba(25,47,80,.13));
}
.book-mockup--selected,
.book-mockup--result {
  --book-depth: 2px;
}

@media (max-width:700px) {
  .book-library-card { grid-template-rows: auto; }
  .book-library-card figure.book-cover-slot {
    min-height: 166px;
    padding: 16px 12px;
  }
  .book-library-card-copy { padding: 15px; }
  .book-library-version { padding: 4px 8px; border-radius: 6px; }
}

/* ===== Final Scheme B: full-bleed, auto-trimmed light 3D books ===== */
/* Uploaded cover files remain untouched; near-white outer margins are trimmed only at display time. */
.book-mockup {
  --book-w: 72px;
  --book-ratio: .70;
  --spine-color: rgb(111 132 163);
  width: var(--book-w) !important;
  height: calc(var(--book-w) / var(--book-ratio)) !important;
  perspective: 900px;
  filter: drop-shadow(0 11px 13px rgba(22, 43, 76, .16));
}
.book-mockup-front {
  inset: 0 !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 2px 7px 7px 2px !important;
  background: #f8fafc;
  transform: rotateY(-3deg) translateZ(1px) !important;
  box-shadow:
    inset 1px 0 rgba(255,255,255,.34),
    inset -1px 0 2px rgba(18,37,67,.08),
    0 0 0 1px rgba(20,42,76,.08) !important;
}
.book-mockup-front img.book-cover-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  transform: none !important;
  background: transparent !important;
}
.book-mockup-spine {
  left: -6px !important;
  top: 3px !important;
  bottom: 3px !important;
  width: 8px !important;
  border-radius: 4px 0 0 4px !important;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--spine-color) 84%, #0d1728),
    var(--spine-color) 52%,
    color-mix(in srgb, var(--spine-color) 72%, #fff)) !important;
  transform: skewY(-3.5deg) !important;
  box-shadow: inset -1px 0 1px rgba(0,0,0,.14), -1px 1px 2px rgba(18,36,64,.07) !important;
}
.book-mockup-pages {
  right: -2px !important;
  top: 4px !important;
  bottom: 4px !important;
  width: 3px !important;
  border-radius: 0 3px 3px 0 !important;
  background: linear-gradient(90deg,#e9edf2,#fff) !important;
  transform: skewY(2deg) !important;
  box-shadow: 1px 1px 2px rgba(20,35,60,.07) !important;
}
.book-mockup::after {
  left: 7% !important;
  right: -9% !important;
  bottom: -8px !important;
  height: 11px !important;
  background: rgba(23,43,73,.16) !important;
  filter: blur(7px) !important;
  transform: rotate(-1deg) !important;
}
.book-mockup.is-placeholder-cover {
  --book-ratio: .70;
  --spine-color: rgb(168 184 209);
}
.book-mockup.is-placeholder-cover .book-mockup-front {
  background: #edf4ff;
}
.book-mockup--library {
  --book-w: 164px !important;
  --book-ratio: .70;
  --book-depth: 6px;
}
.book-library-card {
  grid-template-rows: 286px 1fr !important;
}
.book-library-card figure.book-cover-slot {
  min-height: 286px !important;
  padding: 25px 18px 18px !important;
  background: #fff !important;
}
.book-library-card:hover .book-mockup--library {
  transform: translateY(-3px) rotateY(-1deg) !important;
  filter: drop-shadow(0 17px 16px rgba(23,45,78,.20)) !important;
}
.book-library-version {
  color: #fff !important;
  background: #0b63d8 !important;
  border-radius: 7px !important;
  box-shadow: 0 4px 10px rgba(11,99,216,.18) !important;
}
.book-mockup--preview { --book-w: 78px !important; }
.book-mockup--selected { --book-w: 42px !important; }
.book-mockup--result { --book-w: 33px !important; }

@supports not (background: color-mix(in srgb, red, blue)) {
  .book-mockup-spine { background: linear-gradient(90deg,#66758d,#aeb9ca,#d8dee8) !important; }
}

@media (max-width: 700px) {
  .book-mockup--library { --book-w: 88px !important; }
  .book-library-card { grid-template-rows: auto !important; }
  .book-library-card figure.book-cover-slot { min-height: 172px !important; padding: 17px 12px !important; }
  .book-mockup--preview { --book-w: 61px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .book-mockup,
  .book-library-card:hover .book-mockup--library { transition: none !important; transform: none !important; }
}

/* ===== Scheme A: flat reference-book covers =====
   Uploaded cover images stay unchanged. No fake spine, page edge or perspective. */
.book-mockup {
  --book-w: 72px;
  --book-ratio: .70;
  position: relative !important;
  display: block !important;
  width: var(--book-w) !important;
  height: calc(var(--book-w) / var(--book-ratio)) !important;
  perspective: none !important;
  transform: none !important;
  transform-style: flat !important;
  filter: none !important;
}
.book-mockup-spine,
.book-mockup-pages,
.book-mockup::after {
  display: none !important;
  content: none !important;
}
.book-mockup-front {
  position: relative !important;
  inset: auto !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 2px !important;
  background: transparent !important;
  transform: none !important;
  box-shadow: 0 12px 25px rgba(25, 48, 82, .14) !important;
}
.book-mockup-front img.book-cover-image,
.book-mockup-front img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  border: 0 !important;
  border-radius: 2px !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}
.book-mockup.is-placeholder-cover .book-mockup-front {
  background: #edf4ff !important;
  border: 1px solid #c7d8f0 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}
.book-mockup--library {
  --book-w: 148px !important;
  --book-ratio: .70;
}
.book-library-card {
  grid-template-rows: 272px 1fr !important;
}
.book-library-card figure.book-cover-slot {
  min-height: 272px !important;
  padding: 24px 18px 18px !important;
  background: #fff !important;
}
.book-library-card:hover .book-mockup--library {
  transform: translateY(-3px) scale(1.01) !important;
  filter: none !important;
}
.book-library-card:hover .book-mockup-front {
  box-shadow: 0 17px 30px rgba(25, 48, 82, .18) !important;
}
/* Keep the stronger dark-blue year / edition badge. */
.book-library-version {
  color: #fff !important;
  background: #0b63d8 !important;
  border-radius: 7px !important;
  box-shadow: 0 4px 10px rgba(11, 99, 216, .18) !important;
}
.book-mockup--preview { --book-w: 76px !important; }
.book-mockup--selected { --book-w: 40px !important; }
.book-mockup--result { --book-w: 31px !important; }
.book-version-preview .book-mockup-front {
  box-shadow: 0 8px 18px rgba(25, 48, 82, .13) !important;
  border-radius: 2px !important;
}
.selected-book .book-mockup-front,
.match-book-columns .book-mockup-front {
  border-radius: 2px !important;
  box-shadow: 0 5px 10px rgba(25, 48, 82, .12) !important;
}
@media (max-width: 700px) {
  .book-mockup--library { --book-w: 88px !important; }
  .book-library-card { grid-template-rows: auto !important; }
  .book-library-card figure.book-cover-slot {
    min-height: 172px !important;
    padding: 17px 12px !important;
  }
  .book-mockup--preview { --book-w: 61px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .book-library-card:hover .book-mockup--library {
    transform: none !important;
  }
}

/* === Front-end control alignment hardening === */
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.section-link .ui-icon {
  display: block;
  width: 15px;
  height: 15px;
  inline-size: 15px;
  block-size: 15px;
  flex: 0 0 15px;
}
.section-link:hover .ui-icon { transform: translateX(3px); }

/* Use one controlled chevron instead of browser-native select arrows. */
.book-library-controls select,
.book-selector select,
.match-filters select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 38px !important;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5' fill='none' stroke='%2332445f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 14px 14px;
  cursor: pointer;
}
.book-library-controls select::-ms-expand,
.book-selector select::-ms-expand,
.match-filters select::-ms-expand { display: none; }

@media (max-width: 700px) {
  .section-header .section-link { align-self: flex-start; }
}

/* === Match page: searchable reference-book picker === */
.book-selector input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d7e0ec;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  outline: 0;
  font: inherit;
}
.book-selector input::placeholder { color: #98a4b5; }
.book-selector input:focus {
  border-color: #78a4e7;
  box-shadow: 0 0 0 3px rgba(29,95,209,.10);
}
.book-search-results {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dbe5f2;
  border-radius: 12px;
  background: #f8fbff;
}
.book-search-results[hidden] { display: none; }
.book-search-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.book-search-summary strong { font-size: 13px; color: var(--ink); }
.book-search-summary span { color: var(--muted); font-size: 11px; }
.book-search-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px;
}
.book-search-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid #dbe5f2;
  border-radius: 10px;
  background: #fff;
}
.book-search-card .book-cover-slot { margin: 0; }
.book-mockup--search { --book-w: 38px !important; }
.book-search-card-copy { min-width: 0; }
.book-search-card-copy strong,
.book-search-card-copy span,
.book-search-card-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.book-search-card-copy strong { color: var(--ink); font-size: 13px; }
.book-search-card-copy span { margin-top: 2px; color: #536176; font-size: 11px; }
.book-search-card-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.book-search-add {
  min-width: 62px;
  min-height: 34px;
  border: 1px solid #bcd0ef;
  border-radius: 8px;
  background: #fff;
  color: var(--blue-strong);
  cursor: pointer;
  font-weight: 800;
}
.book-search-add:hover:not(:disabled) { background: var(--blue-soft); border-color: #8fb2e7; }
.book-search-add:disabled { cursor: default; color: #8d99aa; background: #f3f5f8; border-color: #dce3ec; }
.book-search-empty {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 4px;
  color: var(--muted);
  font-size: 11px;
}
.book-search-empty strong { color: var(--ink); font-size: 13px; }
@media (max-width: 900px) {
  .book-search-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .book-search-summary { align-items: flex-start; flex-direction: column; gap: 3px; }
  .book-search-card { grid-template-columns: 42px minmax(0,1fr) auto; }
  .book-mockup--search { --book-w: 34px !important; }
}


/* === Match page refinement: aligned search controls and cleaner chevrons === */
.book-selector {
  grid-template-columns: 1.08fr 1.18fr .82fr .78fr auto;
  gap: 12px;
  align-items: end;
}
.book-selector label,
.match-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.book-selector label span,
.match-field > span:first-child {
  margin-bottom: 0;
  color: #42536b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}
.match-input-wrap {
  position: relative;
  display: block;
}
.book-selector input,
.book-selector select,
.match-filters select,
.add-book-btn,
.match-run-btn {
  min-height: 52px;
  border-radius: 12px;
}
.book-selector input {
  padding: 0 36px 0 14px;
  border-color: #d3deed;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.book-selector input:hover {
  border-color: #bfd0e8;
  background: #fcfdff;
}
.book-selector input[list]::-webkit-calendar-picker-indicator {
  opacity: 0;
  width: 28px;
  cursor: pointer;
}
.book-selector input[list]::-webkit-list-button {
  display: none;
}
.match-input-chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #60718a;
  border-bottom: 1.5px solid #60718a;
  transform: translateY(-62%) rotate(45deg);
  pointer-events: none;
  opacity: .92;
  transition: border-color .18s ease, transform .18s ease, opacity .18s ease;
}
.match-field:focus-within .match-input-chevron {
  border-color: var(--blue-strong);
  opacity: 1;
  transform: translateY(-58%) rotate(45deg);
}
.add-book-btn {
  padding: 0 22px;
  box-shadow: 0 10px 24px rgba(33, 90, 176, .16);
}
.add-book-btn:hover {
  background: #2059bd;
}
.book-search-results {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
}
.book-search-summary {
  align-items: center;
  margin-bottom: 12px;
}
.book-search-grid {
  gap: 12px;
}
.book-search-card {
  padding: 14px;
  border-radius: 12px;
}
.book-search-add {
  min-width: 74px;
  min-height: 36px;
}
.selected-books {
  gap: 12px;
  margin: 20px 0;
}
.selected-book {
  border-radius: 12px;
}
.match-filters {
  grid-template-columns: auto 170px 170px 1fr;
  gap: 12px;
  align-items: end;
  padding-top: 20px;
}
.match-filters label { display: block; }
.match-run-btn {
  box-shadow: 0 12px 26px rgba(199, 73, 8, .16);
}
.match-filters + .search-process {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid #dbe6f4;
  border-radius: 14px;
  background: linear-gradient(180deg, #eef5ff 0%, #f7fbff 100%);
  color: #193655;
  box-shadow: 0 12px 28px rgba(28, 69, 127, .10);
}
.match-filters + .search-process .search-process-head strong {
  color: #17314d;
}
.match-filters + .search-process .search-process-percent {
  color: #3568af;
  font-weight: 800;
}
.match-filters + .search-process .search-process-orbit {
  border-color: rgba(53, 104, 175, .22);
  background: rgba(255,255,255,.75);
}
.match-filters + .search-process .search-process-orbit i {
  background: #2a67c8;
  border-color: #2a67c8;
}
.match-filters + .search-process .search-process-track {
  background: #dbe7f7;
}
.match-filters + .search-process .search-process-track i {
  background: linear-gradient(90deg, #7aa8f2 0%, #2f6fd6 100%);
}
.match-filters + .search-process .search-process-steps span {
  color: #5f7490;
}
.match-filters + .search-process .search-process-steps span::before {
  background: #9fb4d0;
}
.match-filters + .search-process .search-process-steps span.active {
  color: #17314d;
  font-weight: 700;
}
.match-filters + .search-process .search-process-steps span.active::before {
  background: #2f6fd6;
  box-shadow: 0 0 0 3px rgba(47, 111, 214, .10);
}
.match-filters + .search-process .search-process-steps span.done {
  color: #2a5fa9;
}
.match-filters + .search-process .search-process-steps span.done::before {
  background: #2f6fd6;
}
@media (max-width: 1080px) {
  .book-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .add-book-btn {
    grid-column: 1 / -1;
  }
  .match-filters {
    grid-template-columns: 1fr 1fr;
  }
  .match-filters > span,
  .match-run-btn {
    grid-column: 1 / -1;
  }
}
@media (max-width: 700px) {
  .book-selector,
  .match-filters {
    grid-template-columns: 1fr;
  }
  .add-book-btn,
  .match-filters > span,
  .match-run-btn {
    grid-column: auto;
  }
  .book-search-card {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }
  .match-filters + .search-process {
    padding: 12px 13px;
  }
}

/* Match page final alignment: progress panel follows the full builder width. */
body[data-page="match"] .match-filters + .search-process {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

/* Match page: keep the result-filter label on the same visual axis as its controls. */
body[data-page="match"] .match-filters {
  grid-template-columns: max-content 170px 170px minmax(0, 1fr);
  align-items: center;
}
body[data-page="match"] .match-filters > span {
  display: flex;
  align-items: center;
  min-height: 52px;
  margin: 0;
  padding: 0;
  color: #263950;
  line-height: 1;
  white-space: nowrap;
}
@media (max-width: 1080px) {
  body[data-page="match"] .match-filters {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
  body[data-page="match"] .match-filters > span {
    min-height: auto;
    line-height: 1.4;
  }
}
@media (max-width: 700px) {
  body[data-page="match"] .match-filters {
    grid-template-columns: 1fr;
  }
}


/* 查备校：按专业 / 初试科目展示匹配结果 */
.match-program-results{display:grid;gap:12px;margin-top:14px}.match-program-card{padding:14px;border:1px solid #dfe7f1;border-radius:13px;background:#fbfdff}.match-program-card.is-exact{border-color:#b8d3f5;background:#f7fbff}.match-program-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:12px}.match-program-head>div{display:grid;gap:4px}.match-program-head strong{font-size:14px;color:#183555}.match-program-head small{color:#6c7b91;font-size:11px}.match-program-head>b{flex:0 0 auto;display:grid;place-items:center;min-width:48px;height:32px;padding:0 9px;border-radius:9px;background:#eaf2ff;color:#135abe;font-size:12px}.match-program-degree{width:max-content;padding:3px 7px;border-radius:6px;background:#edf4ff;color:#1b61bf;font-size:10px;font-weight:800}.match-program-card .match-book-columns{margin-top:0}.match-program-card .match-note{margin-top:10px}
@media(max-width:700px){.match-program-head{gap:10px}.match-program-head>b{min-width:42px}.match-program-card{padding:12px}}
/* Match results: compact book layout for grouped programs */
.match-program-card .match-book-columns > div { padding:12px; }
.match-program-card .match-book-columns ul { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:8px 10px; }
.match-program-card .match-book-columns li,
.match-program-card .match-book-columns li:first-child { margin:0; padding:8px 10px; border:1px solid #e2e8f1; border-radius:9px; background:#fff; }
.match-program-card .match-book-columns li > .book-mockup { margin-right:0; }
@media (max-width:700px) {
  .match-program-card .match-book-columns ul { grid-template-columns:1fr; }
}

