:root {
  --bg: #0B1626;
  --panel: #121A24;
  --panel-2: #0E1724;
  --ink: #E9EEF5;
  --ice: #7FD3F2;
  --cyan: #35E5D0;
  --gold: #E8B457;
  --hot: #FF6B4A;
  --cold: #2E9BD6;
  --muted: #6B7A8C;
  --soft: #9AA7B5;
  --amber: #C8873A;
  --line: rgba(127, 211, 242, 0.14);
  --line-strong: rgba(127, 211, 242, 0.22);
  --line-dim: rgba(107, 122, 140, 0.28);
  --rail: 232px;
  --topbar: 64px;
  --quick: 36px;
  --max: 1280px;
  --gutter: 24px;
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "思源黑体", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --scroll-progress: 0;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--ice);
  text-decoration: none;
}

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

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

::selection {
  background: var(--ice);
  color: var(--bg);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

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

li {
  list-style: none;
}

.mono,
.num,
time,
code,
kbd,
samp {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--cyan);
  text-transform: uppercase;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--soft);
  max-width: 72ch;
}

.stat {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stat-hot {
  color: var(--hot);
}

.stat-cold {
  color: var(--cold);
}

.stat-gold {
  color: var(--gold);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}

.tag.is-active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(53, 229, 208, 0.06);
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 32px 0;
}

#main-content {
  display: block;
  margin-left: var(--rail);
  min-height: 60vh;
  padding: calc(var(--topbar) + var(--quick) + 32px) var(--gutter) 64px;
}

.wrap {
  width: min(100%, var(--max));
  margin-inline: auto;
}

.prose {
  width: min(100%, 72ch);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

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

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

.chapter {
  position: relative;
  padding: 32px 0 48px;
  border-top: 1px solid var(--line-dim);
}

.chapter:first-child {
  border-top: 0;
}

.chapter-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
}

.chapter-title {
  margin-top: 8px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.chapter-body {
  margin-top: 16px;
}

.panel,
.data-card {
  background: linear-gradient(180deg, rgba(18, 26, 36, 0.96), rgba(18, 26, 36, 0.72));
  border: 1px solid var(--line);
  border-radius: 0;
}

.panel {
  padding: 20px;
}

.data-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--soft);
  text-transform: uppercase;
}

.card-body {
  padding: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0;
  transition: background 0.24s var(--ease), border-color 0.24s var(--ease), color 0.24s var(--ease);
}

.btn:hover {
  border-color: var(--ice);
  color: var(--ice);
  background: rgba(127, 211, 242, 0.06);
}

.btn-primary {
  background: var(--ice);
  border-color: var(--ice);
  color: #06101d;
}

.btn-primary:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #06101d;
}

.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1205;
}

.btn-gold:hover {
  background: #f0c36a;
  border-color: #f0c36a;
  color: #1a1205;
}

.btn-ghost {
  border-color: var(--line-dim);
  color: var(--soft);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--soft);
  text-transform: uppercase;
  margin-bottom: 24px;
}

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

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

.media-frame {
  position: relative;
  border: 1px solid var(--line);
  background: var(--panel-2);
  overflow: hidden;
  border-radius: 0;
}

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

.media-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--wide::before {
  padding-top: 42%;
}

.media-frame--tall::before {
  padding-top: 120%;
}

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

.media-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  background: linear-gradient(transparent, rgba(11, 22, 38, 0.9));
  font-size: 12px;
  color: var(--soft);
}

.skip-link {
  position: fixed;
  top: -48px;
  left: 12px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--ice);
  color: #06101d;
  font-weight: 700;
  transition: top 0.2s var(--ease);
}

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

.site-header {
  position: relative;
  z-index: 100;
}

.site-header::after {
  content: "";
  position: fixed;
  left: var(--rail);
  right: 0;
  top: calc(var(--topbar) + var(--quick));
  height: 2px;
  background: linear-gradient(90deg, var(--ice), var(--cyan), var(--gold));
  transform: scaleX(var(--scroll-progress));
  transform-origin: left center;
  z-index: 95;
  pointer-events: none;
}

.header-top {
  position: fixed;
  top: 0;
  left: var(--rail);
  right: 0;
  height: var(--topbar);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: rgba(11, 22, 38, 0.94);
  border-bottom: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--soft);
  text-transform: uppercase;
  white-space: nowrap;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--soft);
  white-space: nowrap;
}

.status-period b {
  color: var(--gold);
  font-weight: 700;
}

.status-time {
  color: var(--ice);
}

.live-dot {
  width: 7px;
  height: 7px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(53, 229, 208, 0.12);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.82);
  }
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  border-radius: 0;
}

.nav-toggle:hover {
  border-color: var(--ice);
  color: var(--ice);
}

.track-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 120;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  background: linear-gradient(180deg, #121A24, #0E1724);
  border-right: 1px solid var(--line-strong);
}

.track-nav-head {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.track-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--cyan);
  text-transform: uppercase;
}

.track-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--soft);
}

.track-list {
  margin: 22px 0 0;
  display: grid;
  gap: 4px;
}

.track-list a {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  color: var(--soft);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background 0.24s var(--ease), color 0.24s var(--ease), border-color 0.24s var(--ease);
}

.track-list a:hover,
.track-list a:focus-visible {
  color: var(--ice);
  background: rgba(127, 211, 242, 0.06);
  border-left-color: var(--ice);
}

.track-list a[aria-current="page"] {
  color: var(--ink);
  background: rgba(127, 211, 242, 0.08);
  border-left-color: var(--cyan);
}

.track-list a[aria-current="page"] .track-index {
  color: var(--gold);
}

.track-index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.quick-strip {
  position: fixed;
  top: var(--topbar);
  left: var(--rail);
  right: 0;
  height: var(--quick);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 16px;
  background: rgba(18, 26, 36, 0.96);
  border-bottom: 1px solid var(--line);
}

.quick-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  margin-right: 14px;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 14px;
  color: var(--soft);
  font-size: 12px;
  letter-spacing: 0.04em;
  border-left: 1px solid var(--line);
  text-decoration: none;
  white-space: nowrap;
}

.quick-link:first-of-type {
  border-left: 0;
}

.quick-link:hover,
.quick-link:focus-visible {
  color: var(--cyan);
  background: rgba(53, 229, 208, 0.05);
}

.site-footer {
  margin-left: var(--rail);
  padding: 48px var(--gutter) 24px;
  background: #0A1421;
  border-top: 1px solid var(--line-strong);
  color: var(--soft);
}

.footer-grid {
  width: min(100%, var(--max));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-slogan {
  color: var(--soft);
  font-size: 14px;
  max-width: 32ch;
  margin: 0;
}

.footer-col {
  min-width: 0;
}

.footer-title {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ice);
  text-transform: uppercase;
}

.footer-list {
  display: grid;
  gap: 8px;
}

.footer-list a {
  color: var(--soft);
  font-size: 14px;
}

.footer-list a:hover {
  color: var(--ink);
}

.footer-contact {
  font-style: normal;
  font-size: 14px;
  line-height: 1.8;
  color: var(--soft);
}

.footer-contact span {
  display: block;
  overflow-wrap: anywhere;
}

.footer-note {
  max-width: 520px;
}

.footer-bottom {
  width: min(100%, var(--max));
  margin: 32px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.footer-meta {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.footer-legal a:hover {
  color: var(--ice);
}

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 150;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  background: rgba(18, 26, 36, 0.92);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease), visibility 0.24s var(--ease);
}

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

.to-top:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

[data-chapter-link][aria-current="page"] {
  color: var(--gold);
  border-color: var(--gold);
}

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

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

@media (max-width: 960px) {
  :root {
    --rail: 0px;
    --topbar: 58px;
    --quick: 34px;
  }

  .header-top {
    left: 0;
    padding: 0 16px;
  }

  .brand-sub {
    display: none;
  }

  .header-status {
    gap: 10px;
  }

  .status-time {
    display: none;
  }

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

  .track-nav {
    width: min(86vw, 340px);
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform 0.24s var(--ease), visibility 0.24s var(--ease);
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.35);
  }

  .track-nav[data-open="true"] {
    transform: translateX(0);
    visibility: visible;
  }

  body.nav-open {
    overflow: hidden;
  }

  .quick-strip {
    left: 0;
    overflow-x: auto;
  }

  .site-header::after {
    left: 0;
  }

  #main-content {
    margin-left: 0;
    padding: calc(var(--topbar) + var(--quick) + 24px) 16px 48px;
  }

  .site-footer {
    margin-left: 0;
    padding: 40px 16px 20px;
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }

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

@media (max-width: 640px) {
  .brand-mark {
    font-size: 18px;
  }

  .header-status .status-period {
    display: none;
  }

  .quick-label {
    display: none;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .to-top {
    right: 12px;
    bottom: 12px;
  }
}

@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;
  }

  .live-dot {
    animation: none;
  }
}
