:root {
  --lemon: #F5C518;
  --lemon-deep: #E0A800;
  --lemon-soft: #FFF3C4;
  --sour: #A8D84A;
  --sour-deep: #7FB32A;
  --ink: #1E2430;
  --ink-soft: #4A5468;
  --ink-mute: #7A8496;
  --bg: #FFFDF6;
  --bg-alt: #FFF8E1;
  --card: #FFFFFF;
  --card-glass: rgba(255, 255, 255, 0.62);
  --border: rgba(30, 36, 48, 0.08);
  --border-strong: rgba(30, 36, 48, 0.14);
  --shadow-sm: 0 2px 8px rgba(30, 36, 48, 0.06);
  --shadow-md: 0 10px 30px rgba(30, 36, 48, 0.10);
  --shadow-lg: 0 24px 60px rgba(30, 36, 48, 0.16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --grad-hero: linear-gradient(135deg, #FFF6D6 0%, #FFE99B 32%, #F5C518 68%, #C9E86B 100%);
  --grad-accent: linear-gradient(120deg, #F5C518 0%, #A8D84A 100%);
  --grad-text: linear-gradient(120deg, #E0A800 0%, #7FB32A 100%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F2F4F8;
    --ink-soft: #C3CAD8;
    --ink-mute: #8E98AB;
    --bg: #12161E;
    --bg-alt: #171C26;
    --card: #1B212C;
    --card-glass: rgba(27, 33, 44, 0.62);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --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 24px 60px rgba(0, 0, 0, 0.55);
    --grad-hero: linear-gradient(135deg, #232A18 0%, #33301A 34%, #4A3F12 66%, #2A3A1A 100%);
    --grad-text: linear-gradient(120deg, #F5C518 0%, #A8D84A 100%);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 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.8;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 197, 24, 0.16), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(168, 216, 74, 0.14), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(245, 197, 24, 0.10), transparent 55%);
}

::selection {
  background: var(--lemon);
  color: #1E2430;
}

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

a:hover {
  color: var(--sour-deep);
}

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

h1 {
  font-size: clamp(1.75rem, 4.2vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.4rem, 2.8vw, 2.05rem);
  position: relative;
  padding-bottom: 0.55em;
}

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

h3 {
  font-size: clamp(1.1rem, 1.9vw, 1.35rem);
  color: var(--ink);
}

h4 {
  font-size: 1.02rem;
  color: var(--ink-soft);
}

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

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

li {
  margin-bottom: 0.35em;
}

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

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

time {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}

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

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

/* ============ Header ============ */
header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card-glass);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border), 0 8px 24px rgba(30, 36, 48, 0.04);
}

.brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 22px;
}

.brand-logo {
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
  transition: transform 0.35s var(--ease), filter 0.35s var(--ease);
}

.brand-logo:hover {
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.08);
}

.brand-slogan {
  font-size: 0.86rem;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

nav[aria-label="主导航"] {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px;
}

nav[aria-label="主导航"] ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0 0 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

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

nav[aria-label="主导航"] a {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background 0.28s var(--ease), color 0.28s var(--ease), transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

nav[aria-label="主导航"] a:hover,
nav[aria-label="主导航"] a:focus-visible {
  color: var(--ink);
  background: var(--lemon-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  outline: none;
}

@media (prefers-color-scheme: dark) {
  nav[aria-label="主导航"] a:hover,
  nav[aria-label="主导航"] a:focus-visible {
    background: rgba(245, 197, 24, 0.16);
    color: var(--lemon);
  }
}

/* ============ Main layout ============ */
main[role="main"] {
  display: block;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px 60px;
}

main section {
  position: relative;
  margin: 0 0 34px;
  padding: 34px 30px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.45s var(--ease), transform 0.45s var(--ease), border-color 0.45s var(--ease);
  animation: rise 0.7s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% cover 26%;
}

main section:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

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

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

main section:target {
  border-color: var(--lemon);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.22), var(--shadow-md);
}

/* ============ Hero ============ */
#hero {
  margin-top: 26px;
  padding: clamp(38px, 6vw, 76px) clamp(24px, 4.5vw, 56px);
  background: var(--grad-hero);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55), transparent 68%);
  filter: blur(2px);
  z-index: -1;
  animation: floaty 12s ease-in-out infinite alternate;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -46% -14%;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 216, 74, 0.42), transparent 70%);
  filter: blur(6px);
  z-index: -1;
  animation: floaty 15s ease-in-out infinite alternate-reverse;
}

@keyframes floaty {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-18px, 22px, 0) scale(1.08); }
}

#hero h1 {
  max-width: 20em;
  color: #2A2410;
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.35);
}

#hero p {
  max-width: 62ch;
  color: #3D3618;
  font-size: 1.02rem;
}

#hero p:last-of-type {
  margin-bottom: 0;
}

@media (prefers-color-scheme: dark) {
  #hero {
    border-color: rgba(245, 197, 24, 0.22);
  }
  #hero h1 {
    color: var(--lemon);
    text-shadow: 0 2px 22px rgba(0, 0, 0, 0.5);
  }
  #hero p {
    color: var(--ink-soft);
  }
}

/* ============ Inner headings & blocks ============ */
section > h3 {
  margin-top: 1.6em;
  padding-left: 16px;
  border-left: 5px solid var(--lemon);
  border-radius: 2px;
}

section > h3:first-of-type {
  margin-top: 0.4em;
}

section > h4 {
  margin-top: 1.4em;
  padding: 4px 0 4px 14px;
  border-left: 3px solid var(--sour);
  border-radius: 2px;
}

/* ============ Cards for articles / news ============ */
#news article,
#articles article {
  position: relative;
  margin: 0 0 16px;
  padding: 22px 24px;
  background: var(--card-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}

#news article::before,
#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 4px;
  border-radius: 99px;
  background: var(--grad-accent);
  opacity: 0;
  transform: scaleY(0.4);
  transform-origin: center;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

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

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

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

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

#articles article p a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 6px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #2A2410;
  background: var(--grad-accent);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(245, 197, 24, 0.35);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}

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

#articles article p a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(245, 197, 24, 0.48);
  filter: brightness(1.05);
}

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

/* ============ FAQ ============ */
#faq h3 {
  position: relative;
  margin-top: 1.5em;
  padding: 12px 16px 12px 46px;
  font-size: 1.03rem;
  background: var(--card-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

#faq h3::before {
  content: "Q";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: 0.74rem;
  font-weight: 800;
  color: #2A2410;
  background: var(--grad-accent);
  border-radius: 7px;
}

#faq h3:hover {
  transform: translateX(3px);
  border-color: rgba(245, 197, 24, 0.45);
  box-shadow: var(--shadow-sm);
}

#faq h3 + p {
  margin: 0 0 0.6em;
  padding: 0 16px 0 46px;
}

/* ============ HowTo steps ============ */
#howto h4 {
  position: relative;
  padding: 10px 14px 10px 40px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

#howto h4::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--grad-accent);
  box-shadow: 0 0 0 4px rgba(245, 197, 24, 0.18);
}

#howto h4:hover {
  transform: translateX(3px);
  border-color: rgba(168, 216, 74, 0.5);
}

/* ============ Contact / legal ============ */
#contact p,
#legal p {
  max-width: 78ch;
}

#contact h3 + p {
  padding: 18px 20px;
  background: var(--bg-alt);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  font-size: 0.96rem;
  line-height: 2;
}

/* ============ Sitemap & links lists ============ */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--card-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: transform 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  transform: translateY(-3px);
  color: var(--ink);
  border-color: var(--lemon);
  background: var(--lemon-soft);
  box-shadow: var(--shadow-sm);
}

@media (prefers-color-scheme: dark) {
  #sitemap a:hover,
  #links a:hover {
    background: rgba(245, 197, 24, 0.14);
    color: var(--lemon);
  }
}

/* ============ Footer ============ */
footer[role="contentinfo"] {
  position: relative;
  margin-top: 20px;
  padding: 42px 22px 34px;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(245, 197, 24, 0.10));
  border-top: 1px solid var(--border);
}

footer[role="contentinfo"] p {
  max-width: 900px;
  margin: 0 auto 10px;
  font-size: 0.86rem;
  line-height: 1.9;
  color: var(--ink-mute);
}

footer[role="contentinfo"] p:last-child {
  margin-bottom: 0;
}

footer[role="contentinfo"] a {
  color: var(--lemon-deep);
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}

footer[role="contentinfo"] a:hover {
  color: var(--sour-deep);
  border-bottom-color: currentColor;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  main[role="main"] {
    padding: 0 16px 48px;
  }
  main section {
    padding: 26px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
  }
  #hero {
    padding: 34px 22px;
  }
  .brand-bar {
    padding: 10px 16px;
  }
  nav[aria-label="主导航"] {
    padding: 0 16px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
    line-height: 1.75;
  }
  .brand-bar {
    justify-content: center;
    text-align: center;
    gap: 6px;
  }
  .brand-slogan {
    font-size: 0.78rem;
  }
  nav[aria-label="主导航"] ul {
    flex-wrap: nowrap;
    gap: 2px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  nav[aria-label="主导航"] a {
    padding: 6px 11px;
    font-size: 0.84rem;
  }
  main section {
    padding: 22px 16px;
    border-radius: var(--radius);
  }
  #hero {
    margin-top: 16px;
    padding: 28px 18px;
  }
  #hero p {
    font-size: 0.96rem;
  }
  h2::after {
    width: 42px;
    height: 4px;
  }
  section > h3 {
    padding-left: 12px;
    border-left-width: 4px;
  }
  #news article,
  #articles article {
    padding: 18px 16px;
  }
  #faq h3 {
    padding: 10px 12px 10px 42px;
    font-size: 0.98rem;
  }
  #faq h3 + p {
    padding: 0 12px 0 42px;
  }
  blockquote {
    padding: 14px 16px;
  }
  footer[role="contentinfo"] {
    padding: 32px 16px 26px;
  }
}

@media (max-width: 380px) {
  nav[aria-label="主导航"] a {
    padding: 5px 9px;
    font-size: 0.8rem;
  }
  main section {
    padding: 18px 13px;
  }
}

/* ============ Motion preferences ============ */
@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;
  }
}

/* ============ Focus visibility ============ */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--lemon);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============ Print ============ */
@media print {
  header[role="banner"],
  footer[role="contentinfo"] {
    position: static;
    box-shadow: none;
  }
  body::before,
  #hero::before,
  #hero::after {
    display: none;
  }
  main section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}