/* © qiqicto.com 其其网ICT工具箱 · 未经许可禁止复制分发 */
@charset "UTF-8";
/* ============================================================================
   其其网ICT工具箱 · 顶部导航样式   header.css
   ----------------------------------------------------------------------------
   用途      : 工具站顶部导航（桌面下拉 + 移动抽屉 + 站内搜索框）
   图标依赖  : Font Awesome 4.7（自托管，类名形如 .fa.fa-home）
   适用      : 不依赖任何前端框架，纯 CSS
   ----------------------------------------------------------------------------
   实现说明：
     1) 下拉箭头为纯 CSS 三角，不引入图标字体的私有字形。
     2) .navbar-search-* 的定位上下文是 header.header。
     3) 移动端二级菜单：点击展开的手风琴，展开态类名统一为 .open。
     4) 导航项内边距分两档（1200-1239px / 992-1199px），992-1055px 再收紧一档，
        避免「选型对比」等长词条折成两行。.nav > li > a 自带 white-space:nowrap。
     5) 桌面端下拉面板宽 754px；靠右分类在窄视口会越出视口右缘，
        打开时由脚本即时左移贴边；宽视口零位移。
     6) 下拉面板条目禁止折行（.dropdown-menu > li > a），面板随内容自适应加宽。
   ----------------------------------------------------------------------------
   配色：主题青 #06B8D8；悬停 #05A3C0。
   ============================================================================ */

/* ---------- 1. 设计变量 ---------- */
:root {
  /* 品牌色 */
  --theme-color: #06B8D8;          /* 主题色：青 */
  --action-color: #58ABDF;         /* 动作色 */
  --theme-hover: #05A3C0;          /* 青色系悬停色 */

  /* 中性色阶梯：由 --theme-color-h/s/l 推导 */
  --theme-color-h: 0;
  --theme-color-s: 0%;
  --theme-color-l: 10%;
  --theme-color-hsl: var(--theme-color-h), var(--theme-color-s), var(--theme-color-l);
  --theme-black-color: hsl(var(--theme-color-hsl));        /* hsl(0,0%,10%) = #1a1a1a */
  --theme-gray-color: hsla(var(--theme-color-hsl), .8);
  --theme-light-color: hsla(var(--theme-color-hsl), .6);
  --theme-line-color: hsla(var(--theme-color-hsl), .07);
  --theme-border-color: hsla(var(--theme-color-hsl), .2);

  /* 头部 */
  --theme-el-bg-color: #fff;
  --header-bg-color: var(--theme-el-bg-color);
  --logo-height: 39px;             /* 桌面端 Logo 高度 */
  --logo-height-mobile: 36px;      /* 移动端 Logo 高度 */
  --menu-item-gap: 43px;           /* 菜单项间距 */
  --header-font-size: 16px;
  --header-height: 64px;

  /* 圆角阶梯 */
  --theme-border-radius-s: 3px;
  --theme-border-radius-m: 5px;
  --theme-border-radius-l: 8px;
  --theme-border-radius-xl: 12px;

  /* 移动端抽屉 */
  --mobile-menu-color: var(--theme-black-color);
  --mobile-menu-active-color: var(--theme-color);
  --mobile-menu-bg-color: var(--theme-el-bg-color);
  --mobile-menu-width: 80%;

  /* 字体 */
  --theme-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;

  /* 站点容器 */
  --container-width: 1200px;
}

/* ---------- 2. 头部骨架 ---------- */
header.header {
  background-color: var(--header-bg-color);
  border: 0;
  box-shadow: 0 0 3px 1px hsla(var(--theme-color-hsl), .06);
  font-family: var(--theme-font-family);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 999;
  -webkit-text-size-adjust: 100%;
}

header.header *,
header.header *::before,
header.header *::after { box-sizing: border-box; }

header.header > .container {
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  width: 100%;
}

header.header.header-fluid > .container {
  padding-left: 3.2em;
  padding-right: 3.2em;
}

header.header a { text-decoration: none; }

/* ---------- 3. 品牌区 ---------- */
header.header .navbar-header {
  align-items: center;
  display: flex;
  float: none;
  height: var(--header-height);
  justify-content: space-between;
  margin: 0;
}

header.header .logo {
  align-items: center;
  display: flex;
  font-size: 20px;
  height: var(--header-height);
  line-height: 1;
  margin: 0;
  padding: 0;
  transition: all .3s ease-out 0s;
}

header.header .logo > a { display: block; }

header.header .logo img {
  display: block;
  height: min(var(--logo-height), 50px);
  max-width: fit-content;
  transition: all .3s ease-out 0s;
  width: auto;
}

/* 汉堡按钮：桌面隐藏 */
header.header .navbar-toggle {
  background-color: transparent;
  background-image: none;
  border: 1px solid transparent;
  border-radius: var(--theme-border-radius-m);
  cursor: pointer;
  display: none;
  padding: 9px 10px;
  position: relative;
}
header.header .navbar-toggle:focus { outline: 0; }
header.header .navbar-toggle .icon-bar {
  border-radius: 1px;
  display: block;
  height: 2px;
  transition: all .3s ease-out .3s;
  width: 20px;
}
header.header .navbar-toggle .icon-bar + .icon-bar { margin-top: 5px; }

/* ---------- 4. 主导航（桌面） ---------- */
header.header .navbar-collapse {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-left: 2.5em;
  padding-left: 0;
  width: 100%;
}

header.header .primary-menu { flex-grow: 1; }

header.header .nav {
  align-items: center;
  display: flex;
  font-size: 14px;
  list-style: none;
  margin: 0;
  padding-left: 0;
}

header.header .nav > li {
  --menu-item-padding: calc(var(--menu-item-gap) / 2);
  position: relative;
}

header.header .nav > li > a {
  background: none;
  color: var(--theme-black-color);
  display: block;
  line-height: var(--header-height);
  padding: 0 var(--menu-item-padding);
  position: relative;
  transition: color .2s;
  white-space: nowrap;   /* 避免长词条折行 */
}

header.header .nav > li > a:hover { background: none; color: var(--theme-hover); }
header.header .nav > li.active > a { color: var(--theme-color); }
header.header .nav > li.dropdown > a { padding-right: calc(var(--menu-item-padding) + 1em); }

/* 下拉箭头（纯 CSS 三角） */
header.header .navbar-nav > .dropdown > a::after {
  border: 4px solid transparent;
  border-top-color: currentColor;
  content: "";
  display: inline-block;
  height: 0;
  margin-left: .35em;
  opacity: .65;
  transition: transform .3s;
  vertical-align: .12em;
  width: 0;
}
header.header .navbar-nav > .dropdown:hover > a::after { transform: rotate(-180deg); }

/* 菜单项图标 */
header.header .nav-menu { --menu-margin-left: 3.2em; position: relative; }
header.header .nav-menu .menu-item-icon {
  font-size: inherit;
  line-height: inherit;
  margin-right: 3px;
  vertical-align: top;
}

/* 角标（如“新”） */
header.header .nav > li.adv-style-flag { position: relative; }
header.header .nav > li.adv-style-flag .menu-item-flag {
  background: var(--theme-color);
  border-radius: var(--theme-border-radius-m);
  border-bottom-left-radius: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  left: 100%;
  line-height: 1;
  padding: 3px 6px;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(calc(-1.3em - var(--menu-item-padding)), -26px) scale(.9);
  user-select: none;
  white-space: nowrap;
  -webkit-user-select: none;
}

/* ---------- 5. 下拉面板 ---------- */
header.header .dropdown-menu {
  background-color: var(--theme-el-bg-color);
  border: 0;
  box-shadow: 0 8px 28px hsla(var(--theme-color-hsl), .13);
  display: block;
  left: 0;
  list-style: none;
  margin: 0;
  min-width: 190px;
  opacity: 0;
  padding: 12px;
  position: absolute;
  top: 100%;
  transform: scaleY(0);
  transform-origin: 0 0;
  transition: transform .3s, opacity .1s .2s, visibility .1s .3s;
  visibility: hidden;
  z-index: 1002;
  backface-visibility: hidden;
  border-radius: var(--theme-border-radius-l);
}

/* JS 挂上 .menu-ready 后才启用 hover 动画（渐进增强） */
header.header .nav-menu.menu-ready > .dropdown:hover > .dropdown-menu {
  opacity: 1;
  transform: scaleY(1);
  transition: transform .3s, opacity .1s;
  visibility: visible;
}

header.header .dropdown-menu > li > a {
  color: var(--theme-black-color);
  display: block;
  padding: 9px 15px;
  white-space: nowrap;   /* 本站偏离 6：长工具名不得折行（否则「…对比器」断成两行）；面板随内容加宽 */
}

header.header .dropdown-menu > li > a:hover {
  background-color: hsla(var(--theme-color-hsl), .06);
  border-radius: var(--theme-border-radius-m);
  color: var(--theme-hover);
  outline: 0;
}

/* 二级飞出（如 基础技术 → 系统及软件 → Linux） */
header.header .nav-menu > .dropdown > .dropdown-menu > .dropdown > .dropdown-menu {
  left: 100%;
  top: 0;
}
header.header .nav-menu > .dropdown > .dropdown-menu > .dropdown:hover > .dropdown-menu {
  opacity: 1;
  transform: scaleY(1);
  transition: transform .3s, opacity .1s;
  visibility: visible;
}

/* ---------- 6. Mega 面板（多列） ---------- */
header.header .nav-menu > .dropdown.menu-item-style > .dropdown-menu {
  border-radius: var(--theme-border-radius-xl);
  max-width: none;
}
header.header .nav-menu > .dropdown.menu-item-style .dropdown { display: inline-block; }
header.header .nav-menu > .dropdown.menu-item-style > .dropdown-menu .dropdown-menu {
  max-width: none;
  opacity: 1;
  position: static;
  transform: scaleY(1);
  visibility: visible;
  width: 100%;
}

header.header .nav-menu > .menu-item-style > .menu-item-wrap { padding: 20px 32px; }

header.header .nav-menu > .menu-item-style > .menu-item-wrap > li {
  display: inline-block;
  text-align: left;
  vertical-align: top;
  width: 210px;
}

header.header .nav-menu > .menu-item-style > .menu-item-wrap > li > a {
  align-items: center;
  color: var(--theme-black-color);
  display: flex;
  font-size: var(--header-font-size);
  font-weight: 600;
  margin: 0;
  padding: 9px 0;
  width: 100%;
}
header.header .nav-menu > .menu-item-style > .menu-item-wrap > li > a:hover {
  background: none;
  color: var(--theme-hover);
}

header.header .nav-menu > .menu-item-style > .menu-item-wrap .dropdown-menu {
  background: none;
  border: 0;
  box-shadow: none;
  display: block;
  float: none;
  list-style: none;
  margin: 0;
  opacity: 1;
  padding: 0;
  position: relative;
  transform: none;
  visibility: visible;
  width: auto;
}

header.header .nav-menu > .menu-item-style > .menu-item-wrap .dropdown-menu li a {
  color: var(--theme-light-color);
  display: block;
  line-height: 1.5;
  padding: 9px 0;
}
header.header .nav-menu > .menu-item-style > .menu-item-wrap .dropdown-menu li a:hover {
  background: none;
  color: var(--theme-hover);
}

/* 列宽：本站全局为 border-box，按 content-box 口径换算成渲染值，
   即「列宽 210px + 左右各 32px 内边距」才是面板实宽。
   桌面端面板是 flex + gap 20px 30px（见下方 ≥992px 断点），故一行 N 列的实宽是
   N×210 + (N-1)×30 + 64，即 274 / 514 / 754 / 994。
   宽度必须由列数决定（渲染层按分组数给出 menu-item-col-N）：
     · 写死一个宽度 → 列少时右侧留一大块空白；列多时最后一列折到第二排。
     · 曾固定 754px（三列的宽度）用在四分组分类上 → 「口令与账号」整列折到第二排。
   超宽面板由 header.js 的 clampPanel() 在打开瞬间贴边左移，不越出视口。 */
header.header .nav-menu > .menu-item-style .menu-item-col-1 { width: 274px; }
header.header .nav-menu > .menu-item-style .menu-item-col-2 { width: 514px; }
header.header .nav-menu > .menu-item-style .menu-item-col-3 { width: 754px; }
header.header .nav-menu > .menu-item-style .menu-item-col-4 { width: 994px; }

/* 未上线项（工具站特有：「规划中」标记，避免死链） */
header.header .menu-item-planned > a { opacity: .55; }
header.header .menu-item-planned > a::before { content: none; }
header.header .menu-item-tag-planned {
  background: hsla(var(--theme-color-hsl), .08);
  border-radius: var(--theme-border-radius-s);
  color: var(--theme-light-color);
  font-size: 11px;
  line-height: 1;
  margin-left: 4px;
  padding: 2px 4px;
  vertical-align: .08em;
  white-space: nowrap;
}

/* ---------- 7. 右侧动作区 ---------- */
header.header .navbar-action {
  align-items: center;
  display: flex;
  gap: 16px;
  height: 26px;
  white-space: nowrap;
}

header.header .navbar-search-icon {
  color: var(--theme-gray-color);
  cursor: pointer;
  display: inline-block;
  text-align: center;
  vertical-align: top;
}
header.header .navbar-search-icon .fa {
  display: inline-block;
  font-size: 18px;
  line-height: 26px;
  width: 22px;
}
header.header .navbar-search-icon:hover { color: var(--theme-hover); }

header.header .navbar-search {
  display: none;
  left: 0;
  position: absolute;
  right: 0;
  top: 19px;
  z-index: 1;
}
header.header .navbar-search-inner { margin: 0 auto; position: relative; width: 360px; }
header.header .navbar-search-input {
  background: none;
  border: 0;
  border-left: 1px solid var(--theme-black-color);
  border-radius: 0;
  color: var(--theme-black-color);
  display: inline-block;
  font-family: inherit;
  font-size: 14px;
  height: 16px;
  line-height: 16px;
  margin-left: 8px;
  margin-top: 5px;
  outline: 0;
  padding: 0 7px 0 15px;
  vertical-align: top;
  width: 280px;
}
header.header .navbar-search-input::placeholder { color: var(--theme-gray-color); }
header.header .navbar-search-close,
header.header .navbar-search-btn {
  background: none;
  border: 0;
  color: var(--theme-gray-color);
  cursor: pointer;
  display: inline-block;
  font-size: 18px;
  line-height: 26px;
  outline: 0;
  padding: 0;
  text-align: center;
  vertical-align: top;
}
header.header .navbar-search-close { width: 26px; }
header.header .navbar-search-close:hover,
header.header .navbar-search-btn:hover { color: var(--theme-hover); }

/* 搜索态：展开输入条、隐去主菜单 */
header.header.is-search .navbar-search { display: block; }
header.header.is-search .navbar-search-icon { display: none; }
header.header.is-search .primary-menu { display: none; }
header.header.is-search .navbar-collapse { justify-content: flex-end; }

/* ---------- 8. 断点：≥992px 桌面专属 ---------- */
@media (min-width: 992px) {
  header.header .nav-menu > .menu-item-style > .menu-item-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 30px;
  }
  header.header .nav-menu > .menu-item-style > .menu-item-wrap .dropdown-menu li a { padding: 9px 0; }
}

/* ---------- 9. 断点：≤1299px / ≤1199px 收紧间距 ---------- */
@media (max-width: 1299px) {
  header.header.header-fluid > .container { padding-left: 2em; padding-right: 2em; }
  header.header .navbar-collapse { margin-left: 1.8em; }
}
@media (max-width: 1199px) {
  header.header.header-fluid > .container { padding-left: 1.5em; padding-right: 1.5em; }
  header.header .navbar-collapse { margin-left: 1.6em; }
}
@media (min-width: 1200px) and (max-width: 1239px) {
  header.header .nav > li { --menu-item-padding: calc(var(--menu-item-gap) / 2 * .8); }
}
@media (min-width: 992px) and (max-width: 1199px) {
  header.header .nav > li { --menu-item-padding: calc(var(--menu-item-gap) / 2 * .6); }
}

/* 992-1055px：导航 6 项、词条更长，再收一档，保证任意桌面宽度下导航都单行显示 */
@media (min-width: 992px) and (max-width: 1055px) {
  header.header .nav > li { --menu-item-padding: calc(var(--menu-item-gap) / 2 * .4); }
}

/* ---------- 10. 断点：≤991px 移动端抽屉 ---------- */
@media (max-width: 991px) {
  header.header .navbar-header {
    align-items: center;
    display: flex;
    float: none;
    height: var(--header-height);
    justify-content: space-between;
    margin: 0;
    width: 100%;
    position: relative;
    z-index: 2;
  }
  header.header .navbar-toggle { display: block; margin: 0; order: 1; transition: all .3s ease-out 0s; }
  header.header .navbar-toggle .icon-bar { background: var(--theme-gray-color); }
  header.header .logo { height: auto; }
  header.header .logo > a { display: block; }

  /* 抽屉本体：固定面板「自己」从视口左外侧滑入（只位移抽屉，不位移 body）。
     说明：整页推屏（body 整体 translateX）在部分 Chromium 内核下，
     「position:fixed 元素挂在被 transform 的 body 内」会整个抽屉不参与绘制 ——
     点开后只剩一片空白。
     现改为：抽屉自身 left 位移（收起 -80%，展开 0），效果等价、无整页副作用。 */
  header.header .navbar-collapse {
    background: var(--mobile-menu-bg-color);
    border: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100% !important;
    left: calc(-1 * var(--mobile-menu-width));   /* 收起：整体停在视口左外侧 */
    margin: 0;
    opacity: 0;
    overflow-y: auto;
    padding: 0;
    position: fixed;
    right: auto;
    top: 0;
    transition: left .3s ease, opacity .3s ease, visibility 0s linear .3s;
    visibility: hidden;               /* 收起时不进 Tab 顺序、不给读屏器读到 */
    width: var(--mobile-menu-width) !important;
    z-index: 998;
  }
  header.header .navbar-collapse::before {
    background: var(--mobile-menu-bg-color);
    content: "";
    display: block;
    filter: drop-shadow(hsla(var(--theme-color-hsl), .06) 0 1px 1px);
    flex-shrink: 0;
    height: 50px;
    width: 100%;
  }

  header.header .primary-menu { flex-grow: 1; min-height: 100px; overflow-y: auto; width: 100%; }
  header.header .nav { display: block; font-size: 16px; width: 100%; }
  header.header .nav > li { display: block !important; margin: 0; --menu-item-padding: 0; width: 100% !important; }
  header.header .nav > li > a {
    border-bottom: 1px solid hsla(var(--theme-color-hsl), .04);
    color: var(--mobile-menu-color);
    display: block;
    line-height: 24px !important;
    padding: 15px 20px;
    white-space: normal;
  }
  header.header .nav > li > a:hover { background: hsla(var(--theme-color-hsl), .04); color: var(--mobile-menu-active-color); }
  header.header .nav > li.active > a { background: hsla(var(--theme-color-hsl), .06); color: var(--mobile-menu-active-color); }
  header.header .navbar-nav > .dropdown > a::after { border-width: 5px; }
  header.header .navbar-nav > .dropdown.open > a::after { transform: rotate(-180deg); }

  /* 二级/三级统一收成手风琴 */
  header.header .nav-menu li { display: block !important; position: static; width: 100% !important; }
  header.header .nav-menu > .dropdown > .dropdown-menu,
  header.header .nav-menu > .menu-item-style > .menu-item-wrap {
    background: var(--mobile-menu-bg-color);
    border-radius: 0;
    box-shadow: none;
    display: none;
    max-width: none;
    opacity: 1;
    padding: 0 0 0 12px;
    position: static;
    transform: none;
    visibility: visible;
    width: 100% !important;
  }
  header.header .nav-menu > .dropdown.open > .dropdown-menu,
  header.header .nav-menu > .menu-item-style.open > .menu-item-wrap { display: block; }

  header.header .nav-menu > .menu-item-style > .menu-item-wrap > li { display: block; width: 100%; }
  header.header .nav-menu > .menu-item-style > .menu-item-wrap > li > a {
    border-bottom: 0;
    color: var(--mobile-menu-color);
    font-size: 15px;
    font-weight: 600;
    padding: 14px 20px 8px;
  }
  header.header .nav-menu > .menu-item-style > .menu-item-wrap .dropdown-menu li a {
    padding: 12px 20px;
    color: var(--mobile-menu-color);
  }
  header.header .nav-menu > .menu-item-style > .menu-item-wrap .dropdown-menu li a:hover {
    background: hsla(var(--theme-color-hsl), .04);
    color: var(--mobile-menu-active-color);
  }
  header.header .menu-item-tag-planned { font-size: 10px; }

  /* 移动端搜索常驻抽屉里，桌面那套 is-search 态在此不生效 */
  header.header.is-search .primary-menu { display: block; }
  header.header.is-search .navbar-collapse { justify-content: flex-start; }

  /* 抽屉里的搜索（动作区横向变纵向） */
  header.header .navbar-action {
    flex-direction: column;
    flex-shrink: 0;
    gap: 8px;
    height: min-content;
    margin: 0;
    padding: 20px 0;
    width: 100%;
  }
  header.header .navbar-search-icon { display: none !important; }
  header.header .navbar-search {
    background: none;
    border: 0;
    display: block;
    left: auto;
    padding: 0 20px;
    position: static;
    top: auto;
    width: 100%;
  }
  header.header .navbar-search-inner { position: relative; width: 100%; }
  header.header .navbar-search-input {
    background: var(--theme-el-bg-color);
    border: 1px solid var(--theme-border-color);
    border-radius: var(--theme-border-radius-m);
    color: var(--theme-black-color);
    font-size: 16px;
    height: auto;
    line-height: 26px;
    margin: 0;
    padding: 8px 40px 8px 16px;
    width: 100%;
  }
  header.header .navbar-search-close { display: none !important; }
  header.header .navbar-search-btn {
    line-height: 42px;
    padding: 0 12px;
    position: absolute;
    right: 0;
    top: 0;
  }
}

@media (max-width: 767px) {
  header.header .logo img { height: min(var(--logo-height-mobile), 40px); }
  header.header .navbar-header { height: 50px; }
}

/* ---------- 11. 抽屉开启态（挂在 <body> 上） ---------- */
/* 只锁背景滚动；不再整页 translateX 推出（原因见第 10 节抽屉本体的说明） */
body.navbar-on { overflow: hidden; }
body.navbar-on .navbar-on-shadow {
  background: rgba(0, 0, 0, .3);
  cursor: pointer;
  display: block;
  height: 100%;
  left: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 990;                    /* 低于抽屉（998）与页头（999），高于正文 */
}
.navbar-on-shadow { cursor: pointer; display: none; }

body.navbar-on header.header .icon-bar { background: var(--mobile-menu-color) !important; }
body.navbar-on header.header .icon-bar-1 { margin-bottom: 0; transform: rotate(-45deg) translate(-5px, 5px); }
body.navbar-on header.header .icon-bar-2 { opacity: 0; }
body.navbar-on header.header .icon-bar-3 { transform: rotate(45deg) translate(-5px, -5px); }
body.navbar-on header.header .navbar-toggle {
  background: none !important;
  border: 0 !important;
  left: calc(var(--mobile-menu-width) - 50px);   /* 展开后停在抽屉右上角 */
  margin: 8px 0;
  position: fixed;
  right: auto;
  top: 0;
  transition: all .3s ease-out 0s;
  z-index: 1000;
}
body.navbar-on header.header .navbar-collapse {
  left: 0;
  opacity: 1;
  transition: left .1s ease, opacity .1s ease, visibility 0s;
  visibility: visible;
}

/* ---------- 12. 无障碍与降级 ---------- */
header.header .nav > li > a:focus-visible,
header.header .dropdown-menu > li > a:focus-visible {
  outline: 2px solid var(--theme-color);
  outline-offset: -2px;
}
@media (prefers-reduced-motion: reduce) {
  header.header *,
  body.navbar-on { transition-duration: .01ms !important; }
}
/* 无 Font Awesome 时，图标退化为不可见但不撑破布局 */
header.header .fa::before { display: inline-block; min-width: 1px; }
