:root {
  --brand: #e8542a;
  --brand-2: #f5a623;
  --brand-3: #ffd25e;
  --brand-soft: rgba(232, 84, 42, 0.12);
  --bg: #f7f4ef;
  --bg-2: #fffdf9;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --surface-2: rgba(255, 255, 255, 0.5);
  --text: #1f1b18;
  --text-2: #4a423c;
  --text-3: #7a6f66;
  --border: rgba(31, 27, 24, 0.1);
  --border-strong: rgba(31, 27, 24, 0.18);
  --shadow-sm: 0 2px 8px rgba(60, 40, 20, 0.06);
  --shadow: 0 10px 30px rgba(60, 40, 20, 0.1);
  --shadow-lg: 0 24px 60px rgba(60, 40, 20, 0.16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --blur: saturate(160%) blur(16px);
  --header-h: 68px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #ff6a3d;
    --brand-2: #ffb03a;
    --brand-3: #ffd97a;
    --brand-soft: rgba(255, 106, 61, 0.16);
    --bg: #121014;
    --bg-2: #17141a;
    --surface: rgba(38, 33, 42, 0.62);
    --surface-solid: #1e1a23;
    --surface-2: rgba(48, 42, 54, 0.45);
    --text: #f4efe9;
    --text-2: #cfc6bd;
    --text-3: #9b9089;
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(232, 84, 42, 0.14), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, rgba(245, 166, 35, 0.14), transparent 55%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 40%, var(--bg) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  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-2);
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

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

h1 {
  font-size: clamp(1.7rem, 1.1rem + 2.6vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.35rem, 1rem + 1.4vw, 2rem);
  position: relative;
  padding-left: 18px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 18px rgba(232, 84, 42, 0.5);
}

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

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

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

li {
  margin-bottom: 0.35em;
}

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

blockquote {
  margin: 1.2em 0;
  padding: 18px 22px 18px 26px;
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--brand-soft);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--text);
  font-style: normal;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

blockquote:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

blockquote p {
  margin: 0;
  color: var(--text);
}

figcaption {
  font-size: 0.85rem;
  color: var(--text-3);
  text-align: center;
  margin-top: 10px;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 24px rgba(60, 40, 20, 0.06);
}

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

header > div > a {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

header > div > a::before {
  content: "";
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2) 55%, var(--brand-3));
  box-shadow: 0 6px 16px rgba(232, 84, 42, 0.4);
  flex: none;
}

header > div > a:hover {
  color: var(--brand);
}

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

header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

header nav li {
  margin: 0;
}

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

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

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 20px 40px;
  display: block;
}

main > section,
main > nav {
  margin-bottom: 34px;
}

main > section {
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 1rem + 2vw, 40px);
  box-shadow: var(--shadow-sm);
  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);
  border-color: var(--border-strong);
}

#hero {
  background:
    linear-gradient(135deg, rgba(232, 84, 42, 0.92) 0%, rgba(245, 166, 35, 0.88) 45%, rgba(255, 210, 94, 0.85) 100%),
    var(--surface-solid);
  border: none;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.45), transparent 65%);
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -50% -15%;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 68%);
  pointer-events: none;
}

#hero h1 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(120, 50, 0, 0.25);
  position: relative;
  z-index: 1;
}

#hero p {
  color: rgba(255, 255, 255, 0.94);
  position: relative;
  z-index: 1;
  font-size: 1.02rem;
}

#hero figure {
  margin: 26px 0 0;
  position: relative;
  z-index: 1;
}

#hero figure svg {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(90, 40, 0, 0.35);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}

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

#hero figcaption {
  color: rgba(255, 255, 255, 0.85);
}

main > nav[aria-label="面包屑导航"] {
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 20px;
  box-shadow: var(--shadow-sm);
}

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

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

main > nav[aria-label="面包屑导航"] li + li::before {
  content: "›";
  color: var(--text-3);
  font-size: 1rem;
  line-height: 1;
}

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

#news article,
#articles article {
  background: var(--surface-2);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}

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

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

#news article h3,
#articles article h3 {
  margin-bottom: 0.4em;
  transition: color 0.3s var(--ease);
}

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

#news article p,
#articles article p {
  margin-bottom: 0.5em;
  font-size: 0.96rem;
}

#news article p:nth-of-type(1),
#articles article p:nth-of-type(1) {
  font-size: 0.82rem;
  color: var(--text-3);
  letter-spacing: 0.02em;
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

#news article a,
#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(--brand-soft);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

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

#news article a:hover,
#articles article a:hover {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(232, 84, 42, 0.35);
}

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

#faq details {
  background: var(--surface-2);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 20px;
  margin-bottom: 12px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

#faq details:last-child {
  margin-bottom: 0;
}

#faq details:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

#faq details[open] {
  background: var(--surface-solid);
  border-color: var(--brand);
  box-shadow: var(--shadow);
}

#faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: color 0.3s var(--ease);
}

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

#faq summary::after {
  content: "+";
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1;
  color: var(--brand);
  background: var(--brand-soft);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
}

#faq details[open] summary::after {
  content: "−";
  transform: rotate(180deg);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
}

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

#faq details p {
  margin: 0 0 16px;
  padding-top: 2px;
  border-top: 1px dashed var(--border);
  padding-top: 14px;
  animation: fadeSlide 0.4s var(--ease);
}

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

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 12px 16px 12px 56px;
  margin-bottom: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  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: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 12px rgba(232, 84, 42, 0.35);
}

#howto ol li:hover {
  transform: translateX(4px);
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

#contact ul,
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

#contact ul {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

#contact li {
  margin: 0;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#contact li:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

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

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

#sitemap li a,
#links li a {
  display: block;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.94rem;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

#sitemap li a::before {
  content: "▸ ";
  color: var(--brand);
}

#sitemap li a:hover,
#links li a:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-2px);
}

#author {
  background: linear-gradient(135deg, var(--brand-soft), transparent 70%), var(--surface);
}

footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 50px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

footer > section {
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

footer > section:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

footer > section h2 {
  font-size: 1.02rem;
  padding-left: 14px;
  margin-bottom: 0.7em;
}

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

footer > section p {
  font-size: 0.9rem;
  margin: 0;
  color: var(--text-3);
  line-height: 1.7;
}

footer > p {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-3);
  margin: 8px 0 0;
  padding: 20px 16px;
  border-top: 1px solid var(--border);
  line-height: 1.9;
  word-break: break-word;
}

::selection {
  background: var(--brand);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  border-radius: 999px;
  border: 2px solid var(--bg);
}

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

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

@supports (animation-timeline: view()) {
  main > section,
  main > nav,
  #news article,
  #articles article,
  footer > section {
    animation: riseIn linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 55%;
  }
}

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

@media (max-width: 900px) {
  header > div {
    gap: 12px;
    padding: 10px 16px;
  }
  header nav {
    flex-basis: 100%;
  }
  header nav ul {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  header nav ul::-webkit-scrollbar {
    display: none;
  }
  header nav a {
    white-space: nowrap;
    font-size: 0.88rem;
    padding: 7px 12px;
  }
  main {
    padding: 20px 16px 32px;
  }
  main > section,
  main > nav {
    margin-bottom: 24px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
    line-height: 1.7;
  }
  header > div > a {
    font-size: 1.12rem;
  }
  header > div > a::before {
    width: 26px;
    height: 26px;
  }
  main > section {
    border-radius: var(--radius);
  }
  h2 {
    padding-left: 14px;
  }
  h2::before {
    width: 4px;
  }
  #hero figure svg {
    border-radius: var(--radius-sm);
  }
  #contact ul,
  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr;
  }
  footer {
    padding: 0 16px 36px;
    gap: 14px;
  }
  footer > section {
    padding: 18px 18px;
  }
  blockquote {
    padding: 14px 16px 14px 18px;
  }
  #news article,
  #articles article {
    padding: 16px 18px;
  }
  #faq details {
    padding: 2px 16px;
  }
}

@media (hover: none) {
  #news article:hover,
  #articles article:hover,
  footer > section:hover,
  #howto ol li:hover,
  #contact li:hover,
  #sitemap li a:hover,
  #links li a:hover {
    transform: none;
  }
}