:root {
  --brand: #F26522;
  --brand-dark: #D9531A;
  --brand-light: #FF8A4C;
  --brand-soft: rgba(242, 101, 34, 0.12);
  --bg: #FAF7F4;
  --bg-alt: #F2ECE6;
  --surface: #FFFFFF;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --surface-glass-border: rgba(255, 255, 255, 0.55);
  --text: #1B1B1F;
  --text-soft: #4A4A52;
  --text-muted: #75757E;
  --border: rgba(27, 27, 31, 0.1);
  --shadow-sm: 0 2px 8px rgba(27, 27, 31, 0.06);
  --shadow-md: 0 8px 24px rgba(27, 27, 31, 0.08);
  --shadow-lg: 0 18px 48px rgba(27, 27, 31, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --header-h: 72px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --grad-hero: linear-gradient(135deg, #F26522 0%, #FF8A4C 45%, #FFB37A 100%);
  --grad-soft: linear-gradient(160deg, rgba(242, 101, 34, 0.1), rgba(255, 179, 122, 0.06));
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141317;
    --bg-alt: #1B1A20;
    --surface: #1F1E25;
    --surface-glass: rgba(31, 30, 37, 0.72);
    --surface-glass-border: rgba(255, 255, 255, 0.1);
    --text: #F2F0F4;
    --text-soft: #C9C6D0;
    --text-muted: #948F9E;
    --border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.38);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.5);
    --brand-soft: rgba(242, 101, 34, 0.18);
    --grad-soft: linear-gradient(160deg, rgba(242, 101, 34, 0.16), rgba(255, 179, 122, 0.05));
  }
}

*,
*::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-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(242, 101, 34, 0.08), transparent 42%),
    radial-gradient(circle at 88% 0%, rgba(255, 179, 122, 0.1), transparent 38%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg,
video {
  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-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(242, 101, 34, 0.55);
  outline-offset: 3px;
  border-radius: 6px;
}

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

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.85rem);
  line-height: 1.22;
}

h2 {
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem);
  position: relative;
  padding-bottom: 0.5em;
}

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

h3 {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  color: var(--text);
}

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

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

li {
  margin-bottom: 0.4em;
}

blockquote {
  margin: 1.2em 0;
  padding: 1.1em 1.4em;
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--grad-soft);
  color: var(--text-soft);
  font-style: normal;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* ---------- Header ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--surface-glass-border);
  box-shadow: var(--shadow-sm);
}

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

header .brand a {
  display: inline-block;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--grad-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  transition: transform 0.3s var(--ease), filter 0.3s var(--ease);
}

header .brand a:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

header .brand p {
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

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

header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  justify-content: center;
}

header nav li {
  margin: 0;
}

header nav a {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: 999px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

header nav a:hover {
  color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-1px);
}

header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 1 auto;
}

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

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

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

header form[role="search"] input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

header form[role="search"] button {
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--grad-hero);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(242, 101, 34, 0.32);
  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(-1px);
  box-shadow: 0 8px 22px rgba(242, 101, 34, 0.42);
  filter: brightness(1.05);
}

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

/* ---------- Breadcrumb ---------- */

body > nav[aria-label="面包屑导航"] {
  max-width: var(--maxw);
  margin: 1rem auto 0;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

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

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

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

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

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

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

/* ---------- Main & Sections ---------- */

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem) 4rem;
}

main > section {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  padding: clamp(1.4rem, 3.5vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  animation: rise-in 0.7s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% cover 28%;
}

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

@supports not (animation-timeline: view()) {
  main > section {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  main > section,
  header .brand a,
  header nav a,
  header form[role="search"] button,
  a,
  article,
  details {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Hero ---------- */

#hero {
  position: relative;
  overflow: hidden;
  padding: clamp(1.8rem, 5vw, 3.5rem);
  background: var(--grad-hero);
  border: none;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

#hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto auto;
  width: 60%;
  height: 140%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 65%);
  pointer-events: none;
  transform: rotate(12deg);
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -40% -15%;
  width: 55%;
  height: 120%;
  background: radial-gradient(circle, rgba(27, 27, 31, 0.18), transparent 70%);
  pointer-events: none;
}

#hero > * {
  position: relative;
  z-index: 1;
}

#hero h1 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(27, 27, 31, 0.18);
  max-width: 22ch;
}

#hero p {
  color: rgba(255, 255, 255, 0.94);
  max-width: 68ch;
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem);
}

#hero figure {
  margin: 1.6rem 0;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

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

#hero figure svg {
  width: 100%;
  border-radius: var(--radius-sm);
}

#hero figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
}

#hero > p:last-of-type a {
  display: inline-block;
  margin: 0.2rem 0.2rem;
  padding: 0.6rem 1.3rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#hero > p:last-of-type a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(27, 27, 31, 0.2);
}

/* ---------- Articles ---------- */

#articles article {
  position: relative;
  margin-bottom: 1.1rem;
  padding: 1.2rem 1.4rem;
  background: var(--bg-alt);
  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::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.2rem;
  bottom: 1.2rem;
  width: 3px;
  border-radius: 3px;
  background: var(--grad-hero);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

#articles article:hover {
  transform: translateY(-3px);
  background: var(--surface);
  border-color: rgba(242, 101, 34, 0.35);
  box-shadow: var(--shadow-md);
}

#articles article:hover::before {
  opacity: 1;
}

#articles article h3 {
  margin-bottom: 0.35em;
}

#articles article h3 + p {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

#articles article p {
  font-size: 0.95rem;
}

#articles article a {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand);
  transition: transform 0.25s var(--ease), color 0.25s var(--ease);
}

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

#articles article a:hover {
  color: var(--brand-dark);
  transform: translateX(3px);
}

/* ---------- FAQ ---------- */

#faq details {
  margin-bottom: 0.75rem;
  padding: 0.85rem 1.15rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#faq details:hover {
  border-color: rgba(242, 101, 34, 0.35);
  box-shadow: var(--shadow-sm);
}

#faq details[open] {
  background: var(--surface);
  border-color: rgba(242, 101, 34, 0.4);
  box-shadow: var(--shadow-md);
}

#faq summary {
  position: relative;
  padding-right: 2rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: color 0.25s var(--ease);
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1.6rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 50%;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

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

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

#faq details p {
  margin: 0.75rem 0 0.2rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  font-size: 0.95rem;
}

/* ---------- HowTo ---------- */

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

#howto ol li {
  position: relative;
  padding: 0.85rem 1rem 0.85rem 3.2rem;
  margin-bottom: 0.6rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  counter-increment: step;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.8rem;
  height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-hero);
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(242, 101, 34, 0.3);
}

#howto ol li:hover {
  transform: translateX(4px);
  border-color: rgba(242, 101, 34, 0.35);
  box-shadow: var(--shadow-sm);
}

/* ---------- Contact ---------- */

#contact address {
  font-style: normal;
  padding: 1.2rem 1.4rem;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

#contact address p {
  margin: 0 0 0.4em;
  font-size: 0.95rem;
}

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

/* ---------- Sitemap ---------- */

#sitemap ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

#sitemap li {
  margin: 0;
}

#sitemap a {
  display: block;
  padding: 0.6rem 0.9rem;
  font-size: 0.92rem;
  color: var(--text-soft);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

#sitemap a:hover {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: rgba(242, 101, 34, 0.35);
  transform: translateY(-2px);
}

/* ---------- Footer ---------- */

footer {
  position: relative;
  margin-top: 2rem;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2.5rem) 2rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

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

footer > section {
  max-width: var(--maxw);
  margin: 0 auto 1.8rem;
}

footer h2 {
  font-size: 1.1rem;
  padding-bottom: 0.4em;
}

footer h2::after {
  width: 36px;
  height: 3px;
}

footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  list-style: none;
  padding: 0;
}

footer li {
  margin: 0;
}

footer ul a {
  color: var(--text-soft);
  font-size: 0.92rem;
  transition: color 0.25s var(--ease);
}

footer ul a:hover {
  color: var(--brand);
}

footer section[aria-labelledby="legal-title"] p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5em;
}

footer section[aria-labelledby="legal-title"] p:last-child {
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  header {
    justify-content: space-between;
  }

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

  header nav ul {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  header nav ul::-webkit-scrollbar {
    height: 4px;
  }

  header nav ul::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
  }

  header nav a {
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  header {
    gap: 0.6rem;
    padding: 0.7rem 1rem;
  }

  header .brand a {
    font-size: 1.15rem;
  }

  header .brand p {
    font-size: 0.7rem;
  }

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

  header form[role="search"] input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  header form[role="search"] button {
    flex: 0 0 auto;
    padding: 0.55rem 0.95rem;
  }

  main > section {
    border-radius: var(--radius-md);
    padding: 1.25rem 1.1rem;
  }

  #hero {
    padding: 1.5rem 1.15rem;
    border-radius: var(--radius-md);
  }

  #hero h1 {
    max-width: none;
  }

  #hero figure {
    padding: 0.5rem;
  }

  #hero > p:last-of-type a {
    display: block;
    text-align: center;
    margin: 0.4rem 0;
  }

  #articles article {
    padding: 1rem 1.1rem;
  }

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

  footer ul {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 380px) {
  #sitemap ul {
    grid-template-columns: 1fr;
  }
}

/* ---------- Print ---------- */

@media print {
  header,
  footer,
  #sitemap,
  form[role="search"] {
    display: none;
  }

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

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