/* ===== 怡达快速知识平台 · 门户结构（沿用华哥知识平台视觉） ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #F5F7FA;
  color: #1A1A1A;
  line-height: 1.7;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: rgba(23, 43, 77, 0.15);
}
a { text-decoration: none; }
.chip, .cat-card, .card { -webkit-touch-callout: none; touch-action: manipulation; }

/* ===== 密码门 ===== */
.gate-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(135deg, #172B4D 0%, #2A4D80 100%);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.gate-overlay.hide { display: none; }
.gate-box {
  background: #fff; border-radius: 18px; padding: 40px 32px; max-width: 360px; width: 100%;
  text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.gate-box .gate-icon { font-size: 40px; margin-bottom: 12px; }
.gate-box h2 { font-size: 18px; font-weight: 700; color: #172B4D; margin-bottom: 4px; }
.gate-box .gate-sub { font-size: 13px; color: #7A8AA5; margin-bottom: 24px; }
.gate-box input {
  width: 100%; padding: 12px 16px; border: 2px solid #E0E5EC; border-radius: 10px;
  font-size: 16px; text-align: center; letter-spacing: 2px; outline: none;
}
.gate-box input:focus { border-color: #2A4D80; }
.gate-box button {
  width: 100%; padding: 12px; margin-top: 12px; background: #2A4D80; color: #fff;
  border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.gate-box button:hover { background: #1A3A66; }
.gate-box .gate-error { color: #e74c3c; font-size: 13px; margin-top: 10px; display: none; }
.gate-box .gate-hint { font-size: 11px; color: #B0BCCD; margin-top: 16px; }

/* ===== 顶栏 ===== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(38, 33, 92, 0.95); backdrop-filter: blur(10px);
  padding: 10px 24px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.topbar .brand { color: #fff; font-size: 15px; font-weight: 700; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.topbar .logo-img { height: 22px; width: auto; display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
.topbar .brand .dot { color: #FFD66B; }
.topbar a.back {
  color: rgba(255,255,255,0.85); font-size: 13px; padding: 5px 12px; border-radius: 6px;
  background: rgba(255,255,255,0.12); font-weight: 600; white-space: nowrap;
}
.topbar a.back:hover { background: rgba(255,255,255,0.22); }
.topbar .tb-search {
  margin-left: auto; display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.14); border-radius: 8px; padding: 5px 10px;
}
.topbar .tb-search input {
  background: transparent; border: 0; outline: none; color: #fff; font-size: 13px; width: 170px;
}
.topbar .tb-search input::placeholder { color: rgba(255,255,255,0.6); }
.topbar .tb-search kbd {
  font-size: 10px; color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px; padding: 0 4px; font-family: inherit;
}

.container { max-width: 1100px; margin: 0 auto; padding: 24px 24px 60px; }

/* ===== 首页头部 ===== */
.header {
  background: linear-gradient(135deg, #172B4D 0%, #2A4D80 100%); border-radius: 18px;
  padding: 36px 32px; color: #fff; margin-bottom: 20px; position: relative; overflow: hidden;
}
.header::after {
  content: "EPSS"; position: absolute; right: 18px; bottom: -18px;
  font-size: 96px; font-weight: 700; color: rgba(255,255,255,.08); letter-spacing: 3px;
}
.header h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; position: relative; }
.header .subtitle { font-size: 14px; opacity: 0.85; margin-bottom: 16px; position: relative; max-width: 620px; }
.header .stats { display: flex; gap: 24px; flex-wrap: wrap; position: relative; }
.header .stat .v { font-size: 20px; font-weight: 700; color: #FFD66B; }
.header .stat .l { font-size: 12px; opacity: 0.8; margin-top: 2px; }

/* ===== 场景导航 ===== */
.scenario-nav {
  background: #fff; border-radius: 14px; padding: 18px 24px;
  border: 1px solid #E0E5EC; margin-bottom: 28px;
}
.scenario-nav .title { font-size: 13px; font-weight: 700; color: #5A6A85; margin-bottom: 12px; letter-spacing: 0.5px; }
.scenario-nav .chips { display: flex; gap: 10px; flex-wrap: wrap; }
.scenario-nav .chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 600; color: inherit; cursor: pointer; transition: all 0.15s;
  pointer-events: auto;
}
.chip * { pointer-events: none; }
.chip-1 { background: #EAF3DE; color: #27500A; } .chip-1:hover { background: #d4ecc4; }
.chip-2 { background: #E6F1FB; color: #0C447C; } .chip-2:hover { background: #d4e6f5; }
.chip-3 { background: #FBEAF0; color: #993556; } .chip-3:hover { background: #f5dae4; }
.chip-4 { background: #FBEADA; color: #8B4513; } .chip-4:hover { background: #f3e2c4; }
.chip-5 { background: #E8F5EE; color: #0D4A36; } .chip-5:hover { background: #d4eddc; }
.chip-6 { background: #EEEDFE; color: #1A3A66; } .chip-6:hover { background: #D4DAE8; }

/* ===== 分区标题 ===== */
.section-title {
  font-size: 16px; font-weight: 700; color: #1a1a1a; margin: 36px 0 14px;
  padding-left: 12px; border-left: 4px solid #2A4D80;
  display: flex; align-items: center; gap: 8px;
}
.section-title .count { font-size: 12px; color: #7A8AA5; font-weight: 400; }

/* ===== 分类大卡 ===== */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.cat-grid .card {
  background: #fff; border-radius: 14px; padding: 22px 50px 18px 22px; border: 1px solid #E0E5EC;
  color: inherit; transition: all 0.2s; display: block; position: relative; overflow: hidden; cursor: pointer;
}
.cat-grid .card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(23,43,77,.12); border-color: #5C7CA0; }
.cat-grid .card .cat-icon {
  width: 52px; height: 52px; border-radius: 13px; display: inline-flex; align-items: center;
  justify-content: center; font-size: 26px; vertical-align: top; margin-right: 14px;
}
.cat-grid .card .cat-body { display: inline-block; vertical-align: top; max-width: calc(100% - 70px); }
.cat-grid .card h3 { font-size: 16px; font-weight: 700; color: #1a1a1a; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cat-grid .card .cat-count { font-size: 11px; color: #fff; padding: 2px 8px; border-radius: 8px; font-weight: 700; }
.cat-grid .card .desc { font-size: 13px; color: #5A6A85; line-height: 1.6; margin-top: 4px; }
.cat-grid .card .arrow { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 14px; color: #c8c4b8; font-weight: 700; }
.cat-grid .card:hover .arrow { color: #2A4D80; }
.cat-1 .cat-icon { background: #EAF3DE; color: #27500A; } .cat-1 .cat-count { background: #6BAF3E; }
.cat-2 .cat-icon { background: #E6F1FB; color: #0C447C; } .cat-2 .cat-count { background: #3E7CB8; }
.cat-3 .cat-icon { background: #FBEADA; color: #8B4513; } .cat-3 .cat-count { background: #C08A2E; }
.cat-4 .cat-icon { background: #EEEDFE; color: #1A3A66; } .cat-4 .cat-count { background: #7B72D4; }
.cat-5 .cat-icon { background: #E8F5EE; color: #0D4A36; } .cat-5 .cat-count { background: #2E9E78; }
.cat-6 .cat-icon { background: #FBEAF0; color: #993556; } .cat-6 .cat-count { background: #C46A8A; }

/* ===== 分类页 ===== */
.page-head {
  background: linear-gradient(135deg, #172B4D 0%, #2A4D80 100%); border-radius: 18px;
  padding: 26px 32px; color: #fff; margin-bottom: 24px;
}
.page-head h1 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.page-head .subtitle { font-size: 13px; opacity: 0.85; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 8px; }
.card {
  background: #fff; border-radius: 12px; padding: 20px 20px 16px; border: 1px solid #E0E5EC;
  color: inherit; transition: all 0.2s; display: block; position: relative; cursor: pointer;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(23,43,77,.12); border-color: #5C7CA0; }
.card .card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.card .icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.icon-1 { background: #EAF3DE; color: #27500A; }
.icon-2 { background: #E6F1FB; color: #0C447C; }
.icon-3 { background: #FBEAF0; color: #993556; }
.icon-4 { background: #FBEADA; color: #8B4513; }
.icon-5 { background: #EEEDFE; color: #1A3A66; }
.icon-6 { background: #E8F5EE; color: #0D4A36; }
.card .ver { font-size: 11px; color: #7A8AA5; background: #F5F7FA; padding: 3px 8px; border-radius: 6px; }
.card h3 { font-size: 15px; font-weight: 700; color: #1a1a1a; margin-bottom: 6px; }
.card .desc { font-size: 13px; color: #5A6A85; line-height: 1.6; margin-bottom: 10px; }
.card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.card .tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 6px; font-weight: 600; white-space: nowrap; }
.tag-green { background: #EAF3DE; color: #27500A; }
.tag-blue { background: #E6F1FB; color: #0C447C; }
.tag-orange { background: #FBEADA; color: #8B4513; }
.tag-purple { background: #EEEDFE; color: #1A3A66; }
.tag-pink { background: #FBEAF0; color: #993556; }
.tag-grey { background: #f1f0ec; color: #5A6A85; }

/* ===== 资料页 ===== */
.doc-head {
  background: #fff; border: 1px solid #E0E5EC; border-radius: 14px;
  padding: 20px 24px; margin-bottom: 14px;
}
.doc-head .crumb { font-size: 12px; color: #7A8AA5; margin-bottom: 6px; }
.doc-head .crumb b { color: #2A4D80; }
.doc-head h1 { font-size: 21px; font-weight: 700; color: #1a1a1a; }
.doc-head .sub { font-size: 13px; color: #5A6A85; margin-top: 4px; }
.doc-head .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.doc-head .meta .tag { font-size: 11px; padding: 2px 8px; border-radius: 6px; font-weight: 600; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tbtn {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; font-size: 12.5px;
  border: 1px solid #E0E5EC; background: #fff; border-radius: 8px; cursor: pointer; color: #555;
}
.tbtn:hover { border-color: #2A4D80; color: #1A3A66; background: #F0F4FA; }

.stage-wrap {
  background: #fff; border: 1px solid #E0E5EC; border-radius: 14px; overflow: hidden;
}
.page-stage { display: block; min-height: 300px; }

.doc-foot { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.doc-foot a {
  flex: 1; min-width: 200px; background: #fff; border: 1px solid #E0E5EC; border-radius: 12px;
  padding: 12px 16px; color: #1A1A1A; font-size: 13.5px; transition: all .15s;
}
.doc-foot a:hover { border-color: #5C7CA0; transform: translateY(-2px); }
.doc-foot a .lab { font-size: 11.5px; color: #7A8AA5; }
.doc-foot a .tt { font-weight: 600; margin-top: 2px; }

/* ===== 配置表 ===== */
.spec-top { margin-top: 12px; }
.spec-top .fact-grid { margin-top: 0; }
.table-scroll { overflow: auto; max-height: 75vh; margin-top: 14px; -webkit-overflow-scrolling: touch; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
.spec-table th {
  background: #F0F4FA; color: #172B4D; font-weight: 700; text-align: left;
  padding: 9px 10px; border-bottom: 2px solid #E0E5EC; white-space: nowrap;
  position: sticky; top: 0; z-index: 2;
}
.spec-table td { padding: 8px 10px; border-bottom: 1px solid #EFF2F7; vertical-align: top; line-height: 1.6; }
.spec-table tr:hover td { background: #FAFBFD; }
.spec-table tr:hover td.mod { background: #F0F4FA; }
.spec-table td.mod {
  font-weight: 700; color: #172B4D; background: #F7F9FC; border-right: 1px solid #EFF2F7;
  white-space: nowrap; position: sticky; left: 0; z-index: 1;
  vertical-align: middle; text-align: center;
}
.spec-table td.mod .sub { display: block; font-size: 11px; font-weight: 400; color: #7A8AA5; margin-top: 2px; }
.spec-table td.mdl { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12px; color: #2A4D80; }
.spec-table td.ct { white-space: nowrap; color: #5A6A85; }
.spec-table td.note { color: #7A8AA5; font-size: 12px; }
.spec-table.cmp-table { min-width: 560px; }
.spec-table.cmp-table td.mod { white-space: normal; min-width: 92px; }
.spec-table td.note .grp-tag {
  display: inline-block; background: #E8EDF5; color: #2A4D80;
  padding: 1px 6px; border-radius: 4px; font-weight: 700;
}
.spec-src { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #E0E5EC; font-size: 11.5px; color: #7A8AA5; }

/* ===== 首页速查模块（内容区） ===== */
.kb-block { background: #fff; border: 1px solid #E0E5EC; border-radius: 14px; padding: 22px 24px; margin-bottom: 14px; }
.kb-block h2 { font-size: 16px; font-weight: 700; color: #1a1a1a; display: flex; align-items: center; gap: 8px; }
.kb-block h2 .hint { font-size: 12px; color: #7A8AA5; font-weight: 400; }
.fact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 14px; }
.fact { background: #F7F9FC; border: 1px solid #EFF2F7; border-radius: 10px; padding: 10px 12px; }
.fact .k { font-size: 11.5px; color: #7A8AA5; }
.fact .v { font-size: 14.5px; font-weight: 700; color: #172B4D; margin-top: 2px; }

.sell-list { display: grid; gap: 8px; margin-top: 14px; }
.sell { display: flex; gap: 12px; align-items: flex-start; background: #F7F9FC; border: 1px solid #EFF2F7; border-radius: 10px; padding: 10px 14px; }
.sell .no {
  font-size: 12px; font-weight: 700; color: #fff; background: #2A4D80; border-radius: 7px;
  width: 24px; height: 24px; flex: none; display: flex; align-items: center; justify-content: center;
}
.sell .st { font-size: 13.5px; font-weight: 700; }
.sell .sd { font-size: 12.5px; color: #5A6A85; line-height: 1.6; }

.callout {
  background: #FFF9EC; border: 1px solid #F3E3BE; border-left: 4px solid #C08A2E;
  border-radius: 10px; padding: 13px 16px; margin-top: 14px;
}
.callout .ct { font-size: 12.5px; font-weight: 700; color: #8B4513; }
.callout .cd { font-size: 13.5px; color: #6b5228; line-height: 1.75; margin-top: 3px; }
.callout .cd b { color: #7a4f13; }

.rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin-top: 14px; }
.rule { background: #F7F9FC; border: 1px solid #EFF2F7; border-radius: 10px; padding: 11px 13px; }
.rule b { display: block; font-size: 13px; color: #172B4D; margin-bottom: 3px; }
.rule span { font-size: 12.5px; color: #5A6A85; line-height: 1.65; }

.footer { text-align: center; padding: 32px 0 0; font-size: 13px; color: #7A8AA5; }
.footer strong { color: #2A4D80; }

/* ===== 搜索弹层 ===== */
.search-modal {
  position: fixed; inset: 0; z-index: 200; background: rgba(20, 28, 38, .4);
  display: none; padding: 8vh 20px 20px; backdrop-filter: blur(2px);
}
.search-modal.open { display: block; }
.sm-box { max-width: 660px; margin: 0 auto; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 30px 70px rgba(0,0,0,.3); }
.sm-box input { width: 100%; padding: 16px 18px; border: 0; border-bottom: 1px solid #eee; font-size: 16px; outline: none; font-family: inherit; }
.sm-list { max-height: 56vh; overflow-y: auto; padding: 8px; }
.sm-item { padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.sm-item:hover, .sm-item.sel { background: #E8EDF5; }
.sm-item .h { font-size: 13.5px; font-weight: 700; color: #1a1a1a; }
.sm-item .h span { font-size: 11px; color: #7A8AA5; font-weight: 400; margin-left: 6px; }
.sm-item .c { font-size: 12.5px; color: #5A6A85; margin-top: 2px; line-height: 1.6; }
.sm-item .c em { color: #c0392b; font-style: normal; background: #fdeceb; border-radius: 3px; padding: 0 2px; }
.sm-empty { padding: 30px; text-align: center; color: #7A8AA5; font-size: 13px; }
.sm-foot { padding: 8px 14px; border-top: 1px solid #f2f1ee; font-size: 11.5px; color: #7A8AA5; }

/* ===== 搜索命中高亮 ===== */
.kb-hit { animation: kbFlash 2.2s ease-out 1; border-radius: 4px; }
@keyframes kbFlash {
  0% { background: #FFE9A8; box-shadow: 0 0 0 6px #FFE9A8; }
  100% { background: transparent; box-shadow: 0 0 0 6px transparent; }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .container { padding: 16px 14px 40px; }
  .header { padding: 24px 20px; border-radius: 14px; }
  .header h1 { font-size: 17px; line-height: 1.4; margin-bottom: 6px; }
  .header .subtitle { font-size: 12px; line-height: 1.5; margin-bottom: 16px; }
  .header .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 8px; }
  .header .stat .v { font-size: 17px; }
  .header .stat .l { font-size: 11px; }
  .header::after { font-size: 62px; right: 6px; bottom: -10px; }
  .topbar { padding: 8px 14px; gap: 8px; }
  .topbar .brand { font-size: 13px; }
  .topbar .tb-search { width: 100%; order: 3; margin-left: 0; }
  .topbar .tb-search input { width: 100%; }
  .topbar .tb-search kbd { display: none; }
  .section-title { font-size: 15px; margin: 28px 0 12px; }
  .scenario-nav { padding: 14px 16px; }
  .scenario-nav .chips { gap: 8px; }
  .scenario-nav .chip { font-size: 12px; padding: 7px 12px; }
  .cat-grid { grid-template-columns: 1fr; gap: 12px; }
  .cat-grid .card { padding: 18px 44px 16px 16px; }
  .cat-grid .card .cat-icon { width: 46px; height: 46px; font-size: 22px; }
  .cat-grid .card h3 { font-size: 15px; }
  .cat-grid .card .desc { font-size: 12px; }
  .page-head { padding: 20px 18px; border-radius: 14px; }
  .page-head h1 { font-size: 17px; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .card { padding: 16px 16px 14px; }
  .doc-head { padding: 16px 16px; }
  .doc-head h1 { font-size: 18px; }
  .kb-block { padding: 16px 16px; }
}

/* ===== 打印 ===== */
@media print {
  .topbar, .search-modal, .toolbar, .doc-foot, .scenario-nav, .cat-grid, .section-title, .header { display: none !important; }
  .container { padding: 0; max-width: none; }
  .stage-wrap { border: 0; }
  body { background: #fff; }
}
