:root {
  --brand: #e63946;
  --brand-2: #457b9d;
  --brand-3: #f4a261;
  --bg: #f7f8fc;
  --bg-soft: #eef1f8;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --text: #1d2230;
  --text-soft: #4a5266;
  --text-muted: #7a8296;
  --border: rgba(29, 34, 48, 0.09);
  --shadow-sm: 0 2px 8px rgba(29, 34, 48, 0.06);
  --shadow-md: 0 10px 30px rgba(29, 34, 48, 0.1);
  --shadow-lg: 0 20px 50px rgba(29, 34, 48, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --grad-hero: linear-gradient(135deg, #e63946 0%, #b5179e 45%, #457b9d 100%);
  --grad-accent: linear-gradient(135deg, #e63946 0%, #f4a261 100%);
  --grad-soft: linear-gradient(135deg, rgba(230, 57, 70, 0.08), rgba(69, 123, 157, 0.08));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
  --maxw: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1017;
    --bg-soft: #12161f;
    --surface: #171c26;
    --surface-glass: rgba(23, 28, 38, 0.68);
    --text: #eef1f8;
    --text-soft: #b9c0d0;
    --text-muted: #8a93a8;
    --border: rgba(255, 255, 255, 0.09);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
    --grad-soft: linear-gradient(135deg, rgba(230, 57, 70, 0.14), rgba(69, 123, 157, 0.14));
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% -10%, rgba(230, 57, 70, 0.12), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(69, 123, 157, 0.12), transparent 40%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  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 {
  color: var(--brand-2);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(69, 123, 157, 0.55);
  outline-offset: 2px;
  border-radius: 6px;
}

h1, h2, h3, h4 {
  line-height: 1.3;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.9rem);
  margin: 0 0 0.6em;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

h2 {
  font-size: clamp(1.35rem, 1.05rem + 1.2vw, 1.9rem);
  margin: 0 0 0.8em;
  position: relative;
  padding-left: 18px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: var(--grad-accent);
}

h3 {
  font-size: clamp(1.08rem, 1rem + 0.4vw, 1.3rem);
  margin: 1.4em 0 0.5em;
  color: var(--text);
}

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

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

li {
  margin-bottom: 0.4em;
}

li::marker {
  color: var(--brand);
}

blockquote {
  margin: 1.2em 0;
  padding: 1em 1.25em;
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--grad-soft);
  color: var(--text-soft);
  font-style: normal;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

blockquote p {
  margin: 0;
}

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

address {
  font-style: normal;
  line-height: 1.9;
  color: var(--text-soft);
}

/* ============ Header ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

header > div {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

header > div > a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  flex-shrink: 0;
}

header > div > a strong {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

header > div > a svg {
  transition: transform 0.5s var(--ease);
  filter: drop-shadow(0 4px 8px rgba(230, 57, 70, 0.35));
}

header > div > a:hover svg {
  transform: rotate(-8deg) scale(1.06);
}

header nav {
  flex: 1 1 auto;
  min-width: 0;
}

header nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

header nav ul::-webkit-scrollbar {
  display: none;
}

header nav ul li {
  margin: 0;
  flex-shrink: 0;
}

header nav ul li a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--text-soft);
  white-space: nowrap;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

header nav ul li a:hover {
  color: #fff;
  background: var(--grad-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(230, 57, 70, 0.28);
}

header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

header 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;
}

header form[role="search"] input[type="search"] {
  width: 220px;
  max-width: 40vw;
  padding: 9px 14px;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

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

header form[role="search"] input[type="search"]:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.14);
}

header form[role="search"] button {
  padding: 9px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--grad-accent);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

header form[role="search"] button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(230, 57, 70, 0.32);
  filter: brightness(1.05);
}

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

/* ============ Main layout ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 20px 40px;
}

main > nav[aria-label="面包屑导航"] {
  margin-bottom: 20px;
}

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

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

main > nav[aria-label="面包屑导航"] ol li + li::before {
  content: "/";
  color: var(--text-muted);
  opacity: 0.6;
}

main > nav[aria-label="面包屑导航"] ol li[aria-current="page"] {
  color: var(--text-soft);
  font-weight: 600;
}

/* ============ Sections as cards ============ */
main > section {
  position: relative;
  margin-bottom: 28px;
  padding: clamp(20px, 3vw, 38px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.7s var(--ease) both;
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

main > section:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(230, 57, 70, 0.22);
}

main > section:nth-of-type(2) { animation-delay: 0.05s; }
main > section:nth-of-type(3) { animation-delay: 0.1s; }
main > section:nth-of-type(4) { animation-delay: 0.15s; }
main > section:nth-of-type(5) { animation-delay: 0.2s; }
main > section:nth-of-type(6) { animation-delay: 0.25s; }
main > section:nth-of-type(7) { animation-delay: 0.3s; }
main > section:nth-of-type(8) { animation-delay: 0.35s; }
main > section:nth-of-type(9) { animation-delay: 0.4s; }
main > section:nth-of-type(10) { animation-delay: 0.45s; }
main > section:nth-of-type(11) { animation-delay: 0.5s; }

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

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

/* ============ Hero ============ */
#hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--grad-hero);
  background-size: 200% 200%;
  border: none;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.7s var(--ease) both, heroShift 16s ease infinite;
}

@keyframes heroShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

#hero::before,
#hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

#hero::before {
  width: 320px;
  height: 320px;
  top: -140px;
  right: -80px;
  background: rgba(255, 255, 255, 0.14);
  filter: blur(6px);
}

#hero::after {
  width: 220px;
  height: 220px;
  bottom: -120px;
  left: -60px;
  background: rgba(255, 255, 255, 0.1);
  filter: blur(10px);
}

#hero h1 {
  position: relative;
  z-index: 1;
  color: #fff;
  background: none;
  -webkit-text-fill-color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.22);
}

#hero p {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.92);
  max-width: 70ch;
}

#hero figure {
  position: relative;
  z-index: 1;
  margin: 22px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  transition: transform 0.5s var(--ease);
}

#hero figure:hover {
  transform: translateY(-4px) scale(1.005);
}

#hero figure svg {
  display: block;
  width: 100%;
}

#hero figcaption {
  padding: 10px 16px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#hero ul {
  position: relative;
  z-index: 1;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
}

#hero ul li {
  margin: 0;
  padding: 12px 16px 12px 42px;
  position: relative;
  font-size: 0.95rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

#hero ul li::before {
  content: "✓";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand);
  background: #fff;
  border-radius: 50%;
}

#hero ul li:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-3px);
}

/* ============ Articles & news cards ============ */
#articles > article,
#news > article {
  position: relative;
  margin: 0 0 16px;
  padding: 20px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}

#articles > article::after,
#news > article::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 0.35s var(--ease);
}

#articles > article:hover,
#news > article:hover {
  transform: translateY(-4px);
  background: var(--surface);
  border-color: rgba(230, 57, 70, 0.3);
  box-shadow: var(--shadow-md);
}

#articles > article h3,
#news > article h3 {
  margin-top: 0;
  transition: color 0.3s var(--ease);
}

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

#articles > article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--grad-soft);
  border: 1px solid rgba(230, 57, 70, 0.22);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

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

#articles > article a:hover {
  color: #fff;
  background: var(--grad-accent);
  border-color: transparent;
  transform: translateX(2px);
  box-shadow: 0 8px 18px rgba(230, 57, 70, 0.28);
}

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

/* ============ Cases ============ */
#cases blockquote {
  position: relative;
  padding-left: 3.2em;
}

#cases blockquote::before {
  content: "“";
  position: absolute;
  left: 0.3em;
  top: 0.05em;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--brand);
  opacity: 0.4;
  font-family: Georgia, serif;
}

/* ============ HowTo ============ */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

#howto ol li {
  position: relative;
  counter-increment: step;
  padding: 14px 18px 14px 58px;
  margin-bottom: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-accent);
  border-radius: 50%;
  box-shadow: 0 6px 14px rgba(230, 57, 70, 0.3);
}

#howto ol li:hover {
  transform: translateX(4px);
  border-color: rgba(230, 57, 70, 0.3);
  box-shadow: var(--shadow-sm);
}

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

#faq details[open] {
  background: var(--surface);
  border-color: rgba(230, 57, 70, 0.3);
  box-shadow: var(--shadow-sm);
}

#faq summary {
  position: relative;
  padding: 15px 52px 15px 20px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
  user-select: none;
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--brand);
  background: var(--grad-soft);
  border-radius: 50%;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
}

#faq details[open] summary::after {
  content: "−";
  color: #fff;
  background: var(--grad-accent);
  transform: translateY(-50%) rotate(180deg);
}

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

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

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

/* ============ Contact ============ */
#contact address {
  padding: 18px 22px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

#contact address p {
  margin: 0 0 6px;
}

#contact address p:last-child {
  margin-bottom: 0;
}

#contact a[href^="tel"],
#contact a[href^="mailto"] {
  font-weight: 600;
  border-bottom: 1px dashed currentColor;
}

/* ============ Sitemap & links ============ */
#sitemap ul,
#links ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  padding: 0;
}

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

#sitemap ul li a,
#links ul li a {
  display: block;
  padding: 10px 14px;
  font-size: 0.92rem;
  color: var(--text-soft);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  color: #fff;
  background: var(--grad-accent);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(230, 57, 70, 0.25);
}

/* ============ Footer ============ */
footer {
  position: relative;
  margin-top: 20px;
  padding: 46px 20px 30px;
  color: var(--text-soft);
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
}

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

footer > section,
footer > nav {
  max-width: var(--maxw);
  margin: 0 auto 26px;
}

footer h2 {
  font-size: 1.1rem;
  padding-left: 14px;
}

footer h2::before {
  width: 4px;
}

footer h3 {
  font-size: 0.98rem;
  margin: 1em 0 0.4em;
  color: var(--text);
}

footer p {
  font-size: 0.9rem;
  line-height: 1.8;
  margin: 0 0 0.6em;
}

footer > nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
}

footer > nav ul li {
  margin: 0;
}

footer > nav ul li a {
  display: inline-block;
  padding: 7px 14px;
  font-size: 0.88rem;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}

footer > nav ul li a:hover {
  color: #fff;
  background: var(--grad-accent);
  transform: translateY(-2px);
}

/* ============ Responsive ============ */
@media (max-width: 960px) {
  header > div {
    gap: 12px;
  }

  header form[role="search"] {
    order: 3;
    width: 100%;
  }

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

  header nav {
    order: 2;
    flex-basis: 100%;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 64px;
    --radius-lg: 18px;
  }

  body {
    font-size: 15px;
  }

  header > div {
    padding: 8px 14px;
  }

  header > div > a strong {
    font-size: 1.02rem;
  }

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

  main > section {
    padding: 18px 16px;
    margin-bottom: 20px;
  }

  h2 {
    padding-left: 14px;
  }

  h2::before {
    width: 4px;
  }

  #hero ul {
    grid-template-columns: 1fr;
  }

  #hero figure svg {
    height: auto;
  }

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

  #howto ol li {
    padding: 12px 14px 12px 52px;
  }

  #faq summary {
    padding: 13px 46px 13px 16px;
  }

  #faq details p {
    padding: 0 16px 16px;
  }

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

  footer {
    padding: 34px 14px 24px;
  }
}

@media (max-width: 400px) {
  header nav ul li a {
    padding: 7px 10px;
    font-size: 0.86rem;
  }

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

/* ============ Print ============ */
@media print {
  header,
  footer > nav,
  #hero::before,
  #hero::after {
    display: none;
  }

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

  main > section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }

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