
/* SEO/GEO baseline: system CJK fonts, 16px body, 1200px shell (detail pages same width) */
:root {
  --seo-font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  --seo-text: 16px;
  --seo-lh: 1.7;
  --seo-container: 1200px;
  --seo-prose: var(--seo-container, 1200px);
}

/* 智芯建站：红 / 海军蓝 / 中性灰 三色，移动端优先 */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
}

:root {
  --brand: #e10600;
  --brand-hot: #ff3b2f;
  --navy: #0b1f3a;
  --ink: #1a2332;
  --muted: #5b6472;
  --line: #e8ecf0;
  --wash: #f4f6f8;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-7xl { max-width: 96rem !important; }
.max-w-3xl { max-width: 96rem !important; }
.max-w-xl { max-width: 36rem; }
.flex { display: flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-7 { gap: 1.75rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.gap-12 { gap: 3rem; }
.grid-cols-2 { grid-template-columns: 1fr 1fr; }
.grid-cols-3 { grid-template-columns: 1fr 1fr 1fr; }
#mobileNav.hidden { display: none !important; }

@media (max-width: 639px) {
  .grid-cols-2,
  .grid-cols-3 { grid-template-columns: 1fr; }
}

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: 1fr 1fr; }
  .sm\:inline-flex { display: inline-flex !important; }
  .sm\:text-base { font-size: 0.9375rem; }
  .sm\:text-lg { font-size: 1rem; }
  .sm\:text-4xl { font-size: 1.75rem; line-height: 1.3; }
  .sm\:text-5xl { font-size: 1.75rem; line-height: 1.3; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: 1fr 1fr; }
  .md\:grid-cols-3 { grid-template-columns: 1fr 1fr 1fr; }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: 1fr 1fr; }
  .lg\:grid-cols-3 { grid-template-columns: 1fr 1fr 1fr; }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
  .lg\:col-span-4 { grid-column: span 4; }
  .lg\:col-span-8 { grid-column: span 8; }
  .lg\:flex { display: flex !important; }
  .lg\:hidden { display: none !important; }
  .lg\:py-20 { padding-top: 5rem; padding-bottom: 5rem; }
}

@media (min-width: 1280px) {
  .xl\:grid-cols-3 { grid-template-columns: 1fr 1fr 1fr; }
  .xl\:grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
}

.btn-primary,
.btn-outline {
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: #e10600;
  color: #fff !important;
  box-shadow: 0 6px 14px rgba(225, 6, 0, 0.18);
  border: 0;
  cursor: pointer;
}
.btn-outline {
  border: 1.5px solid #e10600;
  color: #e10600 !important;
  background: #fff;
}
a.btn-primary:not(.hidden),
button.btn-primary,
a.btn-outline {
  display: inline-flex;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.75rem;
}
.hero-cta-row .btn-primary {
  min-width: 10.5rem;
  justify-content: center;
  text-align: center;
}
@media (max-width: 639px) {
  .hero-cta-row {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-cta-row .btn-primary { width: 100%; min-width: 0; }
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: #e5e7eb !important;
  border-bottom: 1px solid var(--line);
}
.site-header-bar,
.site-header > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  max-width: 96rem !important;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .site-header-bar,
  .site-header > div:first-child {
    height: 60px;
    padding: 0 1.5rem;
  }
}
.site-header a[aria-label="智芯建站首页"] {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: auto;
  text-decoration: none;
  min-width: 0;
}
.site-header a[aria-label="智芯建站首页"] svg,
.site-header svg {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px;
  min-height: 42px;
  display: block;
  flex-shrink: 0;
  max-width: none !important;
}
.site-header a[aria-label="智芯建站首页"] span {
  font-size: 1rem !important;
  line-height: 1.2 !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  color: var(--navy) !important;
  white-space: nowrap;
}
.site-header nav {
  display: none;
  align-items: center;
  flex: 1;
  justify-content: center;
  gap: 2.25rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  min-width: 0;
  margin: 0;
}
.site-cta { display: none !important; }
.site-menu-btn {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
}
@media (min-width: 640px) {
  .site-cta { display: inline-flex !important; margin-right: 0; }
}
@media (min-width: 1024px) {
  .site-header-bar,
  .site-header > div:first-child {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  .site-header a[aria-label="智芯建站首页"] { justify-self: start; }
  .site-header nav { display: flex !important; justify-content: center; }
  .site-header-bar > div:last-child,
  .site-header > div:first-child > div:last-child {
    justify-self: end;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
  }
  .site-menu-btn { display: none !important; }
}
.site-header .nav-link,
.site-header nav a {
  color: var(--muted) !important;
  text-decoration: none;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  line-height: 1.2;
}
.site-header .nav-link:hover,
.site-header [aria-current="page"],
.site-header nav a.text-red-600 {
  color: var(--brand) !important;
  font-weight: 500 !important;
}
#mobileNav {
  background: #e5e7eb !important;
  border-top: 1px solid var(--line);
}
#mobileNav a:not(.btn-primary) {
  font-size: 0.9375rem !important;
  font-weight: 500 !important;
  color: var(--navy);
  text-decoration: none;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--wash);
}
#mobileNav .btn-primary { margin-top: 0.5rem; }

.hero-kicker {
  font-size: 0.9375rem !important;
  line-height: 1.45;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.crumb,
nav[aria-label="面包屑"] {
  font-size: 0.8125rem !important;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: #64748b !important;
}
.crumb a,
nav[aria-label="面包屑"] a {
  color: #64748b;
  text-decoration: none;
}
.crumb a:hover,
nav[aria-label="面包屑"] a:hover {
  color: var(--brand);
}
.hero-highlight {
  max-width: 36rem;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  line-height: 1.6 !important;
  color: var(--navy) !important;
}

.site-hero {
  background: #fff;
  color: var(--ink);
}
@media (min-width: 1024px) {
  .site-hero .grid.lg\:grid-cols-2 {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
  .site-hero .hero-copy {
    transform: translateX(50px);
  }
  .site-hero .dash-panel {
    transform: translateX(-50px);
  }
}

.news-band,
.faq-band {
  background: var(--wash);
}
.news-card {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: none;
}
.news-card-red,
.news-card-orange,
.news-card-blue {
  background: #fff;
  border: 1px solid var(--line);
}

.faq-list {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.faq-list details {
  padding: 1rem 1.15rem;
  border-left: 0;
  background: #fff;
}
.faq-list details + details { border-top: 1px solid var(--line); }

.cta-band {
  background: var(--navy);
}

.stat-red,
.stat-orange,
.stat-blue,
.stat-cyan,
.stat-purple,
.stat-green { color: var(--brand); }

.chip-red,
.chip-orange,
.chip-blue,
.chip-cyan,
.chip-purple {
  display: block;
  border-radius: 8px;
  line-height: 1.45;
  word-break: break-word;
  background: var(--wash);
  color: var(--navy);
  border: 1px solid var(--line);
}

.card-accent { position: relative; overflow: hidden; }
.card-accent::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand);
}
.card-red::before,
.card-orange::before,
.card-blue::before,
.card-cyan::before,
.card-purple::before,
.card-green::before { background: var(--brand); }

.review-card {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: none;
}

.dash-panel {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(11, 31, 58, 0.08);
}

.prose { max-width: none; }
.article-shell,
.prose.mx-auto {
  max-width: 80rem;
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
  width: 100%;
}
.footer-brand,
.footer-nav,
.footer-legal,
.footer-contact,
.footer-wechat {
  min-width: 0;
  margin: 0;
  padding: 0;
  text-align: left;
}
/* 兼容旧结构（若仍有 footer-cols） */
.footer-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) and (max-width: 767px) {
  .footer-main {
    grid-template-columns: repeat(2, max-content);
    justify-content: space-between;
    gap: 1.5rem 2rem;
  }
}
@media (min-width: 768px) {
  /* 按各栏目文字实际宽度占位，剩余空间均分到栏目之间 */
  .footer-main {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .footer-brand,
  .footer-nav,
  .footer-legal,
  .footer-contact,
  .footer-wechat {
    flex: 0 1 auto;
    width: max-content;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  .footer-brand {
    flex: 1 1 14rem;
    width: auto;
    max-width: 18rem;
  }
  .footer-contact {
    max-width: 16rem;
  }
  .footer-wechat {
    flex: 0 0 auto;
  }
}
.footer-qr {
  display: block;
  margin-top: 0.75rem;
  width: 5.75rem;
  height: 5.75rem;
  object-fit: contain;
  background: #fff;
  border-radius: 0.5rem;
  padding: 0.3rem;
}
footer .grid.md\:grid-cols-4 > div,
footer .grid.md\:grid-cols-5 > div { text-align: left; }
@media (min-width: 768px) {
  footer .grid.md\:grid-cols-4,
  footer .grid.md\:grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 1.25rem;
  }
}

footer .mt-10,
footer .mt-8 { text-align: center; }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
details summary { list-style: none; }
details summary::-webkit-details-marker { display: none; }

table { width: 100%; border-collapse: collapse; }
.overflow-x-auto:has(table) {
  border-color: #94a3b8 !important;
}
table th,
table td {
  border: 1px solid #cbd5e1 !important;
}
table thead th {
  border-bottom-color: #94a3b8 !important;
}
table tbody tr {
  border-color: #cbd5e1 !important;
}
.overflow-x-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; }
img, svg { max-width: 100%; }
.site-header svg { max-width: none; }

@media (max-width: 639px) {
  h1 { word-break: break-word; }
  .site-hero { padding-top: 4.25rem; }
  #consult .grid.lg\:grid-cols-2,
  .cta-band .grid { grid-template-columns: 1fr; }
}

/* 全站字号：正文 16、主词 15、H1 32、H2 22、H3 18、面包屑 13 */
body {
  font-size: 1rem !important;
  line-height: 1.75;
  color: var(--ink);
}
h1,
.text-3xl,
.sm\:text-4xl,
.sm\:text-5xl,
#hero-title {
  font-size: 2rem !important;
  line-height: 1.28 !important;
  font-weight: 600;
  letter-spacing: -0.02em;
}
h2,
.text-2xl,
.sm\:text-3xl,
.sm\:text-2xl {
  font-size: 1.375rem !important;
  line-height: 1.35 !important;
  font-weight: 600;
}
h3,
.text-xl,
.text-lg {
  font-size: 1.125rem !important;
  line-height: 1.4 !important;
  font-weight: 600;
}
.text-base { font-size: 1rem !important; }
.text-sm { font-size: 0.9375rem !important; }
.text-xs { font-size: 0.8125rem !important; }
.btn-primary,
.btn-outline { font-size: 0.875rem !important; }
.site-header .site-cta {
  padding: 0.28rem 0.8rem !important;
  font-size: 0.75rem !important;
  line-height: 1.2 !important;
}
.stat-red,
.stat-orange,
.stat-blue,
.stat-cyan,
.stat-purple,
.stat-green,
[class*="stat-"].text-3xl,
[class*="stat-"].sm\:text-4xl {
  font-size: 1.625rem !important;
  line-height: 1.2 !important;
}
.prose { font-size: 1rem !important; line-height: 1.85; }
.prose h1 { font-size: 2rem !important; }
.prose h2 { font-size: 1.25rem !important; font-weight: 600; }
.prose p { margin-top: 1rem; }
footer { font-size: 0.875rem; }
#consultForm {
  padding: 1rem 1.25rem !important;
}
#consultForm .grid {
  gap: 0.5rem !important;
}
#consultForm label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
#consultForm input,
#consultForm textarea {
  display: block;
  width: 100%;
  margin-top: 0 !important;
  padding-top: 0.4rem !important;
  padding-bottom: 0.4rem !important;
}
#consultForm textarea {
  min-height: 3.25rem;
  max-height: 4.5rem;
}
#consultForm .btn-primary {
  margin-top: 0.75rem !important;
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}
#consultForm > p {
  margin-top: 0.4rem !important;
}
@media (max-width: 639px) {
  h1,
  .text-3xl,
  .sm\:text-4xl,
  .sm\:text-5xl,
  #hero-title { font-size: 1.625rem !important; }
  h2,
  .text-2xl,
  .sm\:text-3xl { font-size: 1.125rem !important; }
}

.seo-prose, article.prose, .article { max-width: var(--seo-container, 1200px); width: 100%; margin-inline: auto; }
