:root {
  --gold: #D4AF37;
  --crimson: #8B0000;
  --navy: #1A2C3E;
  --orange: #FF6B35;
  --green: #00C9A7;
  --cream: #F7F1E3;
  --deep-sea: #1E3C5A;
  --gold-grad: linear-gradient(135deg, #F5D76E, #D4AF37);
  --header-width: 280px;
  --font-display: "Ma Shan Zheng", "STKaiti", "KaiTi", "楷体", cursive;
  --font-body: "PingFang SC", "Microsoft YaHei", "Heiti SC", sans-serif;
  --text-main: #1A2C3E;
  --text-muted: #5A6472;
  --bg-body: #F3EBDD;
  --max-width: 1280px;
  --radius: 2px;
  --shadow-soft: 0 8px 24px rgba(26,44,62,.08);
  --shadow-float: 0 16px 32px rgba(26,44,62,.12);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  margin-left: var(--header-width);
  background-color: var(--bg-body);
  background-image:
    radial-gradient(circle at 14% 6%, rgba(212,175,55,.09), transparent 26%),
    radial-gradient(circle at 88% 24%, rgba(0,201,167,.06), transparent 22%);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
}

main {
  display: block;
}

#main-content {
  min-height: 65vh;
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 2000;
  padding: 10px 16px;
  background: var(--gold-grad);
  color: var(--navy);
  font-weight: 600;
  border: 1px solid rgba(139,0,0,.3);
  border-radius: var(--radius);
  transition: top .2s ease;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--header-width);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 0% 12%, rgba(212,175,55,.16), transparent 34%),
    linear-gradient(180deg, #1E3C5A 0%, #152A3C 55%, #0F1E2B 100%);
  border-right: 2px solid rgba(212,175,55,.55);
  color: var(--cream);
}

.site-header__inner {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 28px 20px 20px;
  overflow: hidden;
}

.reading-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  transform: scaleX(0);
  transform-origin: left center;
  z-index: 3;
  pointer-events: none;
  background: transparent;
}

.reading-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #F5D76E, #D4AF37, #FF6B35);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.site-brand__medallion {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.75);
  background: var(--gold-grad);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}

.site-brand__text {
  display: flex;
  flex-direction: column;
}

.site-brand__name {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--gold);
  line-height: 1.1;
  letter-spacing: 1px;
}

.site-brand__sub {
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(247,241,227,.78);
  margin-top: 4px;
}

.site-header__version {
  align-self: flex-start;
  margin-top: 24px;
  padding: 5px 12px;
  border: 1px solid rgba(0,201,167,.65);
  background: rgba(0,201,167,.08);
  color: var(--green);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
}

.site-nav {
  margin-top: 22px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(212,175,55,.5) transparent;
}

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-nav__item {
  margin: 0;
}

.site-nav__link {
  display: block;
  padding: 13px 16px;
  color: rgba(247,241,227,.82);
  font-size: 16px;
  line-height: 1.4;
  border-left: 4px solid transparent;
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: background-color .2s, color .2s, border-color .2s;
}

.site-nav__link:hover {
  color: var(--gold);
  background: rgba(212,175,55,.1);
  border-left-color: var(--gold);
}

.site-nav__link[aria-current="page"] {
  color: var(--gold);
  font-weight: 700;
  background: linear-gradient(90deg, rgba(212,175,55,.2), rgba(212,175,55,.04));
  border-left-color: var(--gold);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 8px 10px;
  border: 1px solid rgba(212,175,55,.55);
  background: rgba(212,175,55,.08);
  color: var(--cream);
  font-size: 14px;
  line-height: 1;
}

.nav-toggle__box {
  position: relative;
  width: 22px;
  height: 16px;
}

.nav-toggle__bar {
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--gold);
  transition: transform .25s ease, opacity .25s ease;
}

.nav-toggle__bar:nth-child(1) {
  top: 0;
}

.nav-toggle__bar:nth-child(2) {
  top: 7px;
}

.nav-toggle__bar:nth-child(3) {
  top: 14px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  background: linear-gradient(180deg, #1A2C3E 0%, #0F1E2B 100%);
  color: rgba(247,241,227,.85);
  border-top: 4px solid var(--gold);
}

.site-footer__wave {
  height: 24px;
  background: var(--gold-grad);
  clip-path: polygon(0 0, 100% 20%, 100% 100%, 0 100%);
  opacity: .85;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.3fr;
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px clamp(20px, 4vw, 48px) 32px;
}

.site-footer__heading {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--gold);
  letter-spacing: 1px;
  margin: 0 0 16px;
}

.site-footer__links,
.site-footer__column ul {
  display: grid;
  gap: 8px;
}

.site-footer__links a,
.site-footer__column ul a {
  color: rgba(247,241,227,.8);
  transition: color .2s, padding-left .2s;
}

.site-footer__links a:hover,
.site-footer__column ul a:hover {
  color: var(--gold);
  padding-left: 4px;
}

.site-footer__brand .site-brand__name {
  font-size: 24px;
}

.site-footer__statement,
.site-footer__trust {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(247,241,227,.7);
  margin: 16px 0 0;
}

.site-footer__trust {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(212,175,55,.25);
}

.site-footer__contact-line {
  margin: 8px 0;
  font-size: 14px;
  color: rgba(247,241,227,.8);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  padding: 16px clamp(20px, 4vw, 48px);
  border-top: 1px solid rgba(212,175,55,.25);
  font-size: 13px;
  color: rgba(247,241,227,.65);
}

.site-footer__copyright,
.site-footer__icp {
  margin: 0;
}

.site-brand--footer {
  gap: 14px;
}

.site-brand--footer .site-brand__medallion {
  width: 52px;
  height: 52px;
  font-size: 30px;
}

.site-brand--footer .site-brand__name {
  font-size: 26px;
}

.site-brand--footer .site-brand__sub {
  font-size: 12px;
  letter-spacing: 4px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

.section {
  padding-block: clamp(56px, 8vw, 96px);
}

.section + .section {
  padding-top: 0;
}

.section--navy {
  background: var(--navy);
  color: var(--cream);
}

.section--creamy {
  background: var(--cream);
}

.section__header {
  max-width: 760px;
  margin-bottom: 32px;
}

.section__title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.18;
  color: var(--navy);
}

.section--navy .section__title {
  color: var(--gold);
}

.section__lead {
  margin: 0;
  font-size: 18px;
  color: var(--text-muted);
}

.section--navy .section__lead {
  color: rgba(247,241,227,.8);
}

.page-heading {
  padding: clamp(48px, 8vw, 88px) 0 32px;
  border-bottom: 2px solid rgba(212,175,55,.4);
}

.page-heading__eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--crimson);
}

.page-heading__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.12;
  color: var(--navy);
}

.page-heading__subtitle {
  margin-top: 12px;
  font-size: 18px;
  color: var(--text-muted);
  max-width: 72ch;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: linear-gradient(135deg, #F5D76E, #D4AF37);
  color: var(--navy);
  border-color: rgba(212,175,55,.8);
  box-shadow: 0 6px 0 rgba(139,0,0,.12);
}

.btn--primary:hover {
  background: linear-gradient(135deg, #FFDF8A, #E6BE3E);
}

.btn--outline {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

.btn--outline:hover {
  background: rgba(212,175,55,.1);
  color: #E6BE3E;
}

.btn--ghost {
  background: rgba(212,175,55,.08);
  color: var(--cream);
  border-color: rgba(247,241,227,.35);
}

.btn--ghost:hover {
  background: rgba(212,175,55,.16);
  color: var(--gold);
}

.card {
  background: var(--cream);
  border: 1px solid rgba(139,0,0,.08);
  border-left: 6px solid var(--gold);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  transition: transform .25s, box-shadow .25s, border-left-color .25s;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-float);
  border-left-color: var(--crimson);
}

.card--navy {
  background: var(--navy);
  color: var(--cream);
}

.card--accent {
  background: linear-gradient(135deg, #F5D76E, #D4AF37);
  color: var(--navy);
  border-left-color: var(--crimson);
}

.card__title {
  font-family: var(--font-display);
  font-size: 26px;
  margin: 0 0 8px;
}

.card__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}

.card__meta {
  font-size: 13px;
  color: var(--crimson);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(0,201,167,.1);
  border: 1px solid rgba(0,201,167,.5);
  color: #007F6B;
  font-size: 13px;
  font-weight: 600;
}

.badge--gold {
  background: rgba(212,175,55,.14);
  border-color: rgba(212,175,55,.6);
  color: #8B6C00;
}

.badge--red {
  background: rgba(139,0,0,.08);
  border-color: rgba(139,0,0,.25);
  color: var(--crimson);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
}

.stat {
  padding: 20px;
  background: rgba(247,241,227,.85);
  border-top: 4px solid var(--gold);
  text-align: center;
}

.stat__number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  background: linear-gradient(135deg, #D4AF37, #8B0000);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat__label {
  display: block;
  font-size: 14px;
  margin-top: 6px;
  color: var(--text-muted);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 16px 0;
  font-size: 14px;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--crimson);
  font-weight: 500;
}

.breadcrumb a:hover {
  color: var(--gold);
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  color: rgba(26,44,62,.3);
}

.prose {
  font-size: 17px;
  line-height: 1.85;
  color: #263238;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 32px;
  margin: 1.5em 0 .5em;
}

.prose h3 {
  font-size: 24px;
  margin: 1.4em 0 .4em;
}

.prose p {
  margin: 0 0 1.2em;
}

.prose ul {
  padding-left: 1.2em;
  list-style: disc;
  margin-bottom: 1.2em;
}

.prose li {
  margin-bottom: .4em;
}

.timeline {
  position: relative;
  margin: 32px 0;
  padding-left: 22px;
  border-left: 2px solid rgba(212,175,55,.45);
}

.timeline__item {
  position: relative;
  padding: 0 0 32px 24px;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold-grad);
  border: 3px solid var(--cream);
  box-shadow: 0 0 0 2px var(--gold);
}

.timeline__date {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--crimson);
}

.timeline__title {
  margin: .2em 0 .4em;
  font-size: 20px;
  color: var(--navy);
}

.timeline__text {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.path-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  counter-reset: path-step;
}

.path-step {
  position: relative;
  padding: 26px 22px 22px;
  background: var(--cream);
  border: 1px solid rgba(139,0,0,.08);
  border-top: 6px solid var(--gold);
  border-radius: 50% 4px 50% 4px;
  box-shadow: var(--shadow-soft);
}

.path-step::before {
  counter-increment: path-step;
  content: counter(path-step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
  color: rgba(212,175,55,.35);
}

.path-step__title {
  margin: .6em 0 .2em;
  font-size: 18px;
  color: var(--navy);
}

.path-step__text {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.divider {
  height: 2px;
  border: 0;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin: 32px 0;
}

.media {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #F5D76E 0%, #D4AF37 60%, #B98A2F 100%);
  border: 1px solid rgba(212,175,55,.4);
}

.media::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}

.media--portrait::before {
  padding-top: 130%;
}

.media--square::before {
  padding-top: 100%;
}

.media__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: rgba(26,44,62,.62);
  font-size: 14px;
  letter-spacing: 2px;
  text-align: center;
}

@media (min-width: 901px) and (max-width: 1199px) {
  :root {
    --header-width: 236px;
  }
}

@media (max-width: 900px) {
  body {
    margin-left: 0;
    padding-top: 64px;
  }

  .site-header {
    inset: 0 0 auto 0;
    width: auto;
    height: 64px;
    display: block;
    border-right: 0;
    border-bottom: 2px solid rgba(212,175,55,.6);
    overflow: visible;
  }

  .site-header__inner {
    flex-direction: row;
    align-items: center;
    height: 64px;
    padding: 0 16px;
    overflow: visible;
  }

  .site-brand__medallion {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

  .site-brand__name {
    font-size: 18px;
  }

  .site-brand__sub {
    font-size: 10px;
    letter-spacing: 2px;
  }

  .site-header__version {
    margin: 0 0 0 auto;
    padding: 4px 8px;
    font-size: 12px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    width: min(82vw, 340px);
    margin-top: 0;
    padding: 24px 20px;
    background: linear-gradient(180deg, #162B3F, #0F1E2B);
    border-right: 2px solid rgba(212,175,55,.4);
    box-shadow: 6px 0 24px rgba(0,0,0,.4);
    transform: translateX(-105%);
    transition: transform .3s ease;
    overflow-y: auto;
    z-index: 1000;
  }

  .site-nav[data-open] {
    transform: translateX(0);
  }

  .site-nav__list {
    gap: 4px;
  }

  .site-nav__link {
    font-size: 18px;
    padding: 14px 16px;
  }

  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .site-header__version {
    display: none;
  }

  .nav-toggle__label {
    display: none;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    padding-top: 32px;
  }

  .site-footer__bottom {
    flex-direction: column;
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .page-heading__title {
    font-size: 38px;
  }
}

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

  html {
    scroll-behavior: auto;
  }

  .site-nav {
    transition: none;
  }

  .reading-progress {
    transition: none;
  }
}
