:root {
  --content-width: 1240px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --bg-deep: #1f2733;
  --bg-maroon: #7a2e2e;
  --bg-green: #1f5c4d;
  --bg-navy: #2a3b5c;
  --bg-amber: #f2a900;
  --bg-teal: #00b894;
  --bg-pink: #e84393;
  --accent-yellow: #ffe066;
  --accent-blue: #00d2ff;
  --status-new: #2ecc71;
  --status-updating: #f1c40f;
  --status-done: #e74c3c;
  --tag-orange: #ff7f50;
  --tag-purple: #9b59b6;
  --text-light: #e0e0e0;
  --text-dark: #1a1a1a;
  --border-gray: #4a5568;
  --panel: #273140;
  --muted: #8aa0b0;
  --font-body: "Noto Sans SC", "Source Han Sans CN", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-head: "Source Han Sans CN", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Roboto Mono", "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 1.25;
  margin: 0;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent-blue);
}

button {
  font-family: inherit;
  font-size: inherit;
}

::selection {
  background: var(--accent-yellow);
  color: var(--text-dark);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
  border-radius: 6px;
}

.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: fixed;
  top: 0;
  left: 50%;
  transform: translate(-50%, -120%);
  z-index: 1000;
  background: var(--accent-yellow);
  color: var(--text-dark);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
  transition: transform .2s;
}

.skip-link:focus {
  transform: translate(-50%, 10px);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
  z-index: 900;
  pointer-events: none;
  background: rgba(255, 255, 255, .06);
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-yellow), var(--accent-blue), var(--bg-pink));
  border-radius: 0 4px 4px 0;
}

.index-strip {
  display: flex;
  justify-content: space-between;
  gap: 2px;
  background: #131920;
  padding: 5px 14px;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  letter-spacing: .06em;
  border-bottom: 1px solid #0d1219;
}

.index-strip span {
  color: #5c6b7a;
  font-weight: 700;
}

.index-strip span:nth-child(3n + 1) {
  color: var(--accent-yellow);
}

.index-strip span:nth-child(3n + 2) {
  color: var(--accent-blue);
}

.index-strip span:nth-child(3n + 3) {
  color: var(--bg-pink);
}

.site-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding-inline: 28px;
}

.site-header {
  background: var(--bg-deep);
  position: relative;
  z-index: 100;
  border-bottom: 1px solid var(--border-gray);
}

.header-inner {
  padding-top: 16px;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--bg-amber);
  color: var(--text-dark);
  font-weight: 900;
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 3px rgba(255, 224, 102, .28);
}

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

.brand-text strong {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: .04em;
  color: var(--accent-yellow);
}

.brand-text small {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .24em;
  color: var(--accent-blue);
  margin-top: 4px;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border-gray);
  border-radius: var(--radius-pill);
  padding: 7px 8px 7px 14px;
  min-width: 260px;
  transition: border-color .2s, box-shadow .2s;
}

.site-search:focus-within {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(0, 210, 255, .16);
}

.search-icon {
  font-size: 18px;
  color: var(--accent-blue);
  line-height: 1;
}

.search-label {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.search-shortcut {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dark);
  background: var(--accent-blue);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  text-decoration: none;
  margin-left: auto;
  transition: background .2s;
}

.search-shortcut:hover {
  background: var(--accent-yellow);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border-gray);
  background: transparent;
  border-radius: 14px;
  padding: 10px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.nav-toggle:hover {
  border-color: var(--accent-blue);
  background: rgba(0, 210, 255, .08);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-yellow);
  transition: transform .2s, opacity .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);
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 10px 0 14px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid var(--border-gray);
}

.primary-nav a {
  display: inline-block;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 800;
  color: #b6c2d1;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}

.primary-nav a:hover {
  color: var(--accent-yellow);
  background: rgba(255, 224, 102, .06);
  border-color: rgba(255, 224, 102, .35);
}

.primary-nav a[aria-current="page"] {
  background: var(--accent-yellow);
  color: var(--text-dark);
  border-color: var(--accent-yellow);
  box-shadow: 0 0 0 3px rgba(255, 224, 102, .22);
}

.site-footer {
  background: var(--bg-navy);
  position: relative;
  margin-top: 64px;
}

.site-footer::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-yellow) 0 33%, var(--accent-blue) 33% 66%, var(--bg-pink) 66% 100%);
}

.footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 48px 28px 24px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-brand .brand-mark {
  width: 44px;
  height: 44px;
  font-size: 20px;
  box-shadow: none;
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--accent-blue);
  margin: 0;
  text-transform: uppercase;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer-col h2 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-col a {
  color: #b6c2d1;
  font-size: 14px;
  text-decoration: none;
  transition: color .2s, padding-left .2s;
}

.footer-col a:hover {
  color: var(--accent-yellow);
  padding-left: 4px;
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom a {
  color: var(--accent-blue);
  text-decoration: none;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
}

.btn-primary {
  background: var(--accent-yellow);
  color: var(--text-dark);
  border-color: var(--accent-yellow);
}

.btn-primary:hover {
  background: var(--text-dark);
  color: var(--accent-yellow);
  border-color: var(--text-dark);
}

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

.btn-outline:hover {
  background: var(--accent-blue);
  color: var(--text-dark);
  border-color: var(--accent-blue);
}

.btn-ghost {
  background: transparent;
  color: #b6c2d1;
  border-color: var(--border-gray);
}

.btn-ghost:hover {
  background: var(--border-gray);
  color: var(--text-light);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border-gray);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}

.card h3 {
  font-size: 18px;
}

.card p {
  font-size: 14px;
  color: #b6c2d1;
  margin: 0;
}

.card--amber {
  background: var(--bg-amber);
  border-color: var(--bg-amber);
}

.card--teal {
  background: var(--bg-teal);
  border-color: var(--bg-teal);
}

.card--pink {
  background: var(--bg-pink);
  border-color: var(--bg-pink);
}

.card--amber h3,
.card--teal h3 {
  color: var(--text-dark);
}

.card--pink h3 {
  color: #fff;
}

.card--amber p,
.card--teal p {
  color: rgba(26, 26, 26, .8);
}

.card--pink p {
  color: rgba(255, 255, 255, .85);
}

.mag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.mag-tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--bg-green);
  border: 1px solid rgba(255, 255, 255, .08);
  padding: 18px;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform .2s, box-shadow .2s;
}

.mag-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
}

.mag-tile::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
}

.mag-tile h3 {
  position: relative;
  z-index: 1;
  font-size: 18px;
  color: #fff;
}

.mag-tile .count {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-yellow);
}

.entry-list {
  display: grid;
}

.entry-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 12px 8px;
  border-bottom: 1px solid rgba(74, 85, 104, .6);
  text-decoration: none;
  color: inherit;
  transition: background .2s, padding-left .2s;
}

.entry-row:hover {
  background: rgba(255, 224, 102, .05);
  padding-left: 4px;
}

.entry-row .entry-name {
  font-weight: 800;
  font-size: 15px;
  color: var(--text-light);
}

.entry-row .entry-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.rank-num {
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 800;
  color: var(--accent-blue);
  text-align: center;
  line-height: 1;
}

.rank-num--hot {
  color: var(--bg-pink);
}

.rank-num--new {
  color: var(--status-new);
}

.metric-bar {
  height: 8px;
  width: 120px;
  border-radius: var(--radius-pill);
  background: #33404e;
  overflow: hidden;
}

.metric-bar span {
  display: block;
  height: 100%;
  width: 60%;
  border-radius: inherit;
  background: var(--accent-yellow);
}

.metric-bar--yellow span {
  background: var(--accent-yellow);
}

.metric-bar--cyan span {
  background: var(--accent-blue);
}

.metric-bar--pink span {
  background: var(--bg-pink);
}

.metric-bar--green span {
  background: var(--status-new);
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--tag-orange);
  color: var(--text-dark);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  text-decoration: none;
}

.tag--orange {
  background: var(--tag-orange);
  color: var(--text-dark);
}

.tag--purple {
  background: var(--tag-purple);
  color: #fff;
}

.tag--blue {
  background: var(--accent-blue);
  color: var(--text-dark);
}

.tag--yellow {
  background: var(--accent-yellow);
  color: var(--text-dark);
}

.tag--green {
  background: var(--status-new);
  color: var(--text-dark);
}

.tag--pink {
  background: var(--bg-pink);
  color: #fff;
}

.tag--lg {
  font-size: 14px;
  padding: 8px 16px;
}

.tag--ghost {
  background: transparent;
  border: 1px solid var(--border-gray);
  color: #b6c2d1;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.status-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-new {
  background: rgba(46, 204, 113, .16);
  color: var(--status-new);
}

.status-updating {
  background: rgba(241, 196, 15, .16);
  color: var(--status-updating);
}

.status-done {
  background: rgba(231, 76, 60, .16);
  color: var(--status-done);
}

.batch-code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-blue);
  letter-spacing: .05em;
  font-weight: 700;
}

.trend {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.trend--up {
  color: var(--status-new);
}

.trend--down {
  color: var(--status-done);
}

.trend--flat {
  color: var(--status-updating);
}

.letter-index {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.letter-index span {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--border-gray);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-blue);
}

.letter-index span:nth-child(3n + 1) {
  color: var(--accent-yellow);
}

.letter-index span:nth-child(3n + 2) {
  color: var(--bg-pink);
}

.rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  scroll-snap-type: x mandatory;
}

.rail > * {
  flex: 0 0 auto;
  width: 280px;
  scroll-snap-align: start;
}

.rail::-webkit-scrollbar {
  height: 8px;
}

.rail::-webkit-scrollbar-thumb {
  background: var(--border-gray);
  border-radius: var(--radius-pill);
}

.rail::-webkit-scrollbar-track {
  background: transparent;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  border: 1px solid rgba(74, 85, 104, .5);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.data-table th {
  padding: 10px 14px;
  text-align: left;
  background: #0f1620;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.data-table td {
  padding: 10px 14px;
  border-top: 1px solid rgba(74, 85, 104, .4);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(255, 224, 102, .04);
}

.section {
  padding: 48px 0;
}

.section--maroon {
  background: var(--bg-maroon);
}

.section--green {
  background: var(--bg-green);
}

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

.section--deep {
  background: var(--bg-deep);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.section-title {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  line-height: 1.3;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 20px;
  border-radius: var(--radius-pill);
  background: var(--accent-yellow);
  margin-right: 10px;
  vertical-align: -3px;
}

.section-more {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 700;
}

.section-more:hover {
  color: var(--accent-yellow);
}

.page-header {
  padding: 32px 0 20px;
  border-bottom: 1px solid var(--border-gray);
  margin-bottom: 28px;
}

.page-heading {
  font-size: 36px;
  color: #fff;
}

.page-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 16px;
}

.breadcrumb a {
  color: var(--accent-blue);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  color: #fff;
  font-weight: 700;
}

.figure-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-navy), var(--bg-deep));
  border: 1px solid var(--border-gray);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: center;
  padding: 12px;
}

.figure-frame img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 992px) {
  .site-container {
    padding-inline: 20px;
  }

  .masthead {
    flex-wrap: wrap;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .site-search {
    flex: 1;
    min-width: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    display: none;
  }

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

  .primary-nav ul {
    flex-direction: column;
    border-top: 1px solid var(--border-gray);
    padding-top: 10px;
  }

  .primary-nav a {
    display: block;
    text-align: center;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  .page-heading {
    font-size: 30px;
  }
}

@media (max-width: 600px) {
  .site-container {
    padding-inline: 16px;
  }

  .brand-text strong {
    font-size: 22px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    font-size: 22px;
    border-radius: 12px;
  }

  .search-label {
    display: none;
  }

  .site-search {
    min-width: 0;
    padding-left: 10px;
  }

  .index-strip {
    font-size: 8px;
    padding-inline: 8px;
  }

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .entry-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .entry-row .status-badge,
  .entry-row .metric-bar {
    grid-column: 2;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
