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

html {
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--navy) var(--paper);
  scrollbar-width: thin;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ====== CSS Variables ====== */
:root {
  --navy: #0A1F44;
  --navy-deep: #071633;
  --grad-start: #1B367C;
  --orange: #FF5C00;
  --orange-dark: #E65300;
  --cyan: #00C2D1;
  --cyan-dark: #00A8B5;
  --paper: #F4F7FB;
  --card: #FFFFFF;
  --ink: #101C33;
  --line: #E8EDF5;
  --slate: #7A8AA6;
  --gold: #FFD166;
  --font-head: 'Montserrat Black', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --container-w: 1280px;
  --radius: 0px;
}

/* ====== Typography ====== */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 {
  font-size: 48px;
  font-weight: 900;
}

h2 {
  font-size: 32px;
  font-weight: 900;
}

h3 {
  font-size: 20px;
  font-weight: 800;
}

h4 {
  font-size: 16px;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.5em;
}

li {
  margin-bottom: 4px;
}

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

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

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

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

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--line);
  padding: 2px 6px;
}

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

[hidden] {
  display: none !important;
}

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

/* ====== Accessibility ====== */
.skip-link {
  position: absolute;
  top: -80px;
  left: 16px;
  z-index: 300;
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

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

/* ====== Scroll Progress ====== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--orange) 100%);
  z-index: 200;
  pointer-events: none;
}

/* ====== Layout ====== */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 40px;
}

.site-main {
  min-height: 60vh;
}

/* ====== Buttons ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--orange);
  border: 2px solid var(--orange);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.btn:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 0 rgba(10, 31, 68, 0.2);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

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

.btn--ghost:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

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

.btn--cyan:hover {
  background: var(--cyan-dark);
  border-color: var(--cyan-dark);
  color: #fff;
}

.btn--block {
  display: flex;
  width: 100%;
}

/* ====== Page Header ====== */
.page-header {
  background: var(--navy);
  position: relative;
  padding: 56px 0 44px;
  margin-bottom: 48px;
  border-bottom: 4px solid var(--orange);
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: linear-gradient(225deg, transparent 50%, rgba(0, 194, 209, 0.18) 50%);
  pointer-events: none;
}

.page-header__index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--orange);
  letter-spacing: 0.2em;
  display: block;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.page-title {
  color: #fff;
  font-size: 52px;
  font-weight: 900;
  line-height: 1.1;
  margin: 0;
  max-width: 900px;
}

.page-intro {
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1.7;
  max-width: 640px;
  margin: 16px 0 0;
}

@media (max-width: 640px) {
  .page-header {
    padding: 40px 0 32px;
  }

  .page-title {
    font-size: 32px;
  }
}

/* ====== Breadcrumb ====== */
.breadcrumb {
  padding: 14px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

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

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

.breadcrumb__separator {
  margin: 0 8px;
  color: var(--line);
}

/* ====== Cards ====== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 28px;
  position: relative;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 3px;
  background: var(--orange);
  transition: width 0.2s var(--ease);
}

.card:hover {
  border-color: var(--cyan);
  box-shadow: 6px 6px 0 rgba(0, 194, 209, 0.1);
}

.card:hover::before {
  width: 56px;
}

.card__index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
  display: block;
  margin-bottom: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card__title {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
}

.card__body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--slate);
  margin-bottom: 0;
}

.card__link {
  display: inline-block;
  margin-top: 16px;
  font-weight: 700;
  font-size: 14px;
  color: var(--cyan);
  text-decoration: none;
}

.card__link:hover {
  color: var(--orange);
}

/* ====== Section Head ====== */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--navy);
}

.section-head__number {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--orange);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
}

.section-head__title {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 900;
  color: var(--navy);
  margin: 0;
}

/* ====== Image Frame ====== */
.image-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--line) 0%, var(--paper) 100%);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
}

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

.image-frame::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-top: 2px solid var(--orange);
  border-right: 2px solid var(--orange);
  pointer-events: none;
}

.image-frame--square {
  aspect-ratio: 1 / 1;
}

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

/* ====== Tabs ====== */
.tabs {
  margin-bottom: 32px;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 3px solid var(--navy);
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.tab-button {
  display: inline-block;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--slate);
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  margin-bottom: -3px;
  border-bottom: 3px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.tab-button:hover {
  color: var(--navy);
  background: rgba(10, 31, 68, 0.03);
}

.tab-button[aria-selected="true"] {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

.tab-panel {
  padding: 4px 0;
}

/* ====== Data Table ====== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 32px;
  background: var(--card);
  border: 1px solid var(--line);
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 3px solid var(--orange);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

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

.data-table tbody tr:hover {
  background: rgba(0, 194, 209, 0.05);
}

/* ====== Notice ====== */
.notice {
  border: 1px solid var(--line);
  border-left: 4px solid var(--cyan);
  padding: 16px 20px;
  background: var(--card);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 24px;
  color: var(--ink);
}

.notice--warning {
  border-left-color: var(--gold);
}

.notice--alert {
  border-left-color: var(--orange);
}

/* ====== Header ====== */
.site-masthead {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 100;
}

.masthead__ticker {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 7px 16px;
  position: relative;
  border-bottom: 2px solid rgba(0, 194, 209, 0.4);
}

.masthead__ticker::before,
.masthead__ticker::after {
  content: '';
  display: inline-block;
  width: 36px;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
  vertical-align: middle;
  margin: 0 12px;
}

.ticker__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--cyan);
  transform: rotate(45deg);
  margin-right: 8px;
  vertical-align: baseline;
  animation: ticker-pulse 2s ease-in-out infinite;
}

.ticker__text {
  vertical-align: baseline;
}

@keyframes ticker-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.masthead__inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 28px 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.masthead__side,
.masthead__meta {
  display: flex;
  align-items: center;
}

.masthead__side {
  justify-content: flex-start;
}

.masthead__meta {
  justify-content: flex-end;
}

.masthead__side::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--navy);
  margin-right: 10px;
  flex-shrink: 0;
}

.masthead__meta::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--cyan);
  margin-left: 10px;
  flex-shrink: 0;
}

.masthead__edition {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.masthead__brand-link {
  text-align: center;
  text-decoration: none;
  display: block;
  transition: opacity 0.2s var(--ease);
}

.masthead__brand-link:hover {
  opacity: 0.85;
}

.masthead__brand {
  display: block;
  font-family: var(--font-head);
  font-size: 38px;
  font-weight: 900;
  line-height: 1.15;
  color: var(--navy);
  letter-spacing: 0.02em;
  transition: color 0.2s var(--ease);
}

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

.masthead__rule {
  display: block;
  width: 56px;
  height: 3px;
  background: var(--orange);
  margin: 10px auto;
}

.masthead__tagline {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--slate);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.masthead__code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
  letter-spacing: 0.12em;
  border-left: 2px solid var(--orange);
  padding-left: 10px;
  white-space: nowrap;
}

.masthead__divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 10%, var(--line) 90%, transparent);
}

/* ====== Navigation ====== */
.site-nav {
  background: var(--card);
}

.nav-toggle {
  display: none;
}

.nav-list {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0;
}

.nav-item {
  margin: 0;
}

.nav-link {
  display: block;
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.04em;
  position: relative;
  transition: color 0.2s var(--ease);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 22px;
  right: 22px;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s var(--ease);
}

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

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

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

/* ====== Footer ====== */
.site-footer {
  background: var(--navy);
  color: #B8C4D8;
  font-size: 14px;
  line-height: 1.7;
  margin-top: 80px;
  position: relative;
}

.site-footer::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--cyan) 100%);
}

.footer__grid {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 48px 40px 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 48px;
}

.footer__brand {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.02em;
  display: block;
}

.footer__about {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: #8FA3C8;
  max-width: 360px;
}

.footer__heading {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer__links,
.footer__contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer__link {
  color: #B8C4D8;
  text-decoration: none;
  display: inline-block;
  padding: 5px 0;
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}

.footer__link:hover {
  color: var(--orange);
  padding-left: 4px;
}

.footer__contact-item {
  padding: 5px 0;
  font-size: 13px;
  color: #A7B5D0;
  line-height: 1.6;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 40px;
}

.footer__bottom-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #617397;
  line-height: 1.6;
}

.footer__icp {
  color: #617397;
}

/* ====== Back Top ====== */
.back-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--card);
  color: var(--navy);
  border: 2px solid var(--navy);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

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

.back-top:hover {
  background: var(--navy);
  color: #fff;
  box-shadow: 4px 4px 0 rgba(0, 194, 209, 0.3);
}

.back-top__icon {
  font-size: 16px;
  line-height: 1;
}

/* ====== Responsive ====== */
@media (max-width: 1023px) {
  .container {
    padding: 0 28px;
  }

  .masthead__inner {
    padding: 22px 28px;
  }

  .masthead__brand {
    font-size: 34px;
  }

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

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    padding: 40px 28px 32px;
    gap: 36px;
  }

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

  .footer__bottom {
    padding: 16px 28px;
  }

  .nav-link {
    padding: 14px 16px;
    font-size: 13px;
  }

  .nav-link::after {
    left: 16px;
    right: 16px;
  }
}

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

  .masthead__ticker::before,
  .masthead__ticker::after {
    width: 16px;
    margin: 0 8px;
  }

  .masthead__inner {
    grid-template-columns: 1fr;
    padding: 20px 20px 16px;
  }

  .masthead__side,
  .masthead__meta {
    display: none;
  }

  .masthead__brand {
    font-size: 28px;
  }

  .masthead__rule {
    margin: 8px auto;
  }

  .masthead__tagline {
    font-size: 12px;
  }

  .site-nav {
    border-top: 1px solid var(--line);
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
  }

  .nav-toggle__icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .nav-toggle__bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--navy);
    transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
  }

  .nav-toggle__text {
    letter-spacing: 0.06em;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    padding: 0 20px 16px;
    gap: 0;
  }

  .site-nav[data-open="true"] .nav-list {
    display: flex;
  }

  .nav-item {
    border-top: 1px solid var(--line);
  }

  .nav-link {
    display: block;
    padding: 14px 0;
    font-size: 15px;
  }

  .nav-link::after {
    left: 0;
    right: auto;
    width: 0;
    bottom: 4px;
  }

  .nav-link:hover::after,
  .nav-link[aria-current="page"]::after {
    width: 28px;
    transform: scaleX(1);
  }

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

  .footer__grid {
    grid-template-columns: 1fr;
    padding: 32px 20px 24px;
    gap: 28px;
  }

  .footer__brand-col {
    grid-column: auto;
  }

  .footer__bottom {
    padding: 14px 20px;
  }

  .footer__bottom-inner {
    flex-direction: column;
    gap: 6px;
  }

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

  .back-top__text {
    display: none;
  }
}

@media (max-width: 480px) {
  .masthead__brand {
    font-size: 24px;
  }

  .masthead__tagline {
    font-size: 11px;
  }

  .page-title {
    font-size: 28px;
  }

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

/* ====== Reduced Motion ====== */
@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 !important;
  }

  .ticker__dot {
    animation: none;
  }
}
