/* ==========================================================================
   产品固件二级页面 · 页面专属样式
   - 只作用于 firmware.html，不改动全站 style.css / main.js
   - 文件行与下载按钮直接复用 #materials 现有 .res-file / .res-dl 组件
     （含品牌鹅黄 #FFE58F 按钮），保证与产品资料页视觉一致
   ========================================================================== */

.firmware-page { background: var(--bg); }

/* 内容区：比全宽 container 略收，保证长文件名与右侧按钮都有余量 */
#materials.fw-main { padding: 62px 0 116px; }
#materials .fw-inner { max-width: 960px; }

/* 返回按钮：沿用现有二级页面返回按钮的字号与配色（.gd-back / .specs-back） */
.fw-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 40px;
  color: #8A7866;
  font-size: 13.5px;
  text-decoration: none;
  transition: color .2s;
}
.fw-back:hover { color: #705744; }

/* 页面标题：只有「产品固件」，不加英文副标题、不加冗长介绍 */
.fw-head { margin-bottom: 64px; }
.fw-head h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.4;
}
.fw-head h1::after {
  content: "";
  display: block;
  width: 38px;
  height: 3px;
  margin-top: 18px;
  border-radius: 2px;
  background: #FFE58F;
}

/* 三大分类：纵向排列，层级统一，靠留白分隔，不做大卡片 */
.fw-cat { margin-bottom: 76px; }
.fw-cat:last-child { margin-bottom: 0; }
.fw-cat > h2 {
  margin: 0;
  color: #3E332A;
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 650;
  line-height: 1.4;
}

/* 分类说明：轻量提示，不改变原意 */
.fw-note {
  margin: 20px 0 0;
  padding: 14px 18px;
  border-left: 3px solid #FFE58F;
  border-radius: 0 12px 12px 0;
  background: #FBF7EE;
  color: #6B5C4C;
  font-size: 14px;
  line-height: 1.8;
}
.fw-inline-note {
  margin: 4px 0;
  padding: 13px 16px;
  border-radius: 12px;
  background: #FFF9E8;
  color: #6B5738;
  font-size: 13.5px;
  line-height: 1.8;
}

/* 文件列表：长名称允许换行，日期与版本号始终完整显示 */
#materials .fw-cat > .res-filelist { margin-top: 20px; }
#materials .fw-row .res-file-name {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 历史固件版本：独立折叠入口，与当前固件列表分开 */
.fw-history { margin-top: 30px; }
.fw-history > summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  cursor: pointer;
  padding: 11px 20px;
  border: 1px solid #E8E0D5;
  border-radius: 999px;
  background: #FFFDFA;
  color: #705744;
  font-size: 14px;
  font-weight: 600;
  transition: background-color .2s, border-color .2s, color .2s;
}
.fw-history > summary::-webkit-details-marker { display: none; }
.fw-history > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s;
}
.fw-history > summary:hover { border-color: #D8C9AF; }
.fw-history[open] > summary {
  background: #FFE58F;
  border-color: #FFE58F;
  color: #3B3024;
}
.fw-history[open] > summary::after { transform: rotate(225deg) translateY(-1px); }

.fw-history-body { margin-top: 20px; }
#materials .fw-history-body .res-file { padding-top: 11px; padding-bottom: 11px; }

/* 手机端：收紧留白，长文件名换行、按钮仍靠右，不横向溢出 */
@media (max-width: 600px) {
  #materials.fw-main { padding: 38px 0 84px; }
  .fw-back { margin-bottom: 28px; }
  .fw-head { margin-bottom: 46px; }
  .fw-cat { margin-bottom: 58px; }
  .fw-cat > h2 { font-size: 22px; }
  #materials .fw-cat > .res-filelist { margin-top: 16px; }
  #materials .fw-row { gap: 10px; }
  #materials .fw-row .res-file-name { font-size: 13px; }
  .fw-note { font-size: 13px; padding: 12px 14px; }
  .fw-inline-note { font-size: 12.5px; padding: 11px 13px; }
  .fw-history > summary { font-size: 13px; padding: 10px 16px; }
}
