:root {
  --brand: #ff5a5f;
  --brand-dark: #e0484d;
  --brand-light: #ff8a8d;
  --brand-soft: #fff3f3;
  --accent: #ffb347;
  --accent-2: #7c5cff;
  --bg: #fffaf9;
  --bg-alt: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --text: #2b2320;
  --text-soft: #6b5f5b;
  --text-muted: #9a8c87;
  --border: rgba(255, 90, 95, 0.16);
  --border-soft: rgba(43, 35, 32, 0.08);
  --shadow-sm: 0 2px 10px rgba(255, 90, 95, 0.08);
  --shadow-md: 0 10px 30px rgba(255, 90, 95, 0.12);
  --shadow-lg: 0 24px 60px rgba(255, 90, 95, 0.18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-blur: blur(16px) saturate(160%);
  --gradient-hero: linear-gradient(135deg, #ff5a5f 0%, #ff8a5b 45%, #ffb347 100%);
  --gradient-soft: linear-gradient(135deg, #fff3f3 0%, #ffe9e0 50%, #fff6e5 100%);
  --gradient-accent: linear-gradient(135deg, #7c5cff 0%, #ff5a5f 100%);
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #ff6b70;
    --brand-dark: #ff5a5f;
    --brand-light: #ff9a9d;
    --brand-soft: #2a1d1e;
    --accent: #ffc266;
    --accent-2: #9d84ff;
    --bg: #14100f;
    --bg-alt: #1c1716;
    --surface: rgba(36, 28, 27, 0.68);
    --surface-solid: #221b1a;
    --text: #f5eeec;
    --text-soft: #c9bcb8;
    --text-muted: #948783;
    --border: rgba(255, 107, 112, 0.24);
    --border-soft: rgba(245, 238, 236, 0.1);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
    --glass-bg: rgba(36, 28, 27, 0.55);
    --glass-border: rgba(255, 255, 255, 0.12);
    --gradient-hero: linear-gradient(135deg, #7a2a2d 0%, #8a3f2a 45%, #8a5a1e 100%);
    --gradient-soft: linear-gradient(135deg, #2a1d1e 0%, #2a221d 50%, #2a271d 100%);
    --gradient-accent: linear-gradient(135deg, #5b45c9 0%, #a03a3e 100%);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 8% -10%, rgba(255, 90, 95, 0.1), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(255, 179, 71, 0.1), transparent 55%),
    radial-gradient(800px 600px at 50% 120%, rgba(124, 92, 255, 0.08), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

a:hover,
a:focus-visible {
  color: var(--brand-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(255, 90, 95, 0.45);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.6em;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
h4 { font-size: clamp(1.02rem, 1.4vw, 1.15rem); }

p {
  margin: 0 0 1em;
  color: var(--text-soft);
}

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
  color: var(--text-soft);
}

li {
  margin-bottom: 0.4em;
}

strong {
  color: var(--text);
  font-weight: 700;
}

blockquote {
  margin: 1.2em 0;
  padding: 1.1em 1.4em;
  background: var(--surface);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

blockquote p {
  margin: 0;
  color: var(--text-soft);
  font-style: italic;
}

time {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ============ 顶部栏 ============ */
.top-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 20px;
  padding: 8px clamp(16px, 4vw, 48px);
  font-size: 0.8rem;
  color: var(--text-soft);
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  position: relative;
  z-index: 50;
}

.top-bar span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-bar span:first-child {
  font-weight: 600;
  color: var(--brand);
}

/* ============ 导航 ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 4px 24px rgba(255, 90, 95, 0.06);
}

nav[aria-label="主导航"] {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px clamp(16px, 4vw, 32px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
}

.brand:hover {
  transform: scale(1.04);
}

.brand svg {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 4px 10px rgba(255, 90, 95, 0.35));
  transition: transform 0.4s var(--ease);
}

.brand:hover svg {
  transform: rotate(-8deg) scale(1.06);
}

.brand strong {
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
}

nav[aria-label="主导航"] ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1 1 auto;
}

nav[aria-label="主导航"] ul li {
  margin: 0;
}

nav[aria-label="主导航"] ul a {
  display: inline-block;
  padding: 7px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: 999px;
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

nav[aria-label="主导航"] ul a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--gradient-hero);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

nav[aria-label="主导航"] ul a:hover,
nav[aria-label="主导航"] ul a:focus-visible {
  color: var(--brand);
  background: rgba(255, 90, 95, 0.08);
  transform: translateY(-1px);
}

nav[aria-label="主导航"] ul a:hover::after,
nav[aria-label="主导航"] ul a:focus-visible::after {
  width: 60%;
}

/* 搜索表单 */
form[role="search"] {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
  position: relative;
}

form[role="search"] label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

form[role="search"] input[type="search"] {
  width: clamp(150px, 22vw, 220px);
  padding: 9px 16px;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), width 0.3s var(--ease);
  font-family: inherit;
}

form[role="search"] input[type="search"]::placeholder {
  color: var(--text-muted);
}

form[role="search"] input[type="search"]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(255, 90, 95, 0.15);
  width: clamp(180px, 26vw, 260px);
}

form[role="search"] button {
  padding: 9px 20px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: var(--gradient-hero);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(255, 90, 95, 0.3);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
  white-space: nowrap;
}

form[role="search"] button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 90, 95, 0.42);
  filter: brightness(1.05);
}

form[role="search"] button:active {
  transform: translateY(0) scale(0.98);
}

/* ============ 主体 ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 32px) 60px;
}

section {
  margin-bottom: clamp(36px, 6vw, 72px);
  scroll-margin-top: 100px;
}

section > h2 {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 28px;
}

section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: var(--gradient-hero);
}

section > h2::after {
  content: "";
  position: absolute;
  left: 64px;
  bottom: 0;
  width: 100px;
  height: 4px;
  border-radius: 4px;
  background: var(--border);
}

/* ============ Hero ============ */
#hero {
  position: relative;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px);
  border-radius: var(--radius-xl);
  background: var(--gradient-hero);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 85% 15%, rgba(255, 255, 255, 0.28), transparent 60%),
    radial-gradient(500px 260px at 10% 90%, rgba(255, 255, 255, 0.16), transparent 60%);
  z-index: -1;
  animation: heroShine 12s ease-in-out infinite alternate;
}

#hero::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent 70%);
  z-index: -1;
  animation: floatOrb 14s ease-in-out infinite;
}

@keyframes heroShine {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 40px); }
}

#hero h1 {
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  margin-bottom: 0.5em;
  max-width: 900px;
}

#hero > p {
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(0.98rem, 1.3vw, 1.08rem);
  max-width: 780px;
  margin-bottom: 1.6em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
}

#hero figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

#hero figure:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
}

#hero figure svg {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

#hero figcaption {
  padding: 14px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.18);
  text-align: center;
  letter-spacing: 0.01em;
}

/* ============ 面包屑 ============ */
nav[aria-label="面包屑导航"] {
  margin: 22px 0 8px;
}

nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

nav[aria-label="面包屑导航"] li {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

nav[aria-label="面包屑导航"] li + li::before {
  content: "›";
  margin: 0 8px;
  color: var(--text-muted);
  font-weight: 700;
}

nav[aria-label="面包屑导航"] a {
  color: var(--text-soft);
}

nav[aria-label="面包屑导航"] a:hover {
  color: var(--brand);
}

/* ============ 通用卡片化区块 ============ */
#about,
#products,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#contact,
#sitemap,
#links {
  position: relative;
  padding: clamp(22px, 4vw, 40px);
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

#about:hover,
#products:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#articles:hover,
#faq:hover,
#howto:hover,
#contact:hover,
#sitemap:hover,
#links:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

#about h3,
#products h3,
#products h4,
#solutions h3,
#cases h3,
#news h3,
#articles h3,
#faq h3,
#howto h3,
#howto h4,
#contact h3 {
  margin-top: 1.6em;
  color: var(--text);
}

#about h3:first-of-type,
#products h3:first-of-type,
#solutions h3:first-of-type,
#cases h3:first-of-type,
#howto h3:first-of-type,
#contact h3:first-of-type {
  margin-top: 0;
}

#about h3::before,
#products h3::before,
#solutions h3::before,
#cases h3::before,
#news h3::before,
#articles h3::before,
#howto h3::before,
#contact h3::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--gradient-hero);
  vertical-align: middle;
  box-shadow: 0 0 0 4px rgba(255, 90, 95, 0.12);
}

/* ============ 新闻/文章条目 ============ */
#news article,
#articles article {
  position: relative;
  padding: 20px 22px;
  margin-bottom: 16px;
  background: var(--surface-solid);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  overflow: hidden;
}

#news article::before,
#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-hero);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s var(--ease);
}

#news article:hover,
#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

#news article:hover::before,
#articles article:hover::before {
  transform: scaleY(1);
}

#news article h3,
#articles article h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
  transition: color 0.25s var(--ease);
}

#news article:hover h3,
#articles article:hover h3 {
  color: var(--brand);
}

#news article p:last-child,
#articles article p:last-child {
  margin-bottom: 0;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 90, 95, 0.1);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), gap 0.25s var(--ease);
}

#articles article a::after {
  content: "→";
  transition: transform 0.25s var(--ease);
}

#articles article a:hover {
  background: var(--gradient-hero);
  color: #fff;
  transform: translateX(2px);
}

#articles article a:hover::after {
  transform: translateX(3px);
}

/* ============ FAQ ============ */
#faq details {
  margin-bottom: 12px;
  padding: 4px 20px;
  background: var(--surface-solid);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
  overflow: hidden;
}

#faq details[open] {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  background: var(--bg-alt);
}

#faq details:hover {
  border-color: var(--border);
}

#faq summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: color 0.25s var(--ease);
  position: relative;
}

#faq summary::-webkit-details-marker {
  display: none;
}

#faq summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  color: var(--brand);
  background: rgba(255, 90, 95, 0.1);
  border-radius: 50%;
  transition: transform 0.35s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}

#faq details[open] summary::before {
  content: "−";
  transform: rotate(180deg);
  background: var(--gradient-hero);
  color: #fff;
}

#faq summary:hover {
  color: var(--brand);
}

#faq details > p {
  padding: 0 0 18px 36px;
  margin: 0;
  animation: fadeSlideIn 0.4s var(--ease);
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ HowTo ============ */
#howto h4 {
  position: relative;
  padding-left: 18px;
}

#howto h4::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 179, 71, 0.18);
}

/* ============ 联系 ============ */
#contact p {
  line-height: 1.9;
}

#contact a {
  font-weight: 600;
}

/* ============ 地图/链接列表 ============ */
#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}

#sitemap li,
#links li {
  margin: 0;
}

#sitemap a,
#links a {
  display: block;
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--surface-solid);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  transition: transform 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: var(--brand);
  border-color: var(--border);
  background: rgba(255, 90, 95, 0.06);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

/* ============ 页脚 ============ */
footer {
  margin-top: 20px;
  padding: clamp(30px, 5vw, 56px) clamp(16px, 4vw, 48px) 30px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border-soft);
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-hero);
}

footer > section {
  max-width: var(--maxw);
  margin: 0 auto 28px;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

footer > section:hover {
  box-shadow: none;
  border: none;
}

footer h2 {
  font-size: 1.3rem;
  margin-bottom: 20px;
}

footer h3 {
  font-size: 1rem;
  margin-top: 1.2em;
  color: var(--text);
}

footer h3::before {
  display: none;
}

footer p {
  font-size: 0.9rem;
  color: var(--text-soft);
}

footer > p {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: 22px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
}

/* ============ 滚动动画 ============ */
@media (prefers-reduced-motion: no-preference) {
  section {
    animation: revealUp 0.7s var(--ease) both;
    animation-timeline: view();
    animation-range: entry 0% cover 22%;
  }

  @supports not (animation-timeline: view()) {
    section {
      animation: none;
    }
  }
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  nav[aria-label="主导航"] {
    gap: 10px 16px;
  }

  nav[aria-label="主导航"] ul {
    order: 3;
    flex-basis: 100%;
    justify-content: center;
  }

  form[role="search"] {
    margin-left: 0;
  }

  form[role="search"] input[type="search"] {
    width: 160px;
  }

  form[role="search"] input[type="search"]:focus {
    width: 200px;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 80px;
  }

  body {
    font-size: 15px;
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 0.74rem;
    padding: 8px 16px;
  }

  nav[aria-label="主导航"] {
    padding: 8px 16px;
    gap: 10px;
  }

  .brand svg {
    width: 34px;
    height: 34px;
  }

  .brand strong {
    font-size: 1.08rem;
  }

  nav[aria-label="主导航"] ul {
    gap: 2px 4px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  nav[aria-label="主导航"] ul::-webkit-scrollbar {
    display: none;
  }

  nav[aria-label="主导航"] ul a {
    font-size: 0.82rem;
    padding: 6px 10px;
    white-space: nowrap;
  }

  form[role="search"] {
    flex: 1 1 100%;
    order: 2;
  }

  form[role="search"] input[type="search"] {
    flex: 1 1 auto;
    width: auto;
  }

  form[role="search"] input[type="search"]:focus {
    width: auto;
  }

  form[role="search"] button {
    padding: 9px 16px;
  }

  main {
    padding: 16px 14px 40px;
  }

  #hero {
    padding: 26px 20px;
    border-radius: var(--radius-lg);
  }

  #hero figure {
    border-radius: var(--radius-md);
  }

  #hero figure svg {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }

  #hero figcaption {
    font-size: 0.82rem;
    padding: 10px 14px;
  }

  #about,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links {
    padding: 20px 16px;
    border-radius: var(--radius-lg);
  }

  section > h2 {
    margin-bottom: 20px;
  }

  #news article,
  #articles article {
    padding: 16px;
  }

  #faq details {
    padding: 4px 14px;
  }

  #faq summary {
    font-size: 0.95rem;
    padding: 14px 0;
  }

  #faq details > p {
    padding-left: 0;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px 10px;
  }

  #sitemap a,
  #links a {
    padding: 9px 12px;
    font-size: 0.86rem;
  }

  blockquote {
    padding: 14px 16px;
  }

  footer {
    padding: 30px 16px 24px;
  }
}

@media (max-width: 420px) {
  .top-bar span:last-child {
    font-size: 0.7rem;
  }

  h1 { font-size: 1.55rem; }
  h2 { font-size: 1.3rem; }

  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr 1fr;
  }

  #hero {
    padding: 22px 16px;
  }
}

/* ============ 打印 ============ */
@media print {
  header,
  footer::before,
  form[role="search"],
  .top-bar {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  section {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
    animation: none;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}