:root {
  --font-headline: "Inter Tight", "Arial Narrow", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --font-data: "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", "Roboto Mono", Menlo, Consolas, monospace;
  --color-bg: #F2F3F7;
  --color-bg-alt: #E6E8F0;
  --color-navy: #0D1B2A;
  --color-navy-deep: #070F1A;
  --color-gold: #C9A227;
  --color-gold-light: #E8C766;
  --color-orange: #E8662C;
  --color-silver: #C5CCD6;
  --color-cyan: #00D4B8;
  --color-violet: #7A5AF8;
  --color-positive: #10B981;
  --color-text: #111827;
  --color-text-muted: #4B5563;
  --color-line: #D1D5DB;
  --color-inverse-text: #F9FAFB;
  --container: 1200px;
  --header-height: 64px;
  --shadow-sm: 0 1px 2px rgba(13, 27, 42, .06);
  --shadow-md: 0 8px 24px rgba(13, 27, 42, .10);
  --ease-out: cubic-bezier(.22, .61, .36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-headline);
  line-height: 1.15;
  letter-spacing: -.5px;
  margin-top: 0;
}

p {
  margin-top: 0;
}

ul, ol {
  padding-left: 1.25rem;
}

a {
  color: var(--color-navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

button {
  font: inherit;
}

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

#main-content {
  scroll-margin-top: calc(var(--header-height) + .5rem);
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(242, 243, 247, .94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-line);
  box-shadow: var(--shadow-sm);
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-navy) 0 28%, var(--color-gold) 28% 58%, var(--color-orange) 58% 100%);
  opacity: .95;
  pointer-events: none;
}

.site-header::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(260px, 24vw);
  background: linear-gradient(135deg, transparent 60%, var(--color-gold));
  opacity: .12;
  pointer-events: none;
}

.header-shell {
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: var(--header-height);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 110;
  background: var(--color-navy);
  color: var(--color-gold-light);
  padding: .65rem 1rem;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: .75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem .25rem;
  text-decoration: none;
  color: var(--color-text);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--color-navy);
  color: var(--color-gold-light);
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: 1.05rem;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

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

.brand-name {
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -.2px;
  white-space: nowrap;
  color: inherit;
}

.brand-sub {
  font-size: .68rem;
  color: var(--color-text-muted);
  letter-spacing: .1em;
}

.brand--inverse {
  color: var(--color-inverse-text);
}

.brand--inverse .brand-sub {
  color: rgba(249, 250, 251, .55);
}

.site-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  display: flex;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: 0 .85rem;
  min-height: var(--header-height);
  color: var(--color-text);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  border-left: 1px solid var(--color-line);
}

.nav-link::before {
  content: attr(data-nav-index);
  font-family: var(--font-data);
  font-size: .68rem;
  font-weight: 500;
  color: var(--color-gold);
}

.nav-link:hover {
  color: var(--color-navy);
}

.nav-link:hover::before {
  color: var(--color-orange);
}

.nav-link[aria-current="page"] {
  color: var(--color-navy);
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: .85rem;
  bottom: 0;
  left: .85rem;
  height: 3px;
  background: var(--color-gold);
  pointer-events: none;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-height: var(--header-height);
  padding: 0 .85rem;
  margin-left: .5rem;
  border-left: 1px solid var(--color-line);
  font-size: .75rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.nav-status-dot {
  width: 8px;
  height: 8px;
  background: var(--color-cyan);
  animation: status-pulse 2s infinite;
}

@keyframes status-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 212, 184, .45);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(0, 212, 184, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 212, 184, 0);
  }
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: .4rem;
  margin-left: auto;
  padding: .5rem .65rem;
  background: transparent;
  border: 1px solid var(--color-line);
  color: var(--color-navy);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
}

.nav-toggle-lines {
  display: flex;
  flex-direction: column;
  width: 18px;
}

.nav-toggle-line {
  display: block;
  height: 2px;
  background: currentColor;
  margin: 2px 0;
  transition: transform .25s var(--ease-out), opacity .2s linear;
}

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

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

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

.site-footer {
  position: relative;
  background: var(--color-navy);
  color: var(--color-inverse-text);
  border-top: 4px solid var(--color-gold);
  margin-top: 4rem;
}

.site-footer::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(380px, 38vw);
  height: 4px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-orange));
  opacity: .75;
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.6fr;
  gap: 2rem;
  padding-block: 3rem 2.25rem;
}

.footer-brand-block .brand {
  padding: 0;
}

.footer-trust {
  margin-top: .85rem;
  color: rgba(249, 250, 251, .62);
  font-size: .85rem;
  max-width: 48ch;
}

.footer-title {
  margin: 0 0 .85rem;
  font-family: var(--font-headline);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--color-gold-light);
}

.footer-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}

.footer-nav-link {
  color: rgba(249, 250, 251, .72);
  text-decoration: none;
  font-size: .9rem;
}

.footer-nav-link:hover {
  color: var(--color-gold-light);
}

.footer-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .55rem;
  font-size: .85rem;
  color: rgba(249, 250, 251, .68);
}

.footer-contact-list a {
  color: var(--color-cyan);
  text-decoration: none;
}

.footer-contact-list a:hover {
  color: var(--color-gold-light);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, .16);
  padding-block: 1rem;
  font-size: .78rem;
  color: rgba(249, 250, 251, .55);
}

.footer-bottom a {
  color: rgba(249, 250, 251, .72);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--color-gold-light);
}

.top-link {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--color-navy);
  color: var(--color-gold-light);
  border: 1px solid var(--color-gold-light);
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.top-link[hidden] {
  display: none;
}

.top-link::before {
  content: "↑";
  font-family: var(--font-data);
  font-size: 1.2rem;
  line-height: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.2rem;
  background: var(--color-navy);
  color: #fff;
  border: 1px solid var(--color-navy);
  font-weight: 600;
  font-size: .9rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s;
}

.btn:hover {
  background: var(--color-navy-deep);
  color: var(--color-gold-light);
}

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

.btn--accent:hover {
  background: var(--color-gold-light);
  color: var(--color-navy);
}

.btn--ghost {
  background: transparent;
  color: var(--color-navy);
}

.btn--ghost:hover {
  background: var(--color-bg-alt);
  color: var(--color-navy);
}

.breadcrumbs {
  padding-block: .75rem;
}

.breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: .3rem;
  margin: 0;
  padding: 0;
  font-size: .82rem;
}

.breadcrumbs-item {
  display: inline-flex;
  align-items: center;
  color: var(--color-text-muted);
}

.breadcrumbs-item + .breadcrumbs-item::before {
  content: "/";
  margin-inline: .35rem 0;
  color: var(--color-line);
  font-family: var(--font-data);
}

.breadcrumbs-link {
  color: var(--color-text-muted);
  text-decoration: none;
}

.breadcrumbs-link:hover {
  color: var(--color-gold);
}

.breadcrumbs-current {
  color: var(--color-navy);
  font-weight: 600;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-eyebrow {
  margin: 0 0 .35rem;
  font-family: var(--font-data);
  font-size: .75rem;
  letter-spacing: .14em;
  color: var(--color-orange);
}

.section-title {
  margin: 0;
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.section-desc {
  margin: .6rem 0 0;
  max-width: 60ch;
  color: var(--color-text-muted);
  font-size: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: 1.25rem;
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .3s var(--ease-out), border-color .3s, transform .3s var(--ease-out);
}

.card:hover {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 1.1rem;
}

.card__meta {
  margin: 0;
  font-size: .78rem;
  color: var(--color-text-muted);
  font-family: var(--font-data);
}

.card__body {
  margin: 0;
  font-size: .9rem;
  color: var(--color-text-muted);
}

.card__action {
  margin-top: auto;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .55rem;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  border: 1px solid var(--color-line);
  font-family: var(--font-data);
  font-size: .72rem;
  font-weight: 500;
}

.tag--gold {
  background: rgba(201, 162, 39, .12);
  border-color: var(--color-gold);
  color: #6B570A;
}

.tag--cyan {
  background: rgba(0, 212, 184, .1);
  border-color: var(--color-cyan);
  color: #007A68;
}

.tag--orange {
  background: rgba(232, 102, 44, .1);
  border-color: var(--color-orange);
  color: #9B3F16;
}

.data-text {
  font-family: var(--font-data);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.data-text--live {
  color: var(--color-positive);
}

.data-text--gold {
  color: var(--color-gold);
}

.data-text--orange {
  color: var(--color-orange);
}

.img-frame {
  position: relative;
  display: block;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-line);
  overflow: hidden;
}

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

.img-frame--16x9 {
  aspect-ratio: 16 / 9;
}

.img-frame--4x3 {
  aspect-ratio: 4 / 3;
}

.img-frame--1x1 {
  aspect-ratio: 1 / 1;
}

.img-frame--wide {
  aspect-ratio: 21 / 9;
}

.img-frame--placeholder {
  background: linear-gradient(135deg, var(--color-silver), var(--color-bg-alt));
}

.img-frame--placeholder::before {
  content: "IMG";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-data);
  font-size: .75rem;
  letter-spacing: .2em;
  color: rgba(13, 27, 42, .55);
  background: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(13, 27, 42, .035) 10px 12px);
}

.img-frame--placeholder::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(13, 27, 42, .15);
  pointer-events: none;
}

[data-reveal] {
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-out);
  will-change: opacity, transform;
}

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

@media (min-width: 960px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (max-width: 960px) {
  .header-shell {
    flex-wrap: wrap;
    align-items: center;
  }

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

  .site-nav {
    display: block;
    flex-basis: 100%;
    margin-left: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .45s var(--ease-out);
  }

  .site-nav[data-open] {
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .nav-list {
    flex-direction: column;
    border-top: 1px solid var(--color-line);
  }

  .nav-item {
    display: block;
  }

  .nav-link {
    min-height: 48px;
    padding: .75rem 1rem;
    border-left: 0;
    border-bottom: 1px solid var(--color-line);
  }

  .nav-link[aria-current="page"]::after {
    content: none;
  }

  .nav-link[aria-current="page"] {
    background: var(--color-bg-alt);
  }

  .nav-status {
    min-height: 44px;
    padding: .65rem 1rem;
    margin-left: 0;
    border-left: 0;
    border-bottom: 1px solid var(--color-line);
  }
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-block: 2.5rem 2rem;
  }
}

@media (max-width: 480px) {
  .brand-sub {
    display: none;
  }

  .nav-toggle-label {
    display: none;
  }

  .brand-name {
    font-size: .95rem;
  }
}

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

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .nav-status-dot {
    animation: none;
    box-shadow: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
