/* 光学知识与下载 — 共享样式（downloads.html + software-download.html） */

.dl-main { padding: 40px 0 96px; }

/* 顶部标签页（跨页导航，外观与原先 JS 标签一致） */
.page-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 40px;
  border-bottom: 2px solid var(--border);
}
.page-tab {
  padding: 14px 36px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: inline-block;
}
.page-tab:hover { color: var(--primary); }
.page-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* 光学知识 */
.know-section { margin-bottom: 56px; }
.know-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--primary);
}
.know-section-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.know-section-title {
  font-size: 1.3rem; font-weight: 800; color: var(--text);
}

.know-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 20px;
  transition: all var(--transition);
}
.know-card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(37,99,235,0.3);
}
.know-card h3 {
  font-size: 1.1rem; font-weight: 700;
  color: var(--primary); margin-bottom: 14px;
  cursor: pointer; display: flex; align-items: center; gap: 8px;
}
.know-card h3::before {
  content: ''; display: inline-block;
  width: 4px; height: 18px;
  background: var(--primary); border-radius: 2px; flex-shrink: 0;
}
.know-card p, .know-card li {
  font-size: 0.93rem; line-height: 1.85;
  color: var(--text-secondary); text-align: justify;
}
.know-card p { margin-bottom: 12px; }
.know-card p:last-child { margin-bottom: 0; }
.know-card ul, .know-card ol {
  margin: 8px 0 12px 20px;
}
.know-card li { margin-bottom: 4px; }
.know-card strong { color: var(--text); }
.know-card h4 {
  font-size: 0.98rem; font-weight: 700;
  color: var(--text); margin: 18px 0 8px;
}
.know-card h4:first-of-type { margin-top: 4px; }

/* 知识条目配图 */
.know-card-fig {
  margin: 0 0 20px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}
.know-card-fig img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  display: block;
  background: #fff;
}
.know-card-fig figcaption {
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
  border-top: 1px solid var(--border);
}

/* 软件下载 */
.dl-notice {
  background: var(--primary-bg);
  border: 1px solid rgba(37,99,235,0.22);
  border-radius: var(--radius);
  padding: 16px 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 48px;
}
.dl-notice-icon { font-size: 1.2rem; flex-shrink: 0; }
.dl-section { margin-bottom: 56px; }
.dl-section-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px; padding-bottom: 14px;
  border-bottom: 2px solid var(--primary);
}
.dl-section-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.dl-section-title { font-size: 1.3rem; font-weight: 800; color: var(--text); }
.dl-section-count {
  margin-left: auto; font-size: 0.82rem; color: var(--text-muted);
  background: var(--surface-alt); border-radius: 20px;
  padding: 3px 12px; border: 1px solid var(--border);
}
.dl-table-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
}
.dl-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.dl-table thead tr { background: var(--surface-alt); }
.dl-table th {
  padding: 13px 18px; text-align: left; font-size: 0.8rem;
  font-weight: 700; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.5px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.dl-table th:last-child { text-align: center; }
.dl-table tbody tr {
  border-bottom: 1px solid var(--border); transition: background var(--transition);
}
.dl-table tbody tr:last-child { border-bottom: none; }
.dl-table tbody tr:hover { background: var(--bg); }
.dl-table td { padding: 16px 18px; vertical-align: middle; color: var(--text); }
.dl-table td:last-child { text-align: center; white-space: nowrap; }
.dl-name { font-weight: 700; color: var(--text); margin-bottom: 3px; }
.dl-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }
.dl-tag {
  display: inline-block; font-size: 0.72rem; font-weight: 600;
  padding: 2px 9px; border-radius: 20px; margin-bottom: 5px;
}
.dl-tag-app    { background: rgba(37,99,235,0.12); color: #2563eb; }
.dl-tag-driver { background: rgba(16,185,129,0.12); color: #059669; }
.dl-tag-tool   { background: rgba(139,92,246,0.12); color: #7c3aed; }
.dl-tag-calc   { background: rgba(236,72,153,0.12); color: #db2777; }
.dl-table .col-ver, .dl-table .col-size, .dl-table .col-date {
  white-space: nowrap; color: var(--text-secondary); font-size: 0.88rem;
}

/* 目录导航 */
.toc-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
}
.toc-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}
.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px 16px;
}
.toc-grid a {
  display: block;
  padding: 7px 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toc-grid a:hover {
  background: var(--primary-bg);
  color: var(--primary);
}
.toc-grid a::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary); margin-right: 8px;
  vertical-align: middle; flex-shrink: 0;
}
.toc-cat {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  padding: 7px 12px 2px;
  grid-column: 1 / -1;
}
.toc-cat:first-child { padding-top: 0; }

@media (max-width: 768px) {
  .page-tab { padding: 12px 20px; font-size: 0.95rem; }
  .toc-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .dl-table .col-size, .dl-table .col-date, .dl-table .col-ver { display: none; }
  .dl-table th, .dl-table td { padding: 12px 12px; }
  .know-card { padding: 20px; }
  .know-card-fig img { max-height: 200px; }
}
