/* ============================================================
   电气工程及其自动化全国20强高校专题 · style.css
   主色调：蓝色 (#0e4d9c)  |  移动端自适应
   ============================================================ */
:root {
  --blue: #0e4d9c;
  --blue-dark: #093a78;
  --blue-light: #e8f0fa;
  --blue-mid: #3a78c2;
  --red: #d33;
  --text: #2b3445;
  --text-sub: #66708a;
  --line: #e3e9f2;
  --bg: #f4f7fb;
  --card: #ffffff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
@media (min-width: 700px) { body { font-size: 16px; } }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 14px; }

/* 微信分享缩略图（页面外不可见，不能 display:none） */
img.wx-thumb { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 50;
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
a.brand { color: inherit; }
a.brand:hover { text-decoration: none; }
.brand .logo-img {
  width: 42px; height: 42px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}
.brand .bname { font-size: 19px; font-weight: 700; color: #1c2433; line-height: 1.2; }
.brand .bsub { font-size: 12px; color: var(--text-sub); }

/* 专业导航 */
.major-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 2px; position: relative; }
.major-nav > a, .major-nav .more-btn {
  display: inline-block;
  padding: 5px 11px;
  font-size: 14.5px;
  color: #3d4a63;
  border-radius: 6px;
  white-space: nowrap;
}
.major-nav > a:hover, .major-nav .more-btn:hover { background: var(--blue-light); text-decoration: none; }
.major-nav > a.on { background: var(--blue); color: #fff; font-weight: 600; }
.more-box { position: relative; }
.more-btn { cursor: pointer; user-select: none; display: inline-flex; align-items: center; gap: 4px; }
.more-btn .caret, .pmore-btn .caret {
  width: 0; height: 0;
  border-left: 4.5px solid transparent;
  border-right: 4.5px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform .2s;
}
.more-box.open .caret { transform: rotate(180deg); }
.more-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 430px;
  max-width: calc(100vw - 28px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(14, 77, 156, .16);
  padding: 14px 16px;
  z-index: 60;
}
.more-box.open .more-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 8px; }
.more-panel a {
  padding: 7px 8px;
  font-size: 13.5px;
  color: #3d4a63;
  border-radius: 6px;
  text-align: center;
  white-space: nowrap;
}
.more-panel a:hover { background: var(--blue-light); color: var(--blue); text-decoration: none; }

/* ---------------- 头图 ---------------- */
.hero {
  position: relative;
  background: var(--blue-dark) url("../images/banner.jpg") center/cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(7, 38, 82, .82) 8%, rgba(9, 58, 120, .55) 45%, rgba(9, 58, 120, .18) 90%);
}
.hero .wrap { position: relative; padding-top: 46px; padding-bottom: 46px; }
.hero h1 {
  color: #fff;
  font-size: clamp(23px, 4.6vw, 40px);
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.35;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.hero h1 .em { color: #ffd257; }
.hero .kick {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(255, 210, 87, .16);
  border: 1px solid rgba(255, 210, 87, .5);
  color: #ffd257;
  font-size: clamp(12px, 1.8vw, 13.5px);
  letter-spacing: .5px;
}
.hero .sub {
  margin-top: 12px;
  color: #dce8f8;
  font-size: clamp(13.5px, 2.2vw, 16px);
  line-height: 1.75;
  max-width: 700px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .3);
}
.hero .tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero .tags span {
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  font-size: 12.5px;
  padding: 4px 12px;
  border-radius: 999px;
  backdrop-filter: blur(2px);
}

/* ---------------- 版块通用 ---------------- */
section.block { margin-top: 26px; }
.sec-h {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}
.sec-h .no {
  flex-shrink: 0;
  width: 34px; height: 34px;
  background: var(--blue);
  color: #fff;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
  align-self: center;
}
.sec-h h2 { font-size: clamp(18px, 3vw, 23px); color: #17233b; font-weight: 800; }
.sec-h .tip { font-size: 12.5px; color: var(--text-sub); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(23, 46, 90, .05);
}

/* ---------------- 前20强总表 ---------------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.table-scroll::-webkit-scrollbar { display: none; }
table.rank { width: 100%; border-collapse: collapse; min-width: 620px; }
table.rank th, table.rank td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.rank th {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  position: sticky; top: 0;
}
table.rank tbody tr:nth-child(even) { background: #f7faff; }
table.rank tbody tr:hover { background: var(--blue-light); }
table.rank td.num { font-weight: 700; color: var(--blue); }
table.rank td.school { font-weight: 600; color: #17233b; }
/* 总表：点行展开专业简介 */
table.rank tr.rrow { cursor: pointer; }
table.rank tr.rrow:hover { background: var(--blue-light); }
table.rank td.tgl { text-align: center; width: 46px; }
table.rank th.th-tgl { text-align: center; width: 46px; }
.tarr {
  display: inline-block;
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--blue-mid);
  transition: transform .2s;
}
tr.rrow.open .tarr { transform: rotate(180deg); }
table.rank tr.detail { display: none; }
table.rank tr.detail.open { display: table-row; }
table.rank tr.detail td {
  white-space: normal;
  font-size: 14.5px;
  color: #2b3445;
  background: #f7faff;
  line-height: 1.75;
}
.grade {
  display: inline-block;
  min-width: 30px;
  text-align: center;
  font-size: 12.5px; font-weight: 700;
  color: var(--blue);
  background: var(--blue-light);
  border-radius: 5px;
  padding: 1px 7px;
}
.grade.ap { color: #b4530a; background: #fdeee0; }
table.rank .foot-note td { white-space: normal; font-size: 12.5px; color: var(--text-sub); padding-top: 12px; }

/* ---------------- 专业介绍 ---------------- */
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.intro-item { padding: 18px 20px; }
.intro-item h3 {
  font-size: 16.5px; color: var(--blue);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 7px;
}
.intro-item h3::before {
  content: "";
  width: 5px; height: 17px;
  background: var(--blue);
  border-radius: 3px;
  flex-shrink: 0;
}
.intro-item p, .intro-item li { font-size: 14px; color: #3d4a63; }
.intro-item ul { padding-left: 18px; }
.intro-item li { margin: 3px 0; }
.intro-item .star { color: #b4530a; font-weight: 700; }

/* ---------------- 相近专业（专业介绍内的宽卡片） ---------------- */
.intro-item.wide { grid-column: 1 / -1; }
.sim-lead { margin-bottom: 4px; }
.sim-group { margin-top: 14px; }
.sim-group h4 { font-size: 14.5px; color: var(--blue-dark); font-weight: 700; margin-bottom: 6px; }
.sim-list { display: grid; gap: 2px; }
.sim-row {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px dashed var(--line);
}
.sim-name { font-size: 13.8px; font-weight: 600; color: #17233b; }
.sim-code {
  font-style: normal;
  font-family: Arial, sans-serif;
  font-size: 11.5px;
  color: var(--text-sub);
  background: #eff4fb;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 2px;
  white-space: nowrap;
}
.sim-diff { font-size: 13.5px; color: #3d4a63; }
.sim-tip {
  margin-top: 15px;
  background: var(--blue-light);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 13.5px;
  line-height: 1.75;
  color: #24405f;
}
.sim-tip b { color: var(--blue-dark); }
.courses { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.courses i {
  font-style: normal;
  font-size: 12.8px;
  background: var(--blue-light);
  color: var(--blue-dark);
  border-radius: 5px;
  padding: 2px 9px;
}
.courses i.core { background: #fdeee0; color: #b4530a; font-weight: 600; }
.diff-note {
  margin-top: 10px;
  background: #fffaf0;
  border: 1px solid #f5e2bd;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  color: #7a5a1c;
}

/* ---------------- 分数线 ---------------- */
/* sticky 放在外层包裹上，避免裁切「更多省份」下拉面板 */
.prov-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
}
.prov-bar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 12px;
  padding: 7px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.prov-bar button {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: #3d4a63;
  border-radius: 999px;
  padding: 4px 16px;
  font-size: 13.5px;
  cursor: pointer;
}
.prov-bar button:hover { border-color: var(--blue-mid); color: var(--blue); }
.prov-bar button.on, .pmore-panel button.on { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
/* 更多省份折叠下拉 */
.pmore-box { position: relative; }
.pmore-btn {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: #3d4a63;
  border-radius: 999px;
  padding: 4px 16px;
  font-size: 13.5px;
}
.pmore-btn:hover { border-color: var(--blue-mid); color: var(--blue); }
.pmore-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-width: calc(100vw - 28px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(14, 77, 156, .16);
  padding: 12px 14px;
  z-index: 60;
}
.pmore-box.open .pmore-panel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pmore-panel button {
  border: 1px solid var(--line);
  background: #fff;
  color: #3d4a63;
  border-radius: 999px;
  padding: 5px 4px;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}
.pmore-panel button:hover { border-color: var(--blue-mid); color: var(--blue); }
table.score { width: 100%; border-collapse: collapse; min-width: 980px; }
table.score th, table.score td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
table.score th { background: var(--blue); color: #fff; font-weight: 600; font-size: 13.5px; }
table.score td.school { text-align: left; font-weight: 600; color: #17233b; white-space: normal; min-width: 118px; }
table.score td.school small { display: block; font-weight: 400; color: var(--text-sub); font-size: 12px; }
table.score td .fs { font-weight: 400; color: var(--blue-dark); }
table.score td .wc { color: var(--text-sub); font-size: 12.8px; }
table.score tbody tr:nth-child(even) { background: #f7faff; }
table.score td.note { text-align: left; white-space: normal; font-size: 12.5px; color: var(--text-sub); min-width: 150px; }
table.score td .na { color: #b8c1d1; }
/* 新增25省列：全部省份视图隐藏 */
table.score th.pc, table.score td.pc { display: none; }
/* 备注：全部省份视图不显示，选中具体省份时显示（内容由JS按所选省份填充） */
table.score th.note, table.score td.note { display: none; }
/* 选中具体省份：隐藏全部省份列，仅显示所选列 */
body.filtered table.score .pv { display: none; }
body.filtered table.score th.note, body.filtered table.score td.note { display: table-cell; }
body.filtered table.score { min-width: 0; }
body.filtered.f-sc table.score .col-sc,
body.filtered.f-gd table.score .col-gd,
body.filtered.f-hn table.score .col-hn,
body.filtered.f-sd table.score .col-sd,
body.filtered.f-hb table.score .col-hb,
body.filtered.f-js table.score .col-js,
body.filtered.f-bj table.score .col-bj,
body.filtered.f-tj table.score .col-tj,
body.filtered.f-sh table.score .col-sh,
body.filtered.f-cq table.score .col-cq,
body.filtered.f-zj table.score .col-zj,
body.filtered.f-ah table.score .col-ah,
body.filtered.f-fj table.score .col-fj,
body.filtered.f-jx table.score .col-jx,
body.filtered.f-hub table.score .col-hub,
body.filtered.f-hun table.score .col-hun,
body.filtered.f-ln table.score .col-ln,
body.filtered.f-jl table.score .col-jl,
body.filtered.f-hlj table.score .col-hlj,
body.filtered.f-sx table.score .col-sx,
body.filtered.f-snx table.score .col-snx,
body.filtered.f-gs table.score .col-gs,
body.filtered.f-qh table.score .col-qh,
body.filtered.f-nx table.score .col-nx,
body.filtered.f-xj table.score .col-xj,
body.filtered.f-nmg table.score .col-nmg,
body.filtered.f-xz table.score .col-xz,
body.filtered.f-yn table.score .col-yn,
body.filtered.f-gz table.score .col-gz,
body.filtered.f-gx table.score .col-gx,
body.filtered.f-hi table.score .col-hi { display: table-cell; }

.score-warn {
  margin-top: 12px;
  background: #fffaf0;
  border: 1px solid #f5e2bd;
  border-radius: 9px;
  padding: 11px 14px;
  font-size: 13px;
  color: #7a5a1c;
}
.score-warn b { color: #b4530a; }

/* 大版块内的年份子标题 */
.sub-h {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0 12px;
  padding-left: 10px;
  border-left: 4px solid var(--blue);
  font-size: 17.5px;
  font-weight: 700;
  color: #17233b;
}
.sub-h:first-of-type { margin-top: 2px; }
.sub-h .sub-tip { font-size: 12.5px; font-weight: 400; color: var(--text-sub); }


/* ---------------- 2026年已公布分数线省份 ---------------- */
table.y26 { width: 100%; border-collapse: collapse; min-width: 640px; }
table.y26 th, table.y26 td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
table.y26 th { background: var(--blue); color: #fff; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
table.y26 td.num { font-weight: 700; color: var(--blue); white-space: nowrap; }
table.y26 td.school { font-weight: 600; color: #17233b; white-space: nowrap; }
table.y26 td.school small { display: block; font-weight: 400; color: var(--text-sub); font-size: 12px; }
table.y26 td.chips { white-space: normal; min-width: 260px; }
.pchip {
  display: inline-block;
  background: var(--blue-light);
  border: 1px solid #d0e0f4;
  color: var(--blue-dark);
  border-radius: 999px;
  padding: 2px 10px;
  margin: 2px 5px 2px 0;
  font-size: 12.8px;
  font-weight: 400;
  white-space: nowrap;
}
table.y26 td.cw { white-space: normal; font-size: 12.5px; color: var(--text-sub); min-width: 120px; }
table.y26 tbody tr:nth-child(even) { background: #f7faff; }
table.y26 .foot-note td { white-space: normal; font-size: 12.5px; color: var(--text-sub); padding-top: 12px; line-height: 1.7; }
table.y26 .foot-note b { color: #b4530a; }

/* ---------------- 来源 ---------------- */
.source-box { padding: 16px 20px; }
.source-box h3 { font-size: 15.5px; color: #17233b; margin-bottom: 8px; }
.source-box li { font-size: 13.2px; color: var(--text-sub); margin: 4px 0 4px 18px; }
.source-box .decl { margin-top: 10px; font-size: 12.8px; color: #98a2b8; }

/* ---------------- 页脚 ---------------- */
.footer {
  margin-top: 30px;
  background: var(--blue-dark);
  color: #b9cdea;
  text-align: center;
  padding: 18px 14px 22px;
  font-size: 12.8px;
  line-height: 1.9;
}
.footer a { color: #dce8f8; }

/* ---------------- 移动端 ---------------- */
@media (max-width: 699px) {
  .topbar .wrap { align-items: flex-start; flex-direction: column; gap: 8px; }
  .brand { width: 100%; }
  .major-nav { width: 100%; justify-content: flex-start; }
  .major-nav > a, .major-nav .more-btn { padding: 5px 9px; font-size: 13.5px; }
  .more-panel { left: 0; right: auto; width: 100%; }
  .more-box.open .more-panel { grid-template-columns: repeat(2, 1fr); }
  .hero .wrap { padding-top: 34px; padding-bottom: 34px; }
  .intro-grid { grid-template-columns: 1fr; }
  .intro-item { padding: 15px 15px; }
  .sim-row { grid-template-columns: 1fr; gap: 3px; padding: 9px 0; }
}
