:root {
  --field-0: #020906;
  --field-1: #06130e;
  --field-2: #0a1d15;
  --field-3: #10281e;
  --field-text: #edf6f0;
  --field-soft: rgba(237, 246, 240, .72);
  --field-muted: rgba(237, 246, 240, .5);
  --field-line: rgba(77, 224, 160, .14);
  --field-line-strong: rgba(77, 224, 160, .28);
  --field-mint: #4de0a0;
  --field-gold: #d5bc68;
  --field-blue: #4063c8;
  --field-panel: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  --field-shadow: 0 28px 80px rgba(0, 0, 0, .24);
}

html {
  color-scheme: dark;
  background: var(--field-0);
}

body {
  color: var(--field-text);
  background:
    radial-gradient(circle at 82% 9%, rgba(27, 115, 78, .08), transparent 26%),
    radial-gradient(circle at 10% 52%, rgba(41, 67, 145, .055), transparent 30%),
    var(--field-0);
}

body::before {
  z-index: 0;
  opacity: .72;
  background-image:
    linear-gradient(rgba(77, 224, 160, .032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 224, 160, .032) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, rgba(0,0,0,.82) 78%, transparent);
}

main,
footer {
  position: relative;
  z-index: 1;
}

.cursor-aura {
  background: radial-gradient(circle, rgba(77, 224, 160, .095), transparent 65%);
  mix-blend-mode: screen;
}

/* A single uninterrupted measurement field */
.hero {
  min-height: 980px;
  padding: 184px 24px 76px;
  background:
    radial-gradient(circle at 72% 39%, rgba(21, 138, 88, .20), transparent 31%),
    radial-gradient(circle at 83% 20%, rgba(48, 72, 169, .15), transparent 25%),
    linear-gradient(122deg, #020805 0%, #04110c 48%, #061a12 100%);
}

.hero::before {
  z-index: 0;
  opacity: .8;
  background-image:
    linear-gradient(rgba(77, 224, 160, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 224, 160, .04) 1px, transparent 1px),
    linear-gradient(90deg, transparent 49.95%, rgba(213, 188, 104, .1) 50%, transparent 50.05%);
  background-size: 72px 72px, 72px 72px, 100% 100%;
  mask-image: radial-gradient(ellipse at 72% 42%, #000 0 28%, rgba(0,0,0,.78) 53%, transparent 90%);
}

.hero::after {
  inset: auto -12% -20% -12%;
  z-index: 1;
  height: 58%;
  background-image:
    linear-gradient(rgba(77,224,160,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77,224,160,.12) 1px, transparent 1px);
  background-size: 58px 42px;
  clip-path: none;
  opacity: .55;
  transform: perspective(680px) rotateX(63deg);
  transform-origin: bottom;
  mask-image: linear-gradient(to top, #000 0, rgba(0,0,0,.8) 38%, transparent 84%);
}

.hero .glow {
  top: 4%;
  right: 4%;
  width: min(64vw, 920px);
  height: min(64vw, 920px);
  background:
    radial-gradient(circle, rgba(77,224,160,.12), transparent 53%),
    repeating-radial-gradient(circle, transparent 0 12%, rgba(77,224,160,.035) 12.2% 12.5%, transparent 12.8% 22%);
  filter: blur(2px);
}

.hero .in {
  z-index: 4;
}

.hero-grid {
  position: relative;
  display: block;
  min-height: 560px;
}

.hero-copy {
  width: min(47vw, 650px);
  padding-top: 34px;
}

.hero h1 {
  color: #f3f7f3;
  text-shadow: 0 12px 42px rgba(0,0,0,.42);
  white-space: pre-line;
}

.hero h1::first-line {
  color: #f5f7f2;
}

.kicker,
.hero p.sub {
  color: var(--field-muted);
}

.hero-name,
.kicker::before {
  color: var(--field-mint);
}

.hero-visual {
  position: absolute;
  top: -112px;
  right: -2.5%;
  width: min(72vw, 940px);
  aspect-ratio: 1009 / 825;
  contain: none;
  overflow: visible;
  pointer-events: none;
  transform-origin: 60% 50%;
  filter: drop-shadow(0 36px 70px rgba(0,0,0,.32));
}

.hero-visual::before,
.hero-visual::after {
  opacity: 0 !important;
}

.proof-field-art {
  inset: -8%;
  overflow: visible;
  border-radius: 0;
  opacity: .96;
  mask-image:
    linear-gradient(90deg, transparent 0, rgba(0,0,0,.55) 9%, #000 27% 82%, transparent 100%),
    radial-gradient(ellipse at 59% 50%, #000 0 57%, rgba(0,0,0,.98) 70%, transparent 94%);
  mask-composite: intersect;
}

.proof-field-art img {
  object-position: 100% 50%;
  filter: saturate(1.08) contrast(1.08) brightness(.96);
  transform: scale(1.08);
  transform-origin: 76% 50%;
}

#signal-canvas {
  border-radius: 0;
  opacity: .42;
  mask-image: radial-gradient(ellipse at 55% 48%, #000 0 58%, transparent 91%);
}

.proof-field-sweep {
  opacity: .62;
}

.measure-tick {
  opacity: .3;
}

.core-caption {
  color: rgba(237,246,240,.74);
  background: rgba(2,9,6,.62);
  border-color: rgba(77,224,160,.18);
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
}

.core-caption.c1 { right: 8%; }
.core-caption.c2 { right: 8%; }
.core-caption.c3 { left: 7%; }

.stats {
  margin-top: 50px;
  background: linear-gradient(90deg, rgba(2,9,6,.24), rgba(77,224,160,.025), rgba(2,9,6,.24));
  border-bottom: 1px solid rgba(255,255,255,.11);
  backdrop-filter: blur(8px);
}

.stat .l {
  color: var(--field-muted);
}

/* Editorial sections stay inside the same field */
.overview,
section.wrap {
  color: var(--field-text);
}

.overview {
  padding-top: 104px;
  background: linear-gradient(to bottom, rgba(6,19,14,.86), transparent);
  box-shadow: 0 0 0 100vmax rgba(4,13,9,.54);
  clip-path: inset(0 -100vmax);
}

#ch1,
#ch2,
#ch3,
#ch4 {
  background: transparent !important;
  box-shadow: none !important;
  clip-path: none !important;
}

#ch1::before,
#ch2::before,
#ch3::before,
#ch4::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: -1;
  pointer-events: none;
  transform: none;
  background:
    radial-gradient(circle at 88% 12%, rgba(77,224,160,.055), transparent 22%),
    linear-gradient(180deg, transparent, rgba(255,255,255,.012) 44%, transparent);
}

#ch2::before,
#ch4::before {
  background:
    radial-gradient(circle at 10% 18%, rgba(55,83,178,.065), transparent 24%),
    rgba(8,26,19,.52);
}

.chapter-head {
  border-bottom-color: var(--field-line);
}

.chapter-head h2,
.block h3,
.card h4,
.card h5,
.sup h4,
.k h4,
.lims h4,
.cyc h5,
.smp h5 {
  color: var(--field-text);
}

.chapter-head .num,
.ovcard .n,
.ovcard .go {
  color: var(--field-mint);
  background-color: transparent;
}

.block h3::before,
.chapter-head .num::after {
  background-color: var(--field-mint);
}

.block + .block,
.ovgrid,
.ovcard + .ovcard {
  border-color: var(--field-line);
}

.block .bsub,
.cap p,
.acc ul,
.sup p,
.sup ul,
.k ul,
.lims p,
.smp p,
.smpnote,
.fccnotes,
.tl ul,
.auditband,
.note-band small {
  color: var(--field-muted);
}

.ovcard {
  color: var(--field-text);
}

.ovcard::before {
  background: linear-gradient(155deg, rgba(77,224,160,.095), rgba(255,255,255,.02));
  border-top: 1px solid var(--field-line-strong);
}

.ovcard:hover {
  color: #fff;
}

.card,
.cap,
.acc,
.sup,
.k,
.lims,
.cyc,
.smp,
.fccnotes,
.auditband,
ol.nice li,
.tablewrap,
.org,
.szgrid figure {
  color: var(--field-text);
  background: var(--field-panel), rgba(6,19,14,.92);
  border-color: var(--field-line);
  box-shadow: var(--field-shadow);
}

.card:hover,
.cap:hover,
.acc:hover,
.sup:hover,
.k:hover,
.lims:hover,
.cyc:hover,
.smp:hover {
  border-color: var(--field-line-strong);
}

/* Vector atlas */
.globe-card {
  padding: 0;
  background:
    radial-gradient(circle at 75% 31%, rgba(77,224,160,.08), transparent 24%),
    linear-gradient(145deg, #03100b, #071b13 58%, #030c08);
  border-color: var(--field-line-strong);
  border-radius: 8px;
  overflow: hidden;
}

.globe-visual {
  padding: 18px 18px 0;
}

.world-map-shell {
  aspect-ratio: 1600 / 820 !important;
  overflow: hidden;
  border: 1px solid rgba(77,224,160,.18);
  border-radius: 4px;
  background:
    radial-gradient(circle at 50% 48%, rgba(16,53,39,.84), rgba(2,9,6,.97) 70%),
    #020906;
  box-shadow: inset 0 0 90px rgba(0,0,0,.32), 0 34px 70px rgba(0,0,0,.24);
}

.world-map-shell::before {
  z-index: 2;
  opacity: .52;
  background:
    linear-gradient(rgba(77,224,160,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77,224,160,.04) 1px, transparent 1px);
  background-size: 8.333% 12.5%;
}

.world-map-shell::after {
  z-index: 3;
  background:
    radial-gradient(circle at 82% 34%, rgba(77,224,160,.16), transparent 12%),
    radial-gradient(circle at 18% 27%, rgba(64,99,200,.12), transparent 15%),
    linear-gradient(180deg, transparent 58%, rgba(2,9,6,.42));
}

.world-map-img {
  object-fit: contain;
  filter: none;
  opacity: 1;
}

.atlas-hud {
  position: absolute;
  top: 18px;
  left: 20px;
  z-index: 7;
  display: grid;
  gap: 4px;
  pointer-events: none;
}

.atlas-hud span,
.atlas-hud code {
  width: max-content;
  padding: 5px 8px;
  font-family: var(--proof-mono);
  font-size: .58rem;
  letter-spacing: .1em;
}

.atlas-hud span {
  color: var(--field-mint);
  background: rgba(2,9,6,.72);
  border: 1px solid var(--field-line-strong);
}

.atlas-hud code {
  color: rgba(237,246,240,.42);
}

.atlas-scan {
  position: absolute;
  inset: -20% 0 auto;
  z-index: 5;
  height: 34%;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(77,224,160,.055), rgba(77,224,160,.2), transparent);
  mix-blend-mode: screen;
  animation: atlas-scan 7.5s linear infinite;
}

@keyframes atlas-scan {
  from { transform: translateY(-40%); }
  to { transform: translateY(430%); }
}

.world-routes {
  z-index: 5;
}

.world-routes path {
  stroke: rgba(77,224,160,.72);
  stroke-width: 1.2px;
  stroke-dasharray: 4px 7px;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 2px rgba(77,224,160,.7));
}

.world-routes path.active {
  stroke: var(--field-gold);
  stroke-width: 2px;
  stroke-dasharray: 6px 8px;
  filter: drop-shadow(0 0 4px rgba(213,188,104,.88));
}

.globe-marker .pin {
  width: 10px;
  height: 10px;
  background: #f4fff8;
  border: 2px solid var(--field-mint);
  box-shadow: 0 0 0 6px rgba(77,224,160,.12), 0 0 24px rgba(77,224,160,.8);
}

.globe-marker {
  width: 24px;
  height: 24px;
}

.globe-marker.active .pin {
  border-color: var(--field-gold);
  box-shadow: 0 0 0 7px rgba(213,188,104,.15), 0 0 30px rgba(77,224,160,1);
}

.globe-marker .label {
  color: rgba(237,246,240,.82);
  background: rgba(2,9,6,.82);
  border-color: var(--field-line-strong);
}

.globe-marker.active .label {
  color: var(--field-0);
  background: var(--field-gold);
  border-color: var(--field-gold);
}

.map-site-switcher {
  display: flex;
  gap: 7px;
  padding: 12px 18px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.map-site-switcher::-webkit-scrollbar {
  display: none;
}

.map-site-switcher button {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--field-muted);
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 3px;
  font: 650 .73rem var(--proof-sans);
}

.map-site-switcher button span {
  color: var(--field-mint);
  font: 700 .58rem var(--proof-mono);
}

.map-site-switcher button b {
  white-space: nowrap;
}

.map-site-switcher button.active {
  color: var(--field-0);
  background: var(--field-mint);
  border-color: var(--field-mint);
  box-shadow: 0 0 22px rgba(77,224,160,.2);
}

.map-site-switcher button.active span {
  color: var(--field-0);
}

.map-status {
  color: var(--field-text);
  background: rgba(255,255,255,.025);
  border-color: rgba(255,255,255,.075);
}

/* Five facilities become cinematic evidence, not pasted thumbnails */
.site-photo-grid {
  gap: 10px;
}

.site-photo-card {
  position: relative;
  min-width: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
  color: var(--field-text);
  background: var(--field-1);
  border-color: var(--field-line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
}

.site-photo-card img {
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: cover;
  filter: saturate(.72) contrast(1.08) brightness(.7);
  transition: filter .45s ease, transform .65s var(--proof-ease);
}

.site-photo-card .cap {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  min-height: 48%;
  align-items: flex-end;
  padding: 58px 15px 14px;
  color: #fff;
  background: linear-gradient(transparent, rgba(2,9,6,.96));
}

.site-photo-card .cap small {
  color: rgba(237,246,240,.5);
}

.site-photo-card:hover img,
.site-photo-card.active img {
  filter: saturate(.98) contrast(1.05) brightness(.9);
  transform: scale(1.025);
}

.site-photo-card.active {
  border-color: var(--field-mint);
  box-shadow: 0 0 0 1px rgba(77,224,160,.14), 0 26px 58px rgba(0,0,0,.3);
}

/* Keep the Shenzhen location map as the sole, intentional branch visual. */
.szgrid.location-only {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1080px;
}

.szgrid.location-only figure:first-child {
  grid-column: 1;
  grid-row: auto;
}

/* Dark laboratory modules */
.org {
  background:
    linear-gradient(rgba(77,224,160,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77,224,160,.03) 1px, transparent 1px),
    rgba(5,18,13,.94);
  background-size: 38px 38px;
}

.orgnode,
.orgnode.lv2 {
  color: var(--field-soft);
  background: rgba(255,255,255,.035);
  border-color: var(--field-line);
}

.orgnode.top {
  color: var(--field-0);
  background: var(--field-mint);
  border-color: var(--field-mint);
}

.orgline,
.orgsub {
  border-color: var(--field-line-strong);
  background-color: var(--field-line-strong);
}

.tablewrap {
  background: rgba(5,18,13,.94);
  border-color: var(--field-line);
}

thead th {
  color: var(--field-mint);
  background: #091a13;
}

tbody td {
  color: var(--field-soft);
  border-top-color: rgba(77,224,160,.09);
}

tbody tr:nth-child(even) {
  background: rgba(77,224,160,.025);
}

tbody tr:hover {
  background: rgba(77,224,160,.07);
}

tbody td.c {
  color: var(--field-gold);
}

.prodstrip,
.flow,
.note-band,
.chart {
  background-color: rgba(3,12,8,.96);
  border-color: var(--field-line);
}

.prodstrip .ph,
.logorow span,
.eqgallery .ph,
.split .imgcard {
  background: linear-gradient(145deg, #dce5df, #b8c6bd);
  border-color: rgba(77,224,160,.14);
}

.eqgallery .ph {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28), inset 0 -24px 42px rgba(6,19,14,.08);
}

.eqgallery .ph img {
  filter: saturate(.7) contrast(1.08) brightness(.86);
}

.timeline::before {
  background: linear-gradient(90deg, var(--field-mint), var(--field-gold), var(--field-blue));
}

.tl::before {
  border-color: var(--field-mint);
  background: var(--field-0);
  box-shadow: 0 0 18px rgba(77,224,160,.4);
}

.tl .yr,
.k .kn,
.sup .badge,
.cyc .step {
  color: var(--field-mint);
}

.sup .badge {
  background: rgba(77,224,160,.07);
  border-color: var(--field-line-strong);
}

.note-band,
.flow {
  box-shadow: var(--field-shadow);
}

.smpnote {
  color: rgba(236,217,150,.78);
  background: rgba(213,188,104,.09);
  border-color: rgba(213,188,104,.25);
}

footer {
  background:
    radial-gradient(circle at 72% 0, rgba(64,99,200,.12), transparent 32%),
    linear-gradient(to bottom, rgba(6,19,14,.5), #020906 22%);
}

footer .credit {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

@media (max-width: 1100px) {
  .hero-copy {
    width: min(50vw, 570px);
  }

  .hero-visual {
    top: -55px;
    right: -3%;
    width: min(72vw, 800px);
  }
}

@media (max-width: 760px) {
  body::before {
    background-size: 48px 48px;
  }

  .hero {
    min-height: auto;
    padding: 148px 16px 42px;
  }

  .hero::after {
    bottom: 8%;
    height: 32%;
    opacity: .34;
  }

  .hero-grid {
    min-height: 0;
  }

  .hero-copy {
    width: 100%;
    min-height: 400px;
    padding-top: 0;
  }

  .hero h1,
  :lang(en) .hero h1 {
    max-width: 100%;
    font-size: clamp(3rem, 13.5vw, 4.3rem);
    overflow-wrap: anywhere;
  }

  .hero-visual {
    position: relative;
    inset: auto;
    width: calc(100% + 32px);
    margin: -38px -16px 0;
    aspect-ratio: 1009 / 825;
    overflow: hidden;
    filter: drop-shadow(0 28px 54px rgba(0,0,0,.28));
  }

  .proof-field-art {
    inset: 0;
    mask-image: radial-gradient(ellipse at 50% 50%, #000 0 60%, rgba(0,0,0,.9) 72%, transparent 95%);
  }

  .proof-field-art img {
    object-position: left center;
    transform: none;
  }

  .core-caption.c1 { right: 8%; }
  .core-caption.c2 { right: 8%; }
  .core-caption.c3 { left: 8%; }

  .stats {
    margin-top: 4px;
  }

  .overview {
    padding-top: 72px;
  }

  .chapter-head {
    padding-top: 112px;
  }

  .globe-visual {
    padding: 8px 8px 0;
  }

  .world-map-shell {
    border-radius: 2px;
  }

  .atlas-hud {
    top: 8px;
    left: 8px;
  }

  .atlas-hud code {
    display: none;
  }

  .atlas-hud span {
    font-size: .46rem;
  }

  .map-site-switcher {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 10px 8px 3px;
    overflow: visible;
  }

  .map-site-switcher button {
    min-width: 0;
    min-height: 46px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 5px 2px;
    font-size: .58rem;
    line-height: 1.05;
  }

  .map-site-switcher button span {
    font-size: .47rem;
  }

  .map-site-switcher button b {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .map-status {
    margin: 8px;
  }

  .site-photo-grid {
    margin-right: -16px;
    padding-right: 16px;
  }

  .site-photo-card {
    flex-basis: 82%;
  }

  .tablewrap {
    margin-inline: -8px;
    border-radius: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atlas-scan {
    animation: none;
    transform: translateY(165%);
  }
}
