:root {
  color-scheme: dark;
  --void: #050807;
  --carbon: #0b110e;
  --panel: #0f1613;
  --panel-hi: #141e19;
  --ink: #eef3ec;
  --soft: #9aa89e;
  --muted: #6e7d73;
  --line: #212e27;
  --line-hi: #3a4f42;
  --acid: #c7fc63;
  --acid-dim: #92c83e;
  --mono: "IBM Plex Mono", "JetBrains Mono", Consolas, monospace;
  --sans: "Inter", "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font: 15.5px/1.6 var(--sans);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body { background: var(--void); color: var(--ink); margin: 0; -webkit-font-smoothing: antialiased; }
button, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:not(:disabled), a[href] { cursor: pointer; }
button { color: inherit; }
button, a, input, textarea { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }
[hidden] { display: none !important; }
a { color: var(--acid); text-underline-offset: .25em; }
.wrap { width: min(86rem, 100% - clamp(1.5rem, 6vw, 7rem)); margin-inline: auto; }

/* Sticky obsidian glass header */
.masthead {
  position: sticky; top: 0; z-index: 20;
  background: rgba(5, 8, 7, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.masthead-inner { display: flex; gap: clamp(1rem, 3.5vw, 3.2rem); align-items: center; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-size: 1.25rem; line-height: 1; font-weight: 700; letter-spacing: -.04em; color: var(--ink); text-decoration: none; }
.brand i { position: relative; display: inline-block; width: 1.45rem; height: 1.5rem; color: var(--acid); }
.brand i::before, .brand i::after { content: ""; position: absolute; width: .58rem; height: 1.4rem; top: .05rem; left: .2rem; border: 2px solid currentColor; border-radius: 50%; transform: rotate(27deg); }
.brand i::after { left: .7rem; transform: rotate(27deg) scaleY(.78); }
.brand-tag { font: 500 .68rem/1 var(--mono); letter-spacing: .16em; color: var(--muted); border-left: 1px solid var(--line-hi); padding-left: .6rem; margin-left: .15rem; }
.masthead nav { display: flex; gap: clamp(1rem, 2.6vw, 2.4rem); align-items: center; margin-left: auto; }
.masthead nav a { color: #b7c4ba; font-size: .85rem; font-weight: 550; letter-spacing: .04em; text-decoration: none; transition: color .15s; }
.masthead nav a:hover { color: var(--acid); }
.language { color: #c7d4ca; background: transparent; border: 1px solid var(--line-hi); padding: .22rem .65rem; font: 500 .75rem/1.3 var(--mono); letter-spacing: .1em; transition: border-color .15s, color .15s; }
.language:hover { border-color: var(--acid); color: var(--acid); }

/* Aerospace Cinema Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; background: #040706; border-bottom: 1px solid var(--line); }
.hero-media { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-photo { position: absolute; right: 0; top: 0; width: 68%; height: 100%; object-fit: cover; object-position: 70% 50%; opacity: .52; filter: saturate(1.1) contrast(1.08); }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, #050807 14%, rgba(5,8,7,.92) 40%, rgba(5,8,7,.48) 68%, rgba(5,8,7,.25) 100%),
              linear-gradient(0deg, #050807 0%, transparent 28%, transparent 80%, rgba(5,8,7,.5) 100%);
}
.hero-grid-overlay {
  position: absolute; inset: 0; opacity: .22;
  background-image: linear-gradient(to right, rgba(199,252,99,.08) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(199,252,99,.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 65% 45%, #000 10%, transparent 72%);
}
.laser-beam-line {
  position: absolute; left: 0; right: 0; top: 52%; height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(199,252,99,.08) 25%, rgba(199,252,99,.55) 55%, rgba(167,139,250,.45) 80%, transparent 98%);
  box-shadow: 0 0 18px rgba(199,252,99,.35);
  animation: sweep-glow 7s ease-in-out infinite alternate;
}
@keyframes sweep-glow { from { opacity: .45; transform: scaleX(.96); } to { opacity: .95; transform: scaleX(1.02); } }

.hero-body { padding-block: clamp(3.4rem, 7.5vw, 6.8rem) clamp(2.6rem, 5vw, 4.4rem); }
.product-name { display: inline-flex; align-items: center; gap: .6rem; font: 500 .76rem/1.2 var(--mono); color: var(--acid); letter-spacing: .16em; margin: 0 0 1.2rem; }
.pulse-dot { width: 8px; height: 8px; background: var(--acid); box-shadow: 0 0 12px var(--acid); }
h1, h2, h3, h4 { margin: 0; line-height: 1.18; }
h1 { font-size: clamp(2.3rem, 4.8vw, 4.4rem); letter-spacing: -.035em; font-weight: 760; max-width: 19ch; color: #f5faf4; text-wrap: balance; }
.lead { color: #b9c7bd; max-width: 44rem; margin: 1.25rem 0 1.9rem; line-height: 1.78; font-size: clamp(.96rem, 1.18vw, 1.12rem); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; }
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: .65rem;
  min-height: 3rem; padding: .68rem 1.45rem; border: 1px solid transparent;
  font-size: .9rem; font-weight: 680; letter-spacing: .02em; text-decoration: none;
  transition: background-color .16s, border-color .16s, color .16s, box-shadow .16s;
}
.button.compact { min-height: 2.4rem; padding: .42rem 1rem; font-size: .82rem; }
.primary { background: var(--acid); color: #0a1006; border-color: var(--acid); }
.primary:hover { background: #dcff96; border-color: #dcff96; box-shadow: 0 0 28px -8px rgba(199,252,99,.7); }
.ghost { background: rgba(11, 17, 14, 0.72); color: var(--ink); border-color: var(--line-hi); }
.ghost:hover { border-color: var(--acid); color: var(--acid); background: rgba(20, 30, 22, 0.85); }

/* Telemetry Strip */
.telemetry-strip { border-top: 1px solid var(--line); background: rgba(8, 12, 10, 0.88); }
.telemetry-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.telem-item { padding: 1.35rem 1.2rem; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: .25rem; }
.telem-item:first-child { padding-left: 0; }
.telem-item:last-child { border-right: 0; }
.telem-item strong { font: 700 clamp(1.35rem, 2.2vw, 2.05rem)/1.1 var(--mono); color: var(--ink); letter-spacing: -.03em; }
.telem-item span { font-size: .8rem; color: var(--soft); letter-spacing: .04em; }

/* Section Headers */
.sec-kicker { display: flex; align-items: center; gap: .7rem; font: 500 .73rem/1.2 var(--mono); letter-spacing: .16em; color: var(--acid); margin: 0 0 .7rem; }
.sec-kicker::before { content: ""; width: 18px; height: 2px; background: var(--acid); }
h2 { font-size: clamp(1.65rem, 2.8vw, 2.55rem); letter-spacing: -.03em; font-weight: 740; margin-bottom: .75rem; color: #f2f7f1; }
.sec-sub { color: var(--soft); max-width: 58rem; margin: 0 0 1.6rem; line-height: 1.75; font-size: .96rem; }

/* Centerpiece Full-Chain Cinema Showcase */
.showcase { padding-block: clamp(3.2rem, 6vw, 5.5rem); border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 50% 0%, rgba(30, 48, 36, .35), transparent 62%), var(--void); }
.wavelength-hud { display: flex; flex-wrap: wrap; gap: .65rem; margin-bottom: 1.25rem; }
.hud-pill {
  display: inline-flex; align-items: center; gap: .55rem; padding: .45rem .85rem;
  background: var(--carbon); border: 1px solid var(--line); font-size: .82rem;
}
.hud-pill .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.hud-pill em { font: 600 .78rem/1 var(--mono); font-style: normal; }
.hud-pill strong { font-weight: 560; color: #d5dfd8; }
.wl-pump .dot { background: #fbbf24; box-shadow: 0 0 8px #fbbf24; } .wl-pump em { color: #fde68a; }
.wl-raman .dot { background: #34d399; box-shadow: 0 0 8px #34d399; } .wl-raman em { color: #6ee7b7; }
.wl-stokes .dot { background: #fb7185; box-shadow: 0 0 8px #fb7185; } .wl-stokes em { color: #fda4af; }
.wl-spot .dot { background: #38bdf8; box-shadow: 0 0 8px #38bdf8; } .wl-spot em { color: #7dd3fc; }

.cinema-frame { position: relative; margin: 0; background: #070b0a; border: 1px solid var(--line-hi); padding: clamp(.6rem, 1.2vw, 1.15rem); }
.corner { position: absolute; width: 14px; height: 14px; border-color: var(--acid); border-style: solid; pointer-events: none; z-index: 2; }
.corner.tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.corner.tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.corner.bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.corner.br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.cinema-link { position: relative; display: block; overflow: hidden; background: #070b0a; }
.cinema-link img { width: 100%; display: block; transition: transform .45s cubic-bezier(.19,1,.22,1); }
.cinema-link:hover img { transform: scale(1.008); }
.zoom-badge {
  position: absolute; right: 14px; bottom: 14px;
  background: rgba(5, 8, 7, 0.88); border: 1px solid var(--line-hi); color: var(--acid);
  padding: .36rem .75rem; font: 500 .76rem/1.2 var(--mono); letter-spacing: .06em;
}
.cinema-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  padding-top: .95rem; margin-top: .95rem; border-top: 1px solid var(--line);
}
.cinema-note { font-size: .82rem; color: var(--soft); }
.example-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.example-links a { font: 550 .82rem/1.4 var(--mono); color: var(--acid); text-decoration: none; border-bottom: 1px solid rgba(199,252,99,.38); padding-bottom: 2px; }
.example-links a:hover { border-bottom-color: var(--acid); }

/* Mission-Control Setup & Licensing Grid */
.mission-section { padding-block: clamp(3.2rem, 6vw, 5.5rem); }
.page-grid { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(19rem, .78fr); align-items: start; gap: clamp(2rem, 4vw, 3.8rem); }
.tabs { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-bottom: 0; background: var(--carbon); }
.tabs button {
  flex: 1 1 auto; min-height: 2.95rem; padding: .5rem .85rem;
  color: var(--soft); font: 600 .8rem/1.2 var(--mono); letter-spacing: .03em;
  background: transparent; border: 0; border-right: 1px solid var(--line); border-bottom: 2px solid transparent;
  transition: background-color .15s, color .15s;
}
.tabs button:last-child { border-right: 0; }
.tabs button:hover { color: var(--ink); background: var(--panel); }
.tabs button[aria-selected=true] { color: var(--acid); background: var(--panel-hi); border-bottom-color: var(--acid); }

.host-panel, .license-card { position: relative; background: var(--panel); border: 1px solid var(--line); padding: clamp(1.25rem, 2.4vw, 2.1rem); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.mode { display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 .35rem; color: var(--acid); font: 500 .72rem/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.mode::before { content: ""; width: 12px; height: 2px; background: var(--acid); }
h3 { font-size: clamp(1.3rem, 1.9vw, 1.75rem); letter-spacing: -.025em; color: #f2f7f1; }
#host-instructions, .license-lead { color: var(--soft); font-size: .9rem; margin: .8rem 0 1.15rem; line-height: 1.72; }

.terminal { background: #050908; border: 1px solid var(--line-hi); padding: .75rem 1rem 1rem; }
.terminal-row { display: flex; justify-content: space-between; align-items: center; padding-bottom: .65rem; border-bottom: 1px solid #16221c; }
.term-dots { display: inline-flex; align-items: center; gap: 6px; font: 500 .72rem/1 var(--mono); letter-spacing: .12em; color: var(--muted); }
.term-dots i { width: 7px; height: 7px; border-radius: 50%; background: #2d3f36; display: inline-block; }
.term-dots em { font-style: normal; margin-left: 6px; }
.terminal-row button { border: 1px solid var(--line-hi); padding: .22rem .68rem; background: var(--panel-hi); color: var(--acid); font: 500 .76rem/1.4 var(--mono); }
.terminal-row button:hover { border-color: var(--acid); }
.terminal pre { margin: .85rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: .86rem/1.68 var(--mono); color: #d8f8a8; }
.requirements { color: var(--muted); font-size: .78rem; margin: .7rem 0 0; }
.first-run { border-top: 1px solid var(--line); margin-top: 1.35rem; padding-top: 1.15rem; }
h4 { font-size: .92rem; color: var(--ink); letter-spacing: .01em; }
blockquote { margin: .6rem 0 .45rem; padding: .8rem 1rem; border-left: 2px solid var(--acid); background: rgba(199,252,99,.04); color: #cdd9d0; font-size: .88rem; line-height: 1.7; }
.text-button { border: 0; background: transparent; color: var(--acid); font: 550 .82rem/1.4 var(--mono); padding: .35rem 0; text-decoration: underline; text-underline-offset: .25em; }

/* License Card */
.license-card { border-color: var(--line-hi); background: linear-gradient(160deg, #121c17, #0a0f0d 72%); }
.fact { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding-block: .48rem; border-bottom: 1px solid rgba(42, 60, 50, .45); color: var(--soft); font-size: .84rem; }
.fact strong { color: var(--ink); font-weight: 600; }
#access { margin-top: 1rem; padding-top: .2rem; }
#access-note { color: var(--soft); font-size: .82rem; line-height: 1.65; margin: 0 0 .85rem; }
.wechat-direct { background: #070d0a; border: 1px solid #3c5439; padding: .95rem 1rem; margin-bottom: .9rem; }
.wechat-caption { margin: 0 0 .45rem; font: 600 .76rem/1.3 var(--mono); letter-spacing: .08em; color: var(--acid); }
.wechat-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.wechat-num { font: 700 1.28rem/1.1 var(--mono); letter-spacing: .05em; color: #f6fcf4; }
.wechat-btn { width: auto !important; }
.wechat-tip { margin: .6rem 0 0; font-size: .78rem; color: var(--soft); line-height: 1.6; }
.license-card > #access > .button { width: 100%; margin-bottom: .5rem; }
.license-card .text-button { display: block; margin-top: .3rem; }

/* Footer & Dialogs */
.footer-shell { border-top: 1px solid var(--line); background: #040706; }
.footer { display: flex; justify-content: space-between; align-items: center; padding: 1.8rem 0; }
.footer > a:last-child { font: 500 .8rem/1 var(--mono); color: var(--soft); text-decoration: none; }
.footer > a:last-child:hover { color: var(--acid); }
.outline { background: var(--panel); color: var(--ink); border: 1px solid var(--line-hi); padding: .45rem .9rem; }
#copy-status:not(:empty) {
  position: fixed; z-index: 40; top: 4.8rem; right: 1.5rem;
  background: #101d13; color: var(--acid); border: 1px solid var(--acid-dim);
  padding: .65rem 1.2rem; font: 600 .84rem/1.2 var(--mono); box-shadow: 0 12px 32px rgba(0,0,0,.65);
}
dialog { border: 1px solid var(--line-hi); padding: 1.5rem; background: var(--panel); color: var(--ink); width: min(94vw, 34rem); }
dialog::backdrop { background: rgba(3, 6, 5, 0.82); }
dialog p { color: var(--soft); font-size: .88rem; }
dialog textarea { width: 100%; height: 9rem; background: #060a08; color: var(--acid); border: 1px solid var(--line-hi); padding: .65rem; font: .82rem/1.5 var(--mono); }
dialog .button { margin-top: .8rem; }

@media (max-width: 920px) {
  .telemetry-grid { grid-template-columns: repeat(2, 1fr); }
  .telem-item { border-bottom: 1px solid var(--line); padding: 1rem .9rem; }
  .telem-item:nth-child(2n) { border-right: 0; }
  .page-grid { grid-template-columns: minmax(0, 1fr); gap: 2.2rem; }
  .hero-photo { width: 88%; opacity: .35; }
}
@media (max-width: 520px) {
  .masthead nav { gap: .9rem; }
  .masthead nav a { font-size: .78rem; }
  .brand-tag { display: none; }
  .tabs button { flex: 1 0 48%; border-bottom: 1px solid var(--line); }
  #copy-status:not(:empty) { left: 1rem; right: 1rem; top: auto; bottom: 1rem; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .laser-beam-line { animation: none; }
}
