/* 51电路图网 (www.51dlt.cn) - Modern Engineering Portal Stylesheet */
:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-alt: #edf2f8;
  --primary: #165b9e;
  --primary-dark: #0d355e;
  --primary-soft: #eaf3fc;
  --accent: #e86a0c;
  --accent-dark: #c95704;
  --text: #1e293b;
  --text-muted: #52637a;
  --border: #dce4ee;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(15, 45, 82, 0.06);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 15px;
  overflow-x: hidden;
}

img, svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.16s ease;
}

a:hover {
  color: var(--accent);
}

code {
  font-family: Consolas, Menlo, Monaco, "Courier New", monospace;
  background: #eef3f9;
  color: #0d355e;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  word-break: break-word;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(13, 53, 94, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  display: block;
  height: 46px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  padding: 7px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.header-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  flex-shrink: 0;
}

.header-search input {
  border: 0;
  background: transparent;
  padding: 7px 10px;
  font-size: 13px;
  width: 165px;
  color: var(--text);
  outline: none;
}

.header-search button {
  border: 0;
  background: var(--primary);
  color: #fff;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.header-search button:hover {
  background: var(--primary-dark);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--primary-dark);
  border-radius: 2px;
}

/* Top Announcement Bar (Home) */
.announce-bar {
  background: linear-gradient(90deg, #fff7ed 0%, #eff6ff 55%, #eef6ff 100%);
  border-bottom: 1px solid #fed7aa;
}

.announce-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 9px;
  padding-bottom: 9px;
  flex-wrap: wrap;
}

.announce-badge {
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

.announce-text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
  flex: 1;
  min-width: 180px;
}

.announce-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-dark);
  white-space: nowrap;
}

/* Hero Section */
.hero-section {
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(135deg, #0b2442 0%, #154e88 60%, #1d64ab 100%);
  background-size: 24px 24px, 24px 24px, 100% 100%;
  color: #fff;
  padding: 44px 0 48px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 28px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #fed7aa;
  background: rgba(232, 106, 12, 0.22);
  border: 1px solid rgba(251, 146, 60, 0.45);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero-copy h1 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.3;
  font-weight: 700;
}

.hero-sub {
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 15px;
  max-width: 680px;
}

.hero-search-form {
  display: flex;
  background: #fff;
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 10px 24px rgba(5, 20, 42, 0.24);
  max-width: 640px;
}

.hero-search-form.light {
  box-shadow: none;
  border: 1px solid var(--border);
  margin-top: 14px;
}

.hero-search-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 10px 14px;
  font-size: 15px;
  color: var(--text);
  outline: none;
}

.hero-search-form button {
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 22px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
}

.hero-search-form button:hover {
  background: var(--accent-dark);
}

.hot-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: #bfdbfe;
}

.hot-tags a {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  padding: 3px 10px;
  border-radius: 999px;
  font-family: Consolas, Menlo, monospace;
  font-size: 12px;
}

.hot-tags a:hover {
  background: var(--accent);
  color: #fff;
}

.hero-stats-card {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background: rgba(11, 31, 58, 0.55);
  border: 1px solid rgba(147, 197, 253, 0.25);
  border-radius: 12px;
  padding: 18px;
}

.stat-item {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 14px;
}

.stat-num {
  font-size: 24px;
  font-weight: 700;
  color: #fbbf24;
  line-height: 1.2;
}

.stat-label {
  font-size: 12px;
  color: #e2e8f0;
  margin-top: 4px;
}

/* Sections */
.section {
  padding: 40px 0;
}

.section-alt {
  background: var(--surface-alt);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0 0 4px;
  font-size: 22px;
  color: var(--primary-dark);
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.more-link {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* Category Grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.cat-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.cat-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.cat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cat-icon svg {
  width: 24px;
  height: 24px;
}

.cat-info {
  min-width: 0;
  flex: 1;
}

.cat-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.cat-title-row h3 {
  margin: 0;
  font-size: 16px;
  color: var(--primary-dark);
}

.cat-count {
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 1px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.cat-info p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Schematic Cards */
.schematic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.schematic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.card-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.badge-cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.badge-board {
  font-family: Consolas, Menlo, monospace;
  font-size: 12px;
  color: #9a3412;
  background: #ffedd5;
  padding: 2px 8px;
  border-radius: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-title {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.45;
}

.card-title a {
  color: var(--primary-dark);
}

.card-title a:hover {
  color: var(--accent);
}

.card-summary {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-specs {
  background: #f8fafc;
  border: 1px solid #e6edf5;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  margin-top: auto;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.card-specs span {
  color: var(--text-muted);
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary-sm,
.btn-outline-sm,
.btn-accent,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
  text-align: center;
}

.btn-primary-sm {
  background: var(--primary);
  color: #fff;
  padding: 7px 13px;
  font-size: 13px;
}

.btn-primary-sm:hover {
  background: var(--primary-dark);
  color: #fff;
}

.btn-outline-sm {
  background: #fff;
  color: var(--primary);
  border-color: var(--border);
  padding: 7px 12px;
  font-size: 13px;
}

.btn-outline-sm:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  font-size: 14px;
}

.btn-accent:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn-outline {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
  padding: 10px 18px;
  font-size: 14px;
}

.btn-outline:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.full {
  width: 100%;
}

/* Split Tools on Home */
.split-tools {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
  align-items: start;
}

.tool-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 10px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: #f1f5f9;
  color: var(--primary-dark);
  font-weight: 600;
  white-space: nowrap;
}

.data-table tr:hover td {
  background: #fafcff;
}

.tag-pill {
  display: inline-block;
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #eef2ff;
  color: #3730a3;
  white-space: nowrap;
}

.muted {
  color: var(--text-muted);
  font-size: 12.5px;
}

.fault-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fault-mini-item {
  border: 1px solid #e6edf5;
  border-radius: 8px;
  padding: 11px 13px;
  background: #fafcff;
}

.fault-mini-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.fault-mini-body {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.toolbox-promo {
  margin-top: 16px;
  background: linear-gradient(135deg, #0d355e 0%, #165b9e 100%);
  color: #fff;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.toolbox-promo p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #dbeafe;
}

/* Page Banner */
.page-banner {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
}

.page-banner.compact {
  padding: 22px 0;
}

.page-banner h1 {
  margin: 8px 0 8px;
  font-size: 25px;
  color: var(--primary-dark);
  line-height: 1.35;
}

.page-banner p {
  margin: 0;
  color: var(--text-muted);
  max-width: 820px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.detail-meta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Category Tabs */
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.cat-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
}

.cat-tab.active,
.cat-tab:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Detail Layout */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  align-items: start;
}

.detail-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.spec-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.spec-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.spec-label {
  font-size: 12px;
  color: var(--text-muted);
}

.content-block {
  margin-bottom: 28px;
}

.content-block h2 {
  font-size: 19px;
  color: var(--primary-dark);
  border-left: 4px solid var(--accent);
  padding-left: 10px;
  margin: 0 0 12px;
}

.block-hint {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.schematic-canvas {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #1e3a5f;
  background: #0b1f3a;
}

.schematic-svg {
  display: block;
  width: 100%;
  height: auto;
}

.prose p {
  margin: 0 0 12px;
}

.prose h3 {
  font-size: 16px;
  color: var(--primary);
  margin: 18px 0 8px;
}

.prose ul {
  padding-left: 20px;
  margin: 8px 0 14px;
}

.prose li {
  margin-bottom: 6px;
}

.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid #e6edf5;
  border-radius: 8px;
  padding: 12px 14px;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.safety-alert {
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-left: 4px solid var(--accent);
  color: #7c2d12;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 14px;
  margin-bottom: 24px;
}

.download-panel {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.download-panel h3 {
  margin: 0 0 4px;
  font-size: 17px;
  color: var(--primary-dark);
}

.download-panel p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

.download-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Sidebar */
.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.side-card.highlight {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.side-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--primary-dark);
}

.side-hint {
  margin: -4px 0 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.side-btn-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-chip-list,
.side-link-list,
.side-tool-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.side-chip-list a {
  display: flex;
  flex-direction: column;
  padding: 9px 10px;
  border-radius: 7px;
  background: #f8fafc;
  border: 1px solid #e6edf5;
}

.side-chip-list strong {
  color: var(--primary-dark);
  font-family: Consolas, Menlo, monospace;
}

.side-chip-list span {
  font-size: 12.5px;
  color: var(--text-muted);
}

.side-link-list a {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.45;
}

.side-link-list a:hover {
  color: var(--accent);
}

.badge-mini {
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.side-tool-links a {
  font-size: 13.5px;
  font-weight: 500;
}

/* Filter Bar & Calculators */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filter-bar input,
.filter-bar select {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
}

.filter-bar input {
  flex: 1;
  min-width: 220px;
}

.chip-model {
  font-family: Consolas, Menlo, monospace;
  color: var(--primary-dark);
}

.pinout-cell {
  min-width: 220px;
  font-size: 12.5px;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.calc-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  color: var(--primary-dark);
}

.calc-desc {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.calc-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text);
}

.calc-row {
  display: flex;
  gap: 8px;
}

.calc-row input,
.calc-inputs-3 input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 14px;
}

.calc-inputs-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.calc-result {
  margin-top: 12px;
  background: #0b1f3a;
  color: #fde68a;
  font-family: Consolas, Menlo, monospace;
  font-size: 13.5px;
  padding: 11px 14px;
  border-radius: 8px;
  word-break: break-word;
}

.prose-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  max-width: 920px;
}

.prose-card h2 {
  color: var(--primary-dark);
  font-size: 19px;
  margin-top: 24px;
}

.prose-card h2:first-child {
  margin-top: 0;
}

.empty-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
}

.search-summary {
  margin: 0 0 18px;
  font-size: 15px;
}

.link-inline {
  font-weight: 600;
  white-space: nowrap;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.pagination a {
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}

.pagination a.active,
.pagination a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Footer */
.site-footer {
  background: #0d2540;
  color: #cbd5e1;
  margin-top: 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  padding-top: 36px;
  padding-bottom: 30px;
}

.footer-brand {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.footer-desc {
  margin: 0;
  font-size: 13.5px;
  color: #94a3b8;
}

.footer-col h3 {
  margin: 0 0 12px;
  font-size: 15px;
  color: #fff;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  font-size: 13.5px;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #fb923c;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding: 15px 0;
  font-size: 13px;
  color: #94a3b8;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-bottom a {
  color: #e2e8f0;
  text-decoration: underline;
}

/* Responsive Breakpoints (tested cleanly down to 375px) */
@media (max-width: 1080px) {
  .header-search {
    display: none;
  }
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .schematic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-inner,
  .split-tools,
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }
  .main-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 10px 20px rgba(15, 45, 82, 0.1);
  }
  .main-nav.open {
    display: flex;
  }
  .main-nav a {
    padding: 10px 12px;
  }
  .hero-section {
    padding: 30px 0 34px;
  }
  .hero-copy h1 {
    font-size: 23px;
  }
  .cat-grid,
  .schematic-grid,
  .calc-grid,
  .spec-summary-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .detail-main {
    padding: 16px;
  }
  .page-banner h1 {
    font-size: 21px;
  }
  .calc-inputs-3 {
    grid-template-columns: 1fr;
  }
  .hero-search-form {
    flex-direction: column;
    gap: 6px;
  }
  .hero-search-form button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .brand-logo {
    height: 38px;
  }
  .hero-stats-card {
    grid-template-columns: repeat(2, 1fr);
    padding: 12px;
    gap: 8px;
  }
  .stat-item {
    padding: 10px;
  }
  .stat-num {
    font-size: 20px;
  }
  .announce-inner {
    gap: 6px;
  }
}
