/* ==========================================================================
   微乐官网 · 共享样式 /assets/site.css
   轨道档案控制台：堆叠面板 + 刻度线 + 双层头部
   ========================================================================== */

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

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

:root {
  --wk-ink: #10161F;
  --wk-slate: #1B2733;
  --wk-base: #E8EDF2;
  --wk-cream: #F5F1EA;
  --wk-mist: #D3DEE8;
  --wk-blue: #7FB2C9;
  --wk-cyan: #17C3B2;
  --wk-cyan-deep: #0E7C8E;
  --wk-coral: #FF7A59;
  --wk-gray: #6B7A88;
  --wk-gold: #C9B48A;

  --wk-font-head: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --wk-font-body: "Songti SC", "SimSun", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --wk-font-mono: "SFMono-Regular", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;

  --wk-shell: 1200px;
  --wk-gutter: 24px;
  --wk-bw: 2px;
  --wk-shadow: 6px 6px 0 rgba(16, 22, 31, 0.16);
  --wk-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (max-width: 600px) {
  :root { --wk-gutter: 16px; }
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--wk-font-body);
  font-size: 17px;
  line-height: 1.85;
  color: var(--wk-ink);
  background-color: var(--wk-base);
  background-image: linear-gradient(180deg, #EEF3F7 0%, #E8EDF2 38%, #E1E8EF 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; }

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

ul, ol { margin: 0; padding: 0; }

h1, h2, h3, h4, p { margin: 0; }

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

:focus-visible {
  outline: 2px solid var(--wk-cyan);
  outline-offset: 2px;
}

#main-content { scroll-margin-top: 132px; }

/* ---------- 容器与骨架 ---------- */

.wk-shell {
  width: 100%;
  max-width: var(--wk-shell);
  margin-inline: auto;
  padding-inline: var(--wk-gutter);
}

.wk-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.wk-section { padding: 64px 0; }

.wk-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  padding-bottom: 14px;
  margin-bottom: 28px;
  border-bottom: var(--wk-bw) solid var(--wk-ink);
}

.wk-section__code {
  font-family: var(--wk-font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--wk-ink);
  background: var(--wk-blue);
  border: var(--wk-bw) solid var(--wk-ink);
  padding: 3px 10px;
  line-height: 1.5;
  white-space: nowrap;
}

.wk-section__goal {
  margin-left: auto;
  font-family: var(--wk-font-head);
  font-size: 14px;
  line-height: 1.6;
  color: var(--wk-gray);
  max-width: 42ch;
}

/* ---------- 排版 ---------- */

.wk-h1 {
  font-family: var(--wk-font-head);
  font-size: clamp(1.9rem, 4.4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.22;
}

.wk-h2 {
  font-family: var(--wk-font-head);
  font-size: clamp(1.45rem, 2.8vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.28;
}

.wk-h3 {
  font-family: var(--wk-font-head);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.wk-lead {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #23303C;
}

.wk-text {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #23303C;
  max-width: 40em;
}

.wk-text + .wk-text { margin-top: 1.2em; }

.wk-text a,
.wk-lead a {
  color: var(--wk-cyan-deep);
  border-bottom: 1px solid rgba(23, 195, 178, 0.55);
}

.wk-text a:hover,
.wk-lead a:hover { border-bottom-color: var(--wk-cyan-deep); }

.wk-mono {
  font-family: var(--wk-font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.wk-idx {
  font-family: var(--wk-font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--wk-gray);
}

/* ---------- 面板 ---------- */

.wk-panel {
  position: relative;
  background: var(--wk-cream);
  border: var(--wk-bw) solid var(--wk-ink);
  box-shadow: 8px 8px 0 rgba(16, 22, 31, 0.14);
  padding: 32px;
}

.wk-panel--mist { background: var(--wk-base); }

.wk-panel--deep {
  background: var(--wk-slate);
  border-color: #050A10;
  color: #D9E4EC;
  box-shadow: 8px 8px 0 rgba(5, 10, 16, 0.4);
}

.wk-panel--deep .wk-h2,
.wk-panel--deep .wk-h3,
.wk-panel--deep .wk-h1 { color: #F2F6FA; }

.wk-panel--tight { padding: 20px; }

.wk-tick {
  height: 12px;
  border-bottom: 1px solid rgba(201, 180, 138, 0.55);
  background-image: repeating-linear-gradient(90deg, var(--wk-gold) 0 1px, transparent 1px 14px);
}

/* ---------- 标签 ---------- */

.wk-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border: 1px solid var(--wk-gold);
  background: rgba(201, 180, 138, 0.14);
  font-family: var(--wk-font-mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.06em;
  color: #5A4D33;
  white-space: nowrap;
}

.wk-tag--alert {
  border-color: var(--wk-coral);
  background: rgba(255, 122, 89, 0.14);
  color: #A83812;
}

/* ---------- 按钮 ---------- */

.wk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: var(--wk-bw) solid var(--wk-ink);
  background: var(--wk-cream);
  color: var(--wk-ink);
  font-family: var(--wk-font-head);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 3px 3px 0 rgba(16, 22, 31, 0.2);
  transition: transform 0.18s var(--wk-ease), box-shadow 0.18s var(--wk-ease), background-color 0.18s var(--wk-ease);
}

.wk-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 rgba(16, 22, 31, 0.2);
}

.wk-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 rgba(16, 22, 31, 0.2);
}

.wk-btn--primary { background: var(--wk-cyan); }
.wk-btn--primary:hover { background: #14B2A2; }
.wk-btn--ghost { background: transparent; }

.wk-btn--dark {
  background: var(--wk-ink);
  color: var(--wk-cream);
  box-shadow: 3px 3px 0 rgba(127, 178, 201, 0.55);
}

.wk-btn--dark:hover { background: #182230; }

/* ---------- 面包屑 ---------- */

.wk-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--wk-font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--wk-gray);
}

.wk-crumbs a {
  color: var(--wk-gray);
  border-bottom: 1px solid rgba(107, 122, 136, 0.45);
}

.wk-crumbs a:hover {
  color: var(--wk-ink);
  border-bottom-color: var(--wk-cyan);
}

.wk-crumbs [aria-current="page"] {
  color: var(--wk-ink);
  border-bottom: 0;
}

/* ---------- 图片容器 ---------- */

.wk-media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: var(--wk-bw) solid var(--wk-ink);
  background-color: var(--wk-mist);
  background-image: linear-gradient(135deg, var(--wk-mist) 0%, var(--wk-base) 60%, var(--wk-cream) 100%);
  box-shadow: var(--wk-shadow);
}

.wk-media__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wk-media--wide { aspect-ratio: 21 / 9; }
.wk-media--16x9 { aspect-ratio: 16 / 9; }
.wk-media--4x3 { aspect-ratio: 4 / 3; }
.wk-media--square { aspect-ratio: 1 / 1; }

.wk-media__caption {
  margin-top: 10px;
  font-family: var(--wk-font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--wk-gray);
}

/* ---------- 折叠组 ---------- */

.wk-fold {
  border: var(--wk-bw) solid var(--wk-ink);
  background: var(--wk-cream);
  box-shadow: 4px 4px 0 rgba(16, 22, 31, 0.14);
}

.wk-fold + .wk-fold { margin-top: 12px; }

.wk-fold__trigger {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  font: inherit;
  font-family: var(--wk-font-head);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--wk-ink);
  text-align: left;
  cursor: pointer;
}

.wk-fold__trigger:hover { background: var(--wk-mist); }

.wk-fold__index {
  flex: none;
  font-family: var(--wk-font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--wk-gray);
  padding-top: 3px;
}

.wk-fold__label { flex: 1 1 auto; min-width: 0; }

.wk-fold__icon {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 8px;
}

.wk-fold__icon::before,
.wk-fold__icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 2px;
  background: var(--wk-ink);
  transition: opacity 0.24s var(--wk-ease), background-color 0.24s var(--wk-ease);
}

.wk-fold__icon::after { transform: rotate(90deg); }

.wk-fold[data-open] .wk-fold__icon::before,
.wk-fold[data-open] .wk-fold__icon::after { background: var(--wk-cyan-deep); }

.wk-fold[data-open] .wk-fold__icon::after { opacity: 0; }

.wk-fold__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.24s var(--wk-ease);
}

.wk-fold[data-open] .wk-fold__panel { grid-template-rows: 1fr; }

.wk-fold__inner {
  overflow: hidden;
  min-height: 0;
  padding: 0 18px;
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #23303C;
}

.wk-fold[data-open] .wk-fold__inner { padding-bottom: 18px; }

/* ---------- 显现 ---------- */

.wk-js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--wk-ease), transform 0.5s var(--wk-ease);
}

.wk-js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 跳转链接 ---------- */

.wk-skip {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--wk-ink);
  color: #F5F1EA;
  font-family: var(--wk-font-head);
  font-size: 14px;
  font-weight: 700;
  border: var(--wk-bw) solid var(--wk-cyan);
  transition: top 0.18s var(--wk-ease);
}

.wk-skip:focus { top: 12px; }

/* ==========================================================================
   头部
   ========================================================================== */

.wk-header {
  position: sticky;
  top: 0;
  z-index: 80;
  font-family: var(--wk-font-head);
}

.wk-header__rail {
  background: var(--wk-ink);
  color: #93A7B8;
  border-bottom: 1px solid #25313F;
}

.wk-header__rail-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 34px;
  padding-block: 4px;
}

.wk-rail__meta {
  font-size: 12.5px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.wk-rail__meta--brand { color: #C6D3DE; }

.wk-rail__link {
  margin-left: auto;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--wk-cyan);
  border-bottom: 1px dashed rgba(23, 195, 178, 0.5);
  white-space: nowrap;
}

.wk-rail__link:hover {
  color: #6BE3D7;
  border-bottom-color: #6BE3D7;
}

.wk-header__bar {
  position: relative;
  background: rgba(245, 241, 234, 0.97);
  border-bottom: var(--wk-bw) solid var(--wk-ink);
}

.wk-header__bar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding-block: 10px;
}

.wk-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.wk-brand__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: var(--wk-bw) solid var(--wk-ink);
  background: var(--wk-blue);
  box-shadow: 3px 3px 0 var(--wk-ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  color: var(--wk-ink);
}

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

.wk-brand__name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--wk-ink);
}

.wk-brand__sub {
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--wk-gray);
}

.wk-nav { display: none; }

.wk-header[data-open] .wk-nav {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  max-height: min(64vh, 520px);
  overflow-y: auto;
  background: var(--wk-cream);
  border-bottom: var(--wk-bw) solid var(--wk-ink);
  box-shadow: 0 14px 0 rgba(16, 22, 31, 0.12);
  padding: 6px 0 14px;
}

.wk-nav__list { list-style: none; }

.wk-nav__link {
  display: block;
  padding: 12px var(--wk-gutter);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--wk-ink);
  border-left: 3px solid transparent;
  border-bottom: 1px solid rgba(16, 22, 31, 0.08);
  transition: background-color 0.18s var(--wk-ease), color 0.18s var(--wk-ease), border-color 0.18s var(--wk-ease);
}

.wk-nav__link:hover { background: var(--wk-mist); }

.wk-nav__link[aria-current="page"] {
  border-left-color: var(--wk-cyan);
  background: rgba(23, 195, 178, 0.1);
  font-weight: 700;
}

.wk-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.wk-searchbar {
  display: none;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding: 0 12px;
  border: var(--wk-bw) solid var(--wk-ink);
  background: var(--wk-base);
  box-shadow: 3px 3px 0 rgba(16, 22, 31, 0.14);
  font-family: var(--wk-font-head);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  color: var(--wk-gray);
  white-space: nowrap;
  transition: border-color 0.18s var(--wk-ease), color 0.18s var(--wk-ease);
}

.wk-searchbar:hover {
  border-color: var(--wk-cyan-deep);
  color: var(--wk-ink);
}

.wk-searchbar__icon {
  position: relative;
  flex: none;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.wk-searchbar__icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  height: 2px;
  background: currentColor;
  transform: rotate(45deg);
}

.wk-navtoggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border: var(--wk-bw) solid var(--wk-ink);
  background: var(--wk-cream);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: var(--wk-ink);
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(16, 22, 31, 0.2);
  transition: background-color 0.2s var(--wk-ease);
}

.wk-header[data-open] .wk-navtoggle { background: var(--wk-cyan); }

.wk-navtoggle__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 16px;
}

.wk-navtoggle__bars i {
  display: block;
  height: 2px;
  background: var(--wk-ink);
}

.wk-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--wk-cyan);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

@media (max-width: 479px) {
  .wk-brand__sub { display: none; }
}

@media (min-width: 720px) {
  .wk-header__rail-inner { gap: 24px; }
}

@media (min-width: 1024px) {
  .wk-header__rail-inner { min-height: 36px; }

  .wk-header__bar-inner { min-height: 68px; gap: 20px; }

  .wk-nav {
    display: block;
    position: static;
    flex: 1 1 auto;
    min-width: 0;
    max-height: none;
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .wk-header[data-open] .wk-nav {
    position: static;
    max-height: none;
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .wk-nav__list {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
  }

  .wk-nav__link {
    padding: 6px 2px;
    font-size: 14.5px;
    line-height: 1.4;
    border-left: 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
  }

  .wk-nav__link:hover {
    background: transparent;
    border-bottom-color: var(--wk-blue);
  }

  .wk-nav__link[aria-current="page"] {
    background: transparent;
    border-left: 0;
    border-bottom-color: var(--wk-cyan);
  }

  .wk-navtoggle { display: none; }

  .wk-header__actions { margin-left: 0; }
}

@media (min-width: 1200px) {
  .wk-searchbar { display: inline-flex; }
}

/* ==========================================================================
   页脚
   ========================================================================== */

.wk-footer {
  margin-top: 96px;
  background: var(--wk-ink);
  color: #A9BAC8;
  border-top: 3px solid var(--wk-blue);
  font-family: var(--wk-font-head);
}

.wk-footer::before {
  content: "";
  display: block;
  height: 8px;
  border-bottom: 1px solid rgba(201, 180, 138, 0.35);
  background-image: repeating-linear-gradient(90deg, var(--wk-gold) 0 1px, transparent 1px 26px);
  opacity: 0.75;
}

.wk-footer__inner { padding-block: 52px 28px; }

.wk-footer__grid {
  display: grid;
  gap: 32px 24px;
  grid-template-columns: 1fr;
}

.wk-footer__col { min-width: 0; }

.wk-footer__brand {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: #F2F6FA;
  border-bottom: 2px solid var(--wk-cyan);
}

.wk-footer__title {
  margin-bottom: 14px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.6;
  color: var(--wk-gold);
}

.wk-footer__list { list-style: none; }

.wk-footer__list li + li { margin-top: 10px; }

.wk-footer__list a {
  font-size: 15px;
  line-height: 1.7;
  color: #C6D3DE;
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--wk-ease), border-color 0.18s var(--wk-ease);
}

.wk-footer__list a:hover {
  color: var(--wk-cyan);
  border-bottom-color: var(--wk-cyan);
}

.wk-footer__cta {
  display: inline-block;
  margin-top: 14px;
  padding: 7px 12px;
  border: 1px solid var(--wk-gold);
  font-family: var(--wk-font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--wk-gold);
  transition: background-color 0.18s var(--wk-ease), color 0.18s var(--wk-ease);
}

.wk-footer__cta:hover {
  background: var(--wk-gold);
  color: var(--wk-ink);
}

.wk-footer__legal {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.wk-footer__line {
  font-size: 13.5px;
  line-height: 1.9;
  color: #9FB2C2;
}

.wk-footer__line + .wk-footer__line { margin-top: 8px; }

.wk-footer__line--dim {
  margin-top: 16px;
  color: #6E7E8D;
  font-family: var(--wk-font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

@media (min-width: 640px) {
  .wk-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .wk-footer { margin-top: 120px; }
  .wk-footer__inner { padding-block: 64px 32px; }
  .wk-footer__grid {
    gap: 40px 32px;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

/* ==========================================================================
   动效降级
   ========================================================================== */

@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;
    scroll-behavior: auto !important;
  }

  .wk-js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .wk-fold__panel { transition: none; }
}
