:root {
  --bg: #070d1a;
  --bg-soft: #0b1b3a;
  --bg-elev: rgba(18, 32, 62, 0.72);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.12);
  --text: #e8eefc;
  --text-soft: #a9b6d4;
  --text-dim: #7b8aab;
  --accent: #ff7a18;
  --accent-2: #ff3d6e;
  --accent-3: #2e7bff;
  --accent-grad: linear-gradient(135deg, #ff7a18 0%, #ff3d6e 55%, #7a2eff 100%);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, 0.65);
  --shadow-md: 0 14px 34px -14px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 0 1px rgba(255, 122, 24, 0.25), 0 18px 44px -16px rgba(255, 122, 24, 0.4);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1180px;
  --header-h: 72px;
}

*,
*::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: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1100px 620px at 12% -8%, rgba(46, 123, 255, 0.22), transparent 62%),
    radial-gradient(900px 560px at 92% 4%, rgba(255, 61, 110, 0.16), transparent 60%),
    radial-gradient(760px 520px at 50% 108%, rgba(122, 46, 255, 0.16), transparent 62%);
  background-attachment: fixed;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: #ffb066;
}

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

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

h1 {
  font-size: clamp(1.7rem, 4.2vw, 2.9rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.35rem, 2.8vw, 2rem);
}

h3 {
  font-size: clamp(1.08rem, 1.9vw, 1.35rem);
}

h4 {
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  color: #ffd7b8;
}

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

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

li {
  margin-bottom: 0.45em;
}

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

/* ============ Header ============ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(7, 13, 26, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 40px -24px rgba(0, 0, 0, 0.9);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand svg {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 8px 22px -8px rgba(255, 122, 24, 0.7);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.brand:hover svg {
  transform: rotate(-8deg) scale(1.06);
  box-shadow: 0 12px 30px -8px rgba(255, 122, 24, 0.9);
}

.brand span {
  background: linear-gradient(92deg, #ffffff 10%, #ffc79a 70%, #ff9a5c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

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

#site-header nav li {
  margin: 0;
}

#site-header nav a {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  border: 1px solid transparent;
  transition: color 0.25s var(--ease), background 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

#site-header nav a:hover {
  color: #fff;
  background: var(--glass-strong);
  border-color: var(--border);
  transform: translateY(-2px);
}

/* ============ Layout ============ */
main {
  display: block;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px) 72px;
}

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

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

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

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

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

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

section {
  position: relative;
  margin-top: clamp(28px, 4.5vw, 52px);
  padding: clamp(22px, 3.6vw, 40px);
  background: var(--bg-elev);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  animation: rise-in 0.85s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% cover 28%;
}

section::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.22), transparent 42%, rgba(255, 122, 24, 0.18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.75;
}

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

@supports not (animation-timeline: view()) {
  section {
    animation: rise-in 0.7s var(--ease) both;
  }
}

/* ============ Hero ============ */
#hero {
  margin-top: clamp(16px, 2.5vw, 26px);
  padding: clamp(26px, 4.4vw, 56px);
  background:
    linear-gradient(135deg, rgba(255, 122, 24, 0.16) 0%, rgba(255, 61, 110, 0.12) 40%, rgba(46, 123, 255, 0.18) 100%),
    radial-gradient(120% 140% at 88% 0%, rgba(122, 46, 255, 0.32), transparent 58%),
    rgba(11, 27, 58, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

#hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -140px;
  top: -180px;
  background: radial-gradient(circle, rgba(255, 122, 24, 0.45), transparent 68%);
  filter: blur(28px);
  pointer-events: none;
  animation: float-glow 9s ease-in-out infinite alternate;
}

@keyframes float-glow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.75;
  }
  to {
    transform: translate3d(-24px, 30px, 0) scale(1.12);
    opacity: 1;
  }
}

#hero h1 {
  max-width: 20ch;
  background: linear-gradient(100deg, #ffffff 0%, #ffd9bd 48%, #ff9a5c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 12px 40px rgba(255, 122, 24, 0.18);
}

#hero p {
  max-width: 74ch;
  font-size: clamp(0.95rem, 1.3vw, 1.06rem);
  color: #c9d5ee;
}

#hero figure {
  position: relative;
  margin: 26px 0 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-md);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}

#hero figure:hover {
  transform: translateY(-6px) scale(1.006);
  box-shadow: 0 30px 70px -22px rgba(255, 122, 24, 0.4);
}

#hero figure svg {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

#hero figcaption {
  padding: 12px 18px;
  font-size: 0.85rem;
  color: var(--text-soft);
  background: rgba(7, 13, 26, 0.6);
  border-top: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

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

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

#news article:hover,
#articles article:hover {
  transform: translateY(-5px);
  background: var(--glass-strong);
  border-color: rgba(255, 122, 24, 0.45);
  box-shadow: var(--shadow-glow);
}

#news article h3,
#articles article h3 {
  margin-bottom: 0.35em;
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  transition: color 0.3s var(--ease);
}

#news article:hover h3,
#articles article:hover h3 {
  color: #ffb066;
}

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

#news article p:first-of-type,
#articles article p:first-of-type {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

#news article a,
#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}

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

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

#articles {
  display: block;
}

/* two-column article grid on wide screens */
@media (min-width: 900px) {
  #articles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
  }

  #articles > h2 {
    grid-column: 1 / -1;
  }

  #articles article {
    margin: 0;
    display: flex;
    flex-direction: column;
  }

  #articles article a {
    margin-top: auto;
    padding-top: 8px;
  }
}

/* ============ Blockquote ============ */
blockquote {
  position: relative;
  margin: 0 0 14px;
  padding: 18px 22px 18px 52px;
  font-size: 0.95rem;
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.12), rgba(46, 123, 255, 0.1));
  border: 1px solid rgba(255, 122, 24, 0.28);
  border-radius: var(--radius-md);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}

blockquote::before {
  content: "\201C";
  position: absolute;
  left: 16px;
  top: 2px;
  font-size: 3rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.65;
  font-family: Georgia, "Times New Roman", serif;
}

blockquote:hover {
  transform: translateX(4px);
  border-color: rgba(255, 122, 24, 0.6);
}

/* ============ FAQ (dl) ============ */
#faq dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

#faq dt {
  position: relative;
  padding: 14px 18px 14px 44px;
  font-weight: 600;
  color: #fff;
  background: var(--glass-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  cursor: default;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

#faq dt::before {
  content: "Q";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #0b1b3a;
  background: var(--accent-grad);
  border-radius: 6px;
}

#faq dd {
  margin: 0 0 4px;
  padding: 14px 18px 14px 44px;
  font-size: 0.94rem;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

#faq dd::before {
  content: "A";
  position: absolute;
}

#faq dt:hover {
  background: rgba(255, 122, 24, 0.16);
  border-color: rgba(255, 122, 24, 0.45);
}

#faq dt:hover + dd {
  background: rgba(255, 122, 24, 0.06);
  color: #dbe4f7;
}

/* ============ How-to steps ============ */
#howto ol {
  counter-reset: step;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

#howto ol li {
  position: relative;
  counter-increment: step;
  margin: 0;
  padding: 16px 20px 16px 62px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-soft);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease),
    border-color 0.35s 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.85rem;
  font-weight: 800;
  color: #fff;
  background: var(--accent-grad);
  border-radius: 9px;
  box-shadow: 0 8px 20px -8px rgba(255, 122, 24, 0.8);
}

#howto ol li:hover {
  transform: translateX(5px);
  background: var(--glass-strong);
  border-color: rgba(255, 122, 24, 0.4);
}

/* ============ Contact & sitemap & links ============ */
#contact p {
  margin-bottom: 0.55em;
  font-size: 0.95rem;
}

#contact p:first-of-type,
#contact p:nth-of-type(2) {
  color: var(--text);
  font-weight: 600;
}

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

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.88rem;
  color: var(--text-soft);
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: transform 0.3s var(--ease), color 0.3s var(--ease),
    background 0.3s var(--ease), border-color 0.3s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  transform: translateY(-3px);
  color: #fff;
  background: rgba(255, 122, 24, 0.18);
  border-color: rgba(255, 122, 24, 0.55);
}

#privacy p,
#disclaimer p,
#copyright p {
  font-size: 0.92rem;
  color: var(--text-soft);
}

/* ============ Footer ============ */
footer {
  position: relative;
  margin-top: 40px;
  padding: 42px clamp(16px, 4vw, 40px) 54px;
  text-align: center;
  background: linear-gradient(180deg, rgba(11, 27, 58, 0.35), rgba(7, 13, 26, 0.9));
  border-top: 1px solid var(--border);
}

footer p {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--text-dim);
}

footer p:first-child {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.03em;
}

footer a {
  color: var(--text-soft);
}

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

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  #site-header {
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  #site-header nav {
    flex-basis: 100%;
  }

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

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

  #site-header nav ul::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
  }

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

@media (max-width: 720px) {
  :root {
    --radius-xl: 22px;
    --radius-lg: 16px;
  }

  body {
    font-size: 15px;
    line-height: 1.72;
  }

  main {
    padding-bottom: 48px;
  }

  section {
    margin-top: 22px;
    padding: 20px 18px;
  }

  #hero {
    padding: 24px 18px;
  }

  #hero h1 {
    max-width: none;
  }

  #hero figure svg {
    aspect-ratio: 16 / 10;
  }

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

  #faq dt,
  #faq dd {
    padding-left: 40px;
    font-size: 0.92rem;
  }

  #howto ol li {
    padding: 14px 16px 14px 56px;
  }

  blockquote {
    padding: 16px 16px 16px 46px;
  }

  #sitemap a,
  #links a {
    padding: 7px 13px;
    font-size: 0.84rem;
  }
}

@media (max-width: 420px) {
  .brand {
    font-size: 1.04rem;
  }

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

  #site-header nav a {
    padding: 6px 10px;
    font-size: 0.84rem;
  }
}

/* ============ Light mode ============ */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f6fc;
    --bg-soft: #ffffff;
    --bg-elev: rgba(255, 255, 255, 0.82);
    --glass: rgba(11, 27, 58, 0.04);
    --glass-strong: rgba(11, 27, 58, 0.07);
    --border: rgba(11, 27, 58, 0.12);
    --text: #16233c;
    --text-soft: #43526e;
    --text-dim: #6c7b96;
    --shadow-lg: 0 24px 60px -26px rgba(16, 34, 66, 0.35);
    --shadow-md: 0 14px 34px -18px rgba(16, 34, 66, 0.3);
    --shadow-glow: 0 0 0 1px rgba(255, 122, 24, 0.3), 0 18px 44px -20px rgba(255, 122, 24, 0.45);
  }

  body {
    background-image:
      radial-gradient(1100px 620px at 12% -8%, rgba(46, 123, 255, 0.16), transparent 62%),
      radial-gradient(900px 560px at 92% 4%, rgba(255, 61, 110, 0.1), transparent 60%),
      radial-gradient(760px 520px at 50% 108%, rgba(122, 46, 255, 0.1), transparent 62%);
  }

  h1,
  h2,
  h3 {
    color: #0d1830;
  }

  h4 {
    color: #b35200;
  }

  #site-header {
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 40px -28px rgba(16, 34, 66, 0.5);
  }

  .brand span {
    background: linear-gradient(92deg, #0d1830 10%, #b35200 70%, #ff7a18 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  #site-header nav a:hover {
    color: #0d1830;
  }

  #hero {
    background:
      linear-gradient(135deg, rgba(255, 122, 24, 0.14) 0%, rgba(255, 61, 110, 0.1) 40%, rgba(46, 123, 255, 0.14) 100%),
      radial-gradient(120% 140% at 88% 0%, rgba(122, 46, 255, 0.18), transparent 58%),
      rgba(255, 255, 255, 0.9);
    border-color: rgba(11, 27, 58, 0.12);
  }

  #hero h1 {
    background: linear-gradient(100deg, #0d1830 0%, #b35200 55%, #ff7a18 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  #hero p {
    color: #33425e;
  }

  #hero figcaption {
    background: rgba(255, 255, 255, 0.75);
    color: var(--text-soft);
  }

  #faq dt {
    color: #0d1830;
  }

  #faq dd {
    background: rgba(11, 27, 58, 0.02);
  }

  #faq dt:hover + dd {
    color: #16233c;
  }

  blockquote {
    color: #16233c;
  }

  footer {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(243, 246, 252, 0.95));
  }
}

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

  section {
    opacity: 1;
    transform: none;
  }
}

/* ============ Print ============ */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  #site-header,
  footer,
  #sitemap,
  #links {
    display: none;
  }

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