:root {
  --paper: #F5F0E6;
  --paper-deep: #E8E0D0;
  --ink: #1D3557;
  --ink-soft: #3D5575;
  --gold: #FFD700;
  --red: #E63946;
  --glass: rgba(255, 255, 255, 0.55);
  --sand: #C8BFA8;
  --font-heading: Impact, "Arial Black", "PingFang SC", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-body: "Open Sans", "PingFang SC", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Courier New", monospace;
  --container-width: 1200px;
  --radius: 6px;
  --shadow-card: 0 4px 16px rgba(29, 53, 87, 0.08);
  --scroll-progress: 0;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
}

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

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

a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--red);
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 560px) {
  .container {
    padding: 0 16px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  z-index: 2000;
  font-weight: 700;
  font-size: 14px;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
  color: var(--paper);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

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

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

.btn--solid {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn--solid:hover {
  background: var(--ink-soft);
  border-color: var(--ink-soft);
  color: var(--paper);
}

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

.btn--gold:hover {
  background: #F5C400;
  border-color: #F5C400;
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  border-color: var(--sand);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn__arrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1;
  transition: transform 0.2s;
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}

.breadcrumb {
  margin: 0 0 28px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.breadcrumb__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.breadcrumb__item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
}

.breadcrumb__item::after {
  content: "/";
  color: var(--sand);
}

.breadcrumb__item:last-child::after {
  content: none;
}

.breadcrumb__link {
  color: var(--ink-soft);
}

.breadcrumb__link:hover {
  color: var(--red);
}

.breadcrumb__item[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.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));
}

.card {
  background: var(--paper-deep);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow 0.25s, transform 0.25s;
}

.card:hover {
  box-shadow: 0 8px 28px rgba(29, 53, 87, 0.12);
  transform: translateY(-2px);
}

.card--glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-color: rgba(200, 191, 168, 0.6);
}

.card--flat {
  background: var(--paper);
  border-color: var(--sand);
}

.card--ink {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.card--ink:hover {
  box-shadow: 0 8px 28px rgba(29, 53, 87, 0.25);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  border-radius: 100px;
  background: var(--paper-deep);
  border: 1px solid var(--sand);
  color: var(--ink-soft);
}

.tag--gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  font-weight: 700;
}

.tag--red {
  background: var(--red);
  border-color: var(--red);
  color: #FFFFFF;
  font-weight: 700;
}

.tag--ink {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  font-weight: 700;
}

.chapter {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 40px;
}

.chapter__num {
  font-family: var(--font-mono);
  font-size: 84px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -4px;
}

.chapter__label {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-soft);
  border-left: 4px solid var(--gold);
  padding-left: 16px;
  line-height: 1.4;
}

.section-index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  background: var(--ink);
  border-radius: 3px;
  padding: 3px 10px;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.timeline {
  border-left: 2px solid var(--sand);
  padding-left: 28px;
  margin: 0;
}

.timeline__item {
  position: relative;
  padding-bottom: 28px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -35px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--ink);
}

.timeline__meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.timeline__title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.timeline__desc {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.stat__value {
  font-family: var(--font-mono);
  font-size: 52px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -2px;
}

.stat__label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 4px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  background: var(--paper);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 560px;
}

.table th,
.table td {
  border-bottom: 1px solid var(--sand);
  padding: 12px 16px;
  text-align: left;
  vertical-align: middle;
}

.table th {
  font-family: var(--font-heading);
  font-weight: 700;
  background: var(--paper-deep);
  color: var(--ink);
  white-space: nowrap;
}

.table td {
  color: var(--ink-soft);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: rgba(255, 215, 0, 0.08);
}

.img-frame {
  position: relative;
  display: block;
  width: 100%;
  background: var(--paper-deep);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-frame::after {
  content: "WK-IMG";
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(245, 240, 230, 0.85);
  background: var(--ink);
  padding: 4px 10px;
  border-radius: 3px;
  pointer-events: none;
}

.site-header {
  position: relative;
  z-index: 50;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 215, 0, 0.07), transparent 70%), var(--paper);
  border-bottom: 1px solid var(--sand);
}

.site-header::before {
  content: "";
  display: block;
  height: 6px;
  background: repeating-linear-gradient(
    -45deg,
    var(--gold) 0px,
    var(--gold) 14px,
    transparent 14px,
    transparent 20px,
    var(--ink) 20px,
    var(--ink) 34px,
    transparent 34px,
    transparent 40px
  );
  border-bottom: 2px solid var(--ink);
}

.site-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--gold) 0px, var(--gold) 220px, var(--red) 220px, var(--red) 240px, transparent 240px);
}

.site-header__masthead {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 0 18px;
  position: relative;
}

.site-header__nav-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
}

.brand:hover {
  color: var(--ink);
}

.brand__mark {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--ink);
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.brand__mark::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  background: var(--red);
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--ink);
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-top: 3px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.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-nav__list {
  display: flex;
  align-items: center;
}

.site-nav__item + .site-nav__item .site-nav__link {
  border-left: 1px solid var(--sand);
}

.site-nav__link {
  display: block;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.site-nav__link:hover {
  color: var(--red);
  background: rgba(255, 215, 0, 0.12);
}

.site-nav__link[aria-current="page"] {
  box-shadow: inset 0 -3px 0 var(--gold);
}

.site-header__cta {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.site-header__cta--mobile {
  display: none;
  align-items: center;
  justify-content: center;
  margin: 12px 16px 16px;
}

.site-footer {
  position: relative;
  background: var(--ink);
  color: rgba(245, 240, 230, 0.8);
  margin-top: 72px;
}

.site-footer::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold) 70%, var(--red) 70%, var(--red) 100%);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 40px;
  padding: 48px 0 40px;
}

.brand--footer .brand__name {
  color: var(--paper);
}

.brand--footer .brand__sub {
  color: rgba(245, 240, 230, 0.55);
}

.site-footer__statement {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(245, 240, 230, 0.65);
  margin-top: 16px;
  max-width: 36em;
}

.site-footer__heading {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.site-footer__links li {
  margin-bottom: 8px;
}

.site-footer__links a {
  color: rgba(245, 240, 230, 0.75);
  font-size: 14px;
  transition: color 0.2s, padding-left 0.2s;
}

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

.site-footer__contact p {
  margin-bottom: 8px;
  font-size: 14px;
  color: rgba(245, 240, 230, 0.75);
  line-height: 1.6;
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 0;
  border-top: 1px solid rgba(200, 191, 168, 0.22);
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(245, 240, 230, 0.5);
}

[data-scroll-progress] {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--red) 60%, var(--ink) 100%);
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: 0 50%;
  z-index: 1000;
  pointer-events: none;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--gold);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

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

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

  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 900px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-header__masthead {
    justify-content: space-between;
    padding: 14px 0 12px;
  }

  .site-header__nav-row {
    display: block;
    padding-bottom: 0;
    border-top: 1px solid var(--sand);
  }

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

  .site-nav {
    display: none;
  }

  .site-nav[data-open] {
    display: block;
    padding-bottom: 12px;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav__item + .site-nav__item .site-nav__link {
    border-left: none;
    border-top: 1px solid var(--sand);
  }

  .site-nav__link {
    padding: 14px 20px;
  }

  .site-nav__link[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--gold);
  }

  .site-header__cta {
    display: none;
  }

  .site-header__cta--mobile {
    display: inline-flex;
  }

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

  .site-footer__brand-col {
    grid-column: 1 / -1;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 560px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .brand__name {
    font-size: 24px;
    letter-spacing: 2px;
  }

  .brand__mark {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .chapter {
    flex-direction: column;
    gap: 4px;
  }

  .chapter__num {
    font-size: 64px;
  }

  .chapter__label {
    border-left: none;
    padding-left: 0;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    padding: 36px 0 28px;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
