:root {
  --deep: #071A2F;
  --abyss: #04101D;
  --panel: #0D2B4A;
  --grid: #1B4668;
  --cyan: #22E6FF;
  --coral: #FF6B4A;
  --lemon: #F4FF57;
  --ice: #E8F7FF;
  --steel: #7FA6C4;
  --green: #3DE0A0;
  --alert: #FF4D6D;

  --font-display: "Barlow Condensed", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-editorial: "Source Han Serif SC", "Noto Serif SC", "Songti SC", Georgia, "SimSun", serif;
  --font-body: Inter, "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --rail-w: 156px;
  --gutter: 24px;
  --max-w: 1440px;
  --edge: clamp(18px, 4vw, 56px);
}

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

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

body {
  margin: 0;
  padding-left: var(--rail-w);
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ice);
  background-color: var(--deep);
  background-image:
    linear-gradient(90deg, rgba(27, 70, 104, 0.34) 1px, transparent 1px),
    linear-gradient(180deg, rgba(27, 70, 104, 0.34) 1px, transparent 1px);
  background-size: 96px 96px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-family: var(--font-editorial);
  font-weight: 600;
  line-height: 1.24;
  color: var(--ice);
  letter-spacing: -0.004em;
}

h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 4.6vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.012em;
}

h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: #7df3ff; }

strong { color: var(--ice); font-weight: 700; }

small { font-size: 0.82em; }

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

/* ============ Utilities ============ */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--edge);
}

.container--narrow { max-width: 860px; }

.section { padding-block: clamp(48px, 7vw, 96px); }

.divider {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, var(--grid), rgba(27, 70, 104, 0));
}

.grid {
  display: grid;
  gap: var(--gutter);
}

.grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.blueprint {
  position: relative;
  border: 1px solid var(--grid);
  border-radius: 3px;
  background-image:
    linear-gradient(90deg, rgba(27, 70, 104, 0.5) 1px, transparent 1px),
    linear-gradient(180deg, rgba(27, 70, 104, 0.5) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ============ Skip link ============ */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  display: inline-block;
  padding: 10px 18px;
  background: var(--cyan);
  color: var(--abyss);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 2px;
  transform: translateY(-220%);
  transition: transform 0.18s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  color: var(--abyss);
}

/* ============ Header: side rail ============ */
.site-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  width: var(--rail-w);
  flex-direction: column;
  background: linear-gradient(180deg, rgba(13, 43, 74, 0.94) 0%, rgba(4, 16, 29, 0.97) 100%);
  border-right: 1px solid var(--grid);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.rail__inner {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  min-height: 0;
  padding: 22px 16px 18px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--grid) transparent;
}

.rail__brand {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ice);
  text-decoration: none;
}
.rail__brand:hover { color: var(--ice); }

.rail__mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  color: var(--abyss);
  background: var(--cyan);
  border-radius: 2px;
}

.rail__brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rail__brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--ice);
}

.rail__brand-desc {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--steel);
}

.rail__toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  background: rgba(13, 43, 74, 0.72);
  border: 1px solid rgba(127, 166, 196, 0.36);
  border-radius: 2px;
  color: var(--ice);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.rail__toggle:hover { border-color: var(--cyan); background: rgba(34, 230, 255, 0.08); }

.rail__toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: var(--cyan);
  transition: background-color 0.2s ease;
}
.rail__toggle-bars::before,
.rail__toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: var(--cyan);
  transition: transform 0.22s ease;
}
.rail__toggle-bars::before { top: -5px; }
.rail__toggle-bars::after { top: 5px; }

.site-rail[data-open] .rail__toggle-bars { background: transparent; }
.site-rail[data-open] .rail__toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.site-rail[data-open] .rail__toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

.rail__nav {
  flex: 1 1 auto;
  min-height: 0;
}

.rail__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail__item { min-width: 0; }

.rail__link {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 6px 10px 11px;
  color: var(--steel);
  text-decoration: none;
  border-radius: 2px;
  transition: color 0.18s ease, background-color 0.18s ease;
}
.rail__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 1px;
  background: var(--cyan);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}
.rail__link:hover {
  color: var(--ice);
  background: rgba(34, 230, 255, 0.06);
}
.rail__link:hover::before { transform: scaleY(0.5); }

.rail__link[aria-current="page"],
.rail__link.is-active {
  color: var(--ice);
  background: rgba(34, 230, 255, 0.09);
}
.rail__link[aria-current="page"]::before,
.rail__link.is-active::before { transform: scaleY(1); }

.rail__idx {
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1;
  letter-spacing: 0.18em;
  color: rgba(127, 166, 196, 0.62);
  transition: color 0.18s ease;
}
.rail__link[aria-current="page"] .rail__idx,
.rail__link.is-active .rail__idx { color: var(--cyan); }

.rail__label {
  font-size: 12.5px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  word-break: break-word;
}

.rail__cta {
  flex: 0 0 auto;
  padding-top: 14px;
  border-top: 1px solid rgba(27, 70, 104, 0.85);
}
.rail__cta .btn {
  padding: 9px 8px;
  font-size: 12.5px;
  line-height: 1.3;
  text-align: center;
}

.rail__progress {
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background: rgba(27, 70, 104, 0.5);
  pointer-events: none;
}
.rail__progress-bar {
  display: block;
  width: 100%;
  height: calc(var(--p, 0) * 100%);
  background: linear-gradient(180deg, var(--cyan) 0%, var(--coral) 100%);
  transition: height 0.09s linear;
}

.rail__scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(4, 16, 29, 0.74);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.btn--accent {
  background: var(--coral);
  color: var(--abyss);
  border-color: var(--coral);
}
.btn--accent:hover { background: #ff8566; color: var(--abyss); }
.btn--accent:focus-visible { outline-color: var(--coral); }

.btn--ghost {
  background: rgba(13, 43, 74, 0.55);
  color: var(--ice);
  border-color: rgba(127, 166, 196, 0.45);
}
.btn--ghost:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(34, 230, 255, 0.08);
}

.btn--cyan {
  background: var(--cyan);
  color: var(--abyss);
  border-color: var(--cyan);
}
.btn--cyan:hover { background: #7df3ff; color: var(--abyss); }

.btn--sm { padding: 7px 13px; font-size: 12.5px; }
.btn--block { display: flex; width: 100%; }

/* ============ Tags ============ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid currentColor;
  border-radius: 2px;
}
.tag--lemon { background: var(--lemon); color: var(--abyss); border-color: var(--lemon); }
.tag--coral { background: var(--coral); color: var(--abyss); border-color: var(--coral); }
.tag--cyan { background: rgba(34, 230, 255, 0.12); color: var(--cyan); border-color: rgba(34, 230, 255, 0.5); }
.tag--green { background: rgba(61, 224, 160, 0.1); color: var(--green); border-color: rgba(61, 224, 160, 0.5); }

/* ============ Panels & editorial blocks ============ */
.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--panel);
  border: 1px solid var(--grid);
  border-radius: 3px;
}
.panel--glass {
  background: linear-gradient(160deg, rgba(13, 43, 74, 0.74) 0%, rgba(4, 16, 29, 0.58) 100%);
  border-color: rgba(34, 230, 255, 0.18);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.panel--solid { background: var(--panel); }
.panel__index {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--grid);
}
.section-head__title {
  margin: 0;
  font-family: var(--font-editorial);
  font-size: clamp(1.35rem, 2.3vw, 1.85rem);
  line-height: 1.25;
}
.section-head__meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
}

/* ============ Breadcrumbs ============ */
.breadcrumbs {
  padding-block: 14px;
  border-bottom: 1px solid rgba(27, 70, 104, 0.75);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--steel);
}
.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.breadcrumbs__list li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--grid);
}
.breadcrumbs a { color: var(--steel); text-decoration: none; }
.breadcrumbs a:hover { color: var(--cyan); }
.breadcrumbs [aria-current="page"] { color: var(--ice); }

/* ============ Data figures ============ */
.data-figure {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.data-figure__value {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}
.data-figure__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
}

/* ============ Media shells ============ */
.media {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(150deg, #0D2B4A 0%, #04101D 100%);
  border: 1px solid var(--grid);
  border-radius: 3px;
}
.media img,
.media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.06);
  transition: filter 0.3s ease;
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 16, 29, 0.12) 0%, rgba(4, 16, 29, 0.74) 100%);
  pointer-events: none;
}
.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 4 / 5; }
.media--square { aspect-ratio: 1 / 1; }
.media__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--steel);
}

/* ============ Footer ============ */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 112px);
  padding-top: clamp(40px, 6vw, 72px);
  background: linear-gradient(180deg, rgba(7, 26, 47, 0) 0%, rgba(4, 16, 29, 0.96) 18%, #04101D 100%);
  border-top: 1px solid var(--grid);
  color: var(--ice);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(260px, 42%);
  height: 2px;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--coral) 100%);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(110px, 0.8fr)) minmax(210px, 1.3fr);
  gap: 34px 24px;
}

.footer__brand { min-width: 0; }

.footer__brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ice);
  text-decoration: none;
}
.footer__brand-link:hover { color: var(--ice); }

.footer__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  color: var(--abyss);
  background: var(--cyan);
  border-radius: 2px;
}

.footer__brand-name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.footer__line {
  margin: 14px 0 0;
  max-width: 26ch;
  font-size: 13px;
  line-height: 1.7;
  color: var(--steel);
}

.footer__tagline {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.7;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(127, 166, 196, 0.75);
}

.footer__group { min-width: 0; }

.footer__group-title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__link {
  display: inline-block;
  color: var(--steel);
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
}
.footer__link:hover {
  color: var(--ice);
  transform: translateX(3px);
}

.footer__contact-block { min-width: 0; }

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__contact-label {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(127, 166, 196, 0.7);
}

.footer__contact-value {
  display: block;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ice);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.footer__note {
  margin: 16px 0 0;
  padding-left: 11px;
  border-left: 2px solid var(--coral);
  font-size: 12px;
  line-height: 1.65;
  color: var(--steel);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  margin-top: clamp(34px, 5vw, 58px);
  padding-block: 20px 30px;
  border-top: 1px solid rgba(27, 70, 104, 0.7);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--steel);
}
.footer__copy { margin: 0; }
.footer__icp { margin: 0; color: rgba(127, 166, 196, 0.72); }

/* ============ Responsive ============ */
@media (max-width: 1180px) {
  .footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer__brand,
  .footer__contact-block {
    grid-column: span 3;
  }
  .footer__line { max-width: 42ch; }
}

@media (max-width: 1024px) {
  body {
    padding-left: 0;
    padding-top: 60px;
  }

  .site-rail {
    right: 0;
    bottom: auto;
    width: 100%;
    height: 60px;
    flex-direction: row;
    background: rgba(7, 26, 47, 0.96);
    border-right: 0;
    border-bottom: 1px solid var(--grid);
  }

  .rail__inner {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    overflow: visible;
  }

  .rail__brand {
    align-items: center;
    gap: 8px;
    margin-right: auto;
  }
  .rail__mark { width: 28px; height: 28px; font-size: 16px; }
  .rail__brand-name { font-size: 15px; }
  .rail__brand-desc { display: none; }

  .rail__cta {
    order: 2;
    margin: 0;
    padding: 0;
    border: 0;
  }
  .rail__cta .btn {
    padding: 7px 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .rail__toggle {
    order: 3;
    display: inline-flex;
  }

  .rail__nav {
    position: fixed;
    top: 60px;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 95;
    display: block;
    flex: none;
    width: min(340px, 86vw);
    padding: 18px 18px 40px;
    overflow-y: auto;
    background: linear-gradient(180deg, #0A2340 0%, #04101D 100%);
    border-left: 1px solid var(--grid);
    box-shadow: -24px 0 48px rgba(0, 0, 0, 0.5);
    transform: translateX(102%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .site-rail[data-open] .rail__nav { transform: translateX(0); }

  .rail__list { gap: 2px; }

  .rail__link {
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
    padding: 13px 12px;
  }
  .rail__idx { font-size: 11px; letter-spacing: 0.16em; }
  .rail__label { font-size: 15px; line-height: 1.4; }

  .rail__scrim { display: none; }
  .site-rail[data-open] .rail__scrim { display: block; }

  .rail__progress {
    top: auto;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 3px;
    background: rgba(27, 70, 104, 0.5);
  }
  .rail__progress-bar {
    width: calc(var(--p, 0) * 100%);
    height: 100%;
    background: linear-gradient(90deg, var(--cyan) 0%, var(--coral) 100%);
    transition: width 0.09s linear;
  }

  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer__brand,
  .footer__contact-block { grid-column: span 2; }
}

@media (max-width: 700px) {
  .footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }
  .footer__brand,
  .footer__contact-block { grid-column: span 1; }
  .footer__bottom { font-size: 11px; }
}

@media (max-width: 480px) {
  .rail__cta { display: none; }
  .rail__toggle-text { display: none; }
  .rail__toggle { padding: 9px 10px; }
}

@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;
  }
  .rail__progress-bar { transition: none; }
}
