/* ============================================================
   手搓歼-20 · 公式拆解
   Design language: tactical terminal / engineering blueprint
   ============================================================ */

:root {
  /* surfaces */
  --bg:            #070a0e;
  --bg-elev:       #0b1016;
  --surface:       #0d1319;
  --surface-2:     #111a23;
  --surface-3:     #16212d;

  /* lines */
  --line:          #18232f;
  --line-2:        #22303f;
  --line-3:        #2e4152;

  /* text */
  --txt:           #dde7f2;
  --txt-2:         #8ea1b5;
  --txt-3:         #5b6e82;
  --txt-4:         #3f4f60;

  /* accent */
  --green:         #3ddc97;
  --green-deep:    #17a06b;
  --green-dim:     rgba(61, 220, 151, .14);
  --cyan:          #38bdf8;
  --cyan-dim:      rgba(56, 189, 248, .12);
  --amber:         #f5a524;
  --amber-dim:     rgba(245, 165, 36, .13);
  --red:           #f0533d;

  /* type */
  --mono: "JetBrains Mono", "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;

  /* metrics */
  --rail-w: 108px;
  --maxw: 1080px;
  --radius: 3px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  color: var(--txt);
  background-color: var(--bg);
  background-image:
    radial-gradient(120% 60% at 50% -8%, rgba(61,220,151,.075), transparent 62%),
    radial-gradient(80% 50% at 92% 12%, rgba(56,189,248,.05), transparent 60%),
    linear-gradient(rgba(255,255,255,.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.016) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
  background-position: 0 0, 0 0, -1px -1px, -1px -1px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(61,220,151,.26); color: #fff; }

b, strong { font-weight: 600; color: #fff; }
em { font-style: normal; }

code, .mono { font-family: var(--mono); }

sub, sup { font-size: .68em; line-height: 0; }

/* ============================================================
   scroll progress
   ============================================================ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  z-index: 200;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  box-shadow: 0 0 12px rgba(61,220,151,.55);
  transition: width .1s linear;
}

/* ============================================================
   topbar
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7,10,14,.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
  font-family: var(--mono);
  letter-spacing: .04em;
}
.brand-mark {
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
  text-shadow: 0 0 18px rgba(61,220,151,.5);
}
.brand-slash { color: var(--txt-4); font-size: 13px; }
.brand-name { font-size: 12.5px; color: var(--txt-2); letter-spacing: .12em; }

.topnav {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
}
.topnav::-webkit-scrollbar { display: none; }

.topnav a {
  position: relative;
  flex-shrink: 0;
  padding: 6px 11px;
  font-size: 12.5px;
  font-family: var(--mono);
  letter-spacing: .02em;
  color: var(--txt-3);
  text-decoration: none;
  border-radius: 2px;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.topnav a:hover { color: var(--txt); background: rgba(255,255,255,.035); }
.topnav a.is-active { color: var(--green); }
.topnav a.is-active::after {
  content: "";
  position: absolute;
  left: 11px; right: 11px; bottom: 0;
  height: 1px;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

/* ============================================================
   hero
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-glow {
  position: absolute;
  top: -320px;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 700px;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(61,220,151,.13), rgba(61,220,151,.03) 55%, transparent 72%);
  filter: blur(12px);
}

.hero-inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 88px 28px 76px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .18em;
  color: var(--txt-3);
  text-transform: uppercase;
  margin-bottom: 34px;
}

.pulse-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(61,220,151,.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(61,220,151,.55); }
  70%  { box-shadow: 0 0 0 9px rgba(61,220,151,0); }
  100% { box-shadow: 0 0 0 0 rgba(61,220,151,0); }
}

.meta-sep { color: var(--txt-4); }

.hero-title {
  margin: 0 0 28px;
  font-size: clamp(46px, 9vw, 104px);
  line-height: .98;
  font-weight: 700;
  letter-spacing: -.035em;
  color: #f2f7fc;
}
.hero-title .hl {
  position: relative;
  color: var(--green);
  text-shadow: 0 0 46px rgba(61,220,151,.32);
  display: inline-block;
}
.hero-title .hl::after {
  content: "";
  position: absolute;
  left: 2px; right: 4px; bottom: .08em;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--green) 0 12px, transparent 12px 20px);
  opacity: .4;
}

.hero-sub {
  max-width: 620px;
  margin: 0 0 58px;
  font-size: 16.5px;
  line-height: 1.82;
  color: var(--txt-2);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.hstat {
  background: var(--bg-elev);
  padding: 22px 20px 20px;
  position: relative;
  transition: background .22s var(--ease);
}
.hstat::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(61,220,151,.4), transparent);
  opacity: 0;
  transition: opacity .22s var(--ease);
}
.hstat:hover { background: var(--surface-2); }
.hstat:hover::before { opacity: 1; }

.hstat-num {
  font-family: var(--mono);
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 700;
  line-height: 1.05;
  color: var(--green);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.hstat-num .unit {
  font-size: .46em;
  color: var(--txt-3);
  margin-left: 3px;
  font-weight: 500;
}
.hstat-label {
  margin-top: 9px;
  font-size: 12px;
  color: var(--txt-2);
  letter-spacing: .01em;
}
.hstat-note {
  margin-top: 4px;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--txt-4);
  line-height: 1.5;
}

/* ============================================================
   station (公式工位)
   ============================================================ */
.station {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 82px 28px 0;
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  gap: 0;
}

.station-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 6px;
}

.station-num {
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  color: var(--txt-4);
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  transition: color .3s var(--ease);
}
.station.is-inview .station-num {
  color: var(--green);
  text-shadow: 0 0 28px rgba(61,220,151,.32);
}

.station-line {
  flex: 1;
  width: 1px;
  margin-top: 14px;
  background: linear-gradient(180deg, var(--line-2), transparent 82%);
}

.station-body { padding-bottom: 78px; min-width: 0; }

.station-head { margin-bottom: 26px; }

.station-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(61,220,151,.24);
  padding: 3px 9px;
  border-radius: 2px;
  margin-bottom: 16px;
}

.station-head h2 {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 44px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -.025em;
  color: #f0f5fa;
}

.station-sub {
  margin: 12px 0 0;
  font-size: 15px;
  font-family: var(--mono);
  color: var(--txt-3);
  letter-spacing: .01em;
  line-height: 1.65;
}

.lead {
  margin: 0 0 26px;
  font-size: 16px;
  line-height: 1.9;
  color: var(--txt-2);
  max-width: 74ch;
}
.lead-tight { margin-bottom: 22px; }

/* ============================================================
   flow list (总览)
   ============================================================ */
.flow-list {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.flow-list li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  background: var(--bg-elev);
  padding: 14px 20px;
  font-size: 14.5px;
  color: var(--txt-2);
  transition: background .2s var(--ease);
}
.flow-list li:hover { background: var(--surface-2); }
.flow-list li b { color: #e8f0f8; font-weight: 600; }

.flow-idx {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  letter-spacing: .08em;
  flex-shrink: 0;
  padding-top: 1px;
}

/* ============================================================
   note box
   ============================================================ */
.note-box {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  background: var(--amber-dim);
  border: 1px solid rgba(245,165,36,.2);
  border-left: 2px solid var(--amber);
  border-radius: var(--radius);
  margin-top: 30px;
}
.note-icon {
  flex-shrink: 0;
  width: 18px; height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(245,165,36,.16);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  margin-top: 3px;
}
.note-box p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: #c9b18a;
}
.note-box b { color: var(--amber); font-weight: 600; }

/* ============================================================
   equation
   ============================================================ */
.eq-box {
  position: relative;
  margin: 0 0 24px;
  padding: 34px 30px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.eq-box::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--green), rgba(61,220,151,.1));
}
.eq-box::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 34px; height: 34px;
  background:
    linear-gradient(135deg, transparent 49%, var(--line-3) 49%, var(--line-3) 51%, transparent 51%);
  opacity: .5;
}

.eq {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .26em;
  font-family: var(--mono);
  font-size: clamp(21px, 3.1vw, 32px);
  font-weight: 500;
  line-height: 1.15;
  color: var(--txt);
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}

.eq .v {
  color: var(--green);
  font-style: italic;
  font-weight: 600;
  cursor: default;
  transition: color .16s var(--ease), text-shadow .16s var(--ease);
  padding: 0 .02em;
}
.eq .v[data-k]:hover,
.eq .v[data-k].is-hot {
  color: #fff;
  text-shadow: 0 0 18px rgba(61,220,151,.85);
}

.eq .o { color: var(--txt-4); font-weight: 400; }

.eq sub { color: inherit; font-size: .62em; }
.eq sup { color: var(--txt-2); font-size: .6em; font-weight: 400; }

.frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  font-size: .78em;
  line-height: 1.2;
  margin: 0 .12em;
  transform: translateY(-.04em);
}
.frac > span:first-child {
  border-bottom: 1.5px solid currentColor;
  padding: 0 .34em .07em;
  display: block;
}
.frac > span:last-child {
  padding: .07em .34em 0;
  display: block;
}
.frac .v { font-size: 1em; }

/* ============================================================
   symbol list
   ============================================================ */
.sym-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 34px;
}

.sym-row {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  align-items: baseline;
  gap: 12px;
  background: var(--bg-elev);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--txt-2);
  transition: background .18s var(--ease);
}
.sym-row.is-hot { background: var(--surface-2); }

.sym-row code {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: .01em;
}
.sym-row code sub { font-size: .64em; }
.sym-row span { line-height: 1.6; }
.sym-row em {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--txt-4);
  white-space: nowrap;
}

/* ============================================================
   derive
   ============================================================ */
.derive {
  position: relative;
  padding: 2px 0 0 22px;
  margin-bottom: 34px;
}
.derive::before {
  content: "";
  position: absolute;
  left: 0; top: 10px; bottom: 10px;
  width: 1px;
  background: linear-gradient(180deg, var(--line-3), transparent);
}

.derive-title {
  position: relative;
  margin: 0 0 16px;
  font-size: 12px;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--txt-3);
}
.derive-title::before {
  content: "";
  position: absolute;
  left: -22px; top: 50%;
  width: 12px; height: 1px;
  background: var(--line-3);
}

.derive p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--txt-2);
  max-width: 76ch;
}
.derive p:last-child { margin-bottom: 0; }

.derive-note {
  padding-left: 16px;
  border-left: 2px solid var(--line-3);
  margin-top: 20px !important;
  color: var(--txt-3) !important;
  font-size: 14.5px !important;
}

.inline-eq {
  font-family: var(--mono);
  font-size: .93em;
  color: var(--cyan);
  background: var(--cyan-dim);
  padding: 1px 6px;
  border-radius: 2px;
  white-space: nowrap;
}

.calc-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  padding: 13px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--cyan);
  border-radius: var(--radius);
  font-family: var(--mono);
}
.cl-eq {
  font-size: 13.5px;
  color: var(--txt-2);
  letter-spacing: .01em;
}
.cl-res {
  font-size: 16px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: .01em;
  white-space: nowrap;
}

/* ============================================================
   calculator
   ============================================================ */
.calculator {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 8px;
}

.calc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}
.calc-title {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--txt-2);
}
.calc-badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(61,220,151,.22);
  padding: 2px 8px;
  border-radius: 2px;
}

.calc-controls {
  padding: 18px 20px 8px;
  display: grid;
  gap: 15px;
}

.ctrl {
  display: grid;
  grid-template-columns: 116px 1fr 100px;
  align-items: center;
  gap: 16px;
}
.ctrl-inline { grid-template-columns: 70px 1fr 84px; }

.ctrl-label {
  font-size: 13px;
  color: var(--txt-2);
  font-family: var(--mono);
  letter-spacing: .01em;
}
.ctrl-label sub { font-size: .7em; }

.ctrl-val {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--txt-3);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ctrl-val b { color: var(--green); font-weight: 700; }

/* range */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 40px;
  background: transparent;
  cursor: pointer;
  margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  background: linear-gradient(90deg, var(--green) var(--p, 0%), var(--line-2) var(--p, 0%));
  border-radius: 2px;
}
input[type="range"]::-moz-range-track {
  height: 3px;
  background: var(--line-2);
  border-radius: 2px;
}
input[type="range"]::-moz-range-progress {
  height: 3px;
  background: var(--green);
  border-radius: 2px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px; height: 14px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--green);
  box-shadow: 0 0 0 3px rgba(61,220,151,.14), 0 0 12px rgba(61,220,151,.4);
  transition: box-shadow .18s var(--ease), transform .18s var(--ease);
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--green);
  box-shadow: 0 0 0 3px rgba(61,220,151,.14);
}
input[type="range"]:hover::-webkit-slider-thumb {
  box-shadow: 0 0 0 5px rgba(61,220,151,.2), 0 0 16px rgba(61,220,151,.6);
}
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 5px rgba(61,220,151,.32), 0 0 16px rgba(61,220,151,.7);
}

.calc-readout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}
.ro {
  background: var(--bg-elev);
  padding: 15px 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ro-gauge { grid-column: 1 / -1; }

.ro-label {
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--txt-4);
}
.ro-num {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 700;
  color: var(--txt);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  transition: color .2s var(--ease);
}
.ro-num b { color: var(--green); font-weight: 700; }

.gauge {
  position: relative;
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: visible;
  margin: 6px 0 2px;
}
.gauge-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  box-shadow: 0 0 12px rgba(61,220,151,.4);
  transition: width .22s var(--ease), background .3s var(--ease);
}
.gauge-mark {
  position: absolute;
  top: -3px;
  width: 1px;
  height: 12px;
  background: var(--txt-4);
}
.gauge-mark::after {
  content: "1.0";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 9px;
  color: var(--txt-4);
  white-space: nowrap;
}
.ro-status {
  font-size: 13px !important;
  letter-spacing: .02em;
}
.ro-status b {
  font-size: 16px;
  font-weight: 700;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.ro-status-sep {
  margin: 0 7px;
  color: var(--txt-4);
}

/* ============================================================
   ratio bars (推重比对比)
   ============================================================ */
.ratio-bars {
  position: relative;
  margin: 8px 0 34px;
  padding: 22px 22px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.ratio-row {
  display: grid;
  grid-template-columns: 108px 1fr 54px;
  align-items: center;
  gap: 16px;
  padding: 7px 0;
}
.ratio-name { font-size: 12.5px; color: var(--txt-3); font-family: var(--mono); }
.ratio-track {
  position: relative;
  height: 16px;
  background: var(--bg-elev);
  border-radius: 2px;
  overflow: hidden;
}
.ratio-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 1s var(--ease);
}
.ratio-fill[data-color="green"] { background: linear-gradient(90deg, rgba(61,220,151,.45), var(--green)); }
.ratio-fill[data-color="cyan"]  { background: linear-gradient(90deg, rgba(56,189,248,.3), var(--cyan)); }
.ratio-fill[data-color="amber"] { background: linear-gradient(90deg, rgba(245,165,36,.3), var(--amber)); }

.ratio-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--txt-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ratio-threshold {
  position: absolute;
  left: calc(22px + 108px + 16px + (100% - 22px * 2 - 108px - 16px - 54px - 16px) * (1 / 1.6));
  top: 22px;
  bottom: 34px;
  width: 1px;
  background: var(--red);
  opacity: .55;
  pointer-events: none;
}
.ratio-threshold span {
  position: absolute;
  top: -16px;
  left: 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--red);
  white-space: nowrap;
  opacity: .85;
}

/* ============================================================
   curve card
   ============================================================ */
.curve-card {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 8px 0 34px;
}
.curve-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
  flex-wrap: wrap;
  gap: 10px;
}
.curve-legend { display: flex; gap: 18px; }
.lg {
  position: relative;
  padding-left: 18px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--txt-3);
  letter-spacing: .04em;
}
.lg::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 12px; height: 2px;
  transform: translateY(-50%);
  border-radius: 1px;
}
.lg-base::before   { background: var(--txt-4); }
.lg-vortex::before { background: var(--green); box-shadow: 0 0 8px rgba(61,220,151,.6); }

.curve-wrap { padding: 18px 14px 4px; }
#clChart { display: block; width: 100%; height: 260px; }

.curve-slider {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 6px 20px 18px;
  border-top: 1px solid var(--line);
}
.curve-slider .ctrl { flex: 1 1 300px; }
.curve-readout {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--txt-4);
  letter-spacing: .04em;
}
.curve-readout b {
  font-size: 21px;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.curve-state {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 2px;
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(61,220,151,.22);
  letter-spacing: .04em;
  white-space: nowrap;
}

/* ============================================================
   data compare (CL)
   ============================================================ */
.data-compare {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
}
.dc-item {
  display: grid;
  grid-template-columns: 84px 1fr 54px;
  align-items: center;
  gap: 14px;
  padding: 6px 0;
}
.dc-name { font-size: 12.5px; color: var(--txt-3); font-family: var(--mono); }
.dc-bar {
  height: 6px;
  background: var(--bg-elev);
  border-radius: 3px;
  overflow: hidden;
}
.dc-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(61,220,151,.35), var(--green));
  transform-origin: left;
  animation: growBar .9s var(--ease) both;
}
@keyframes growBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.dc-val {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.dc-note {
  margin: 14px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--txt-3);
  line-height: 1.7;
}

/* ============================================================
   balance demo (配平)
   ============================================================ */
.balance-demo {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 8px;
}

.bd-tabs {
  display: flex;
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}
.bd-tab {
  flex: 1;
  padding: 13px 16px;
  background: var(--bg-elev);
  border: none;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--txt-3);
  cursor: pointer;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.bd-tab:hover { color: var(--txt-2); background: var(--surface-2); }
.bd-tab.is-active {
  color: var(--green);
  background: var(--surface-2);
  box-shadow: inset 0 -1px 0 var(--green);
}

.bd-stage {
  position: relative;
  padding: 52px 24px 44px;
  background:
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 100% 100%,
    radial-gradient(circle at 50% 50%, rgba(61,220,151,.05), transparent 65%);
  overflow: hidden;
}

.bd-pivot {
  position: absolute;
  left: 50%; top: 50%;
  width: 11px; height: 11px;
  margin: -5.5px 0 0 -5.5px;
  border-radius: 50%;
  border: 1.5px solid var(--green);
  background: var(--bg);
  box-shadow: 0 0 0 4px rgba(61,220,151,.12), 0 0 18px rgba(61,220,151,.5);
  z-index: 3;
}

.bd-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: transform .5s var(--ease);
}

.bd-nose, .bd-tail {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--txt-4);
  flex-shrink: 0;
  width: 44px;
}
.bd-tail { text-align: right; }

.bd-fuselage {
  position: relative;
  flex: 1;
  height: 34px;
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
  border: 1px solid var(--line-3);
  border-radius: 17px / 12px;
  display: grid;
  place-items: center;
}
.bd-fuselage::before {
  content: "";
  position: absolute;
  left: 8%; right: 8%;
  top: 50%;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--line-3) 0 6px, transparent 6px 12px);
}
.bd-cg {
  position: relative;
  z-index: 2;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--green);
  background: var(--bg);
  padding: 2px 8px;
  border: 1px solid rgba(61,220,151,.3);
  border-radius: 2px;
}

.bd-surface {
  position: absolute;
  width: 92px;
  height: 20px;
  border-radius: 3px;
  background: var(--surface-3);
  border: 1px solid var(--line-3);
  transition: left .55s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
  display: grid;
  place-items: center;
  z-index: 2;
}
/* 平尾：位于机尾（右侧） */
.bd-surface[data-pos="tail"]   { left: calc(100% - 152px); }
/* 鸭翼：位于机头（左侧） */
.bd-surface[data-pos="canard"] { left: 64px; }

.bd-surface.is-neg {
  border-color: rgba(240,83,61,.5);
  background: rgba(240,83,61,.1);
}
.bd-surface.is-pos {
  border-color: rgba(61,220,151,.5);
  background: rgba(61,220,151,.1);
}

.bd-arrow {
  position: absolute;
  width: 2px;
  height: 30px;
  background: currentColor;
  transition: all .45s var(--ease);
}
.bd-arrow::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 0; height: 0;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}
.bd-arrow[data-dir="down"] { top: 22px; left: calc(50% - 27px); color: var(--red); }
.bd-arrow[data-dir="down"]::after { bottom: -7px; border-top: 7px solid currentColor; }
.bd-arrow[data-dir="up"] { bottom: 22px; left: calc(50% - 27px); color: var(--green); }
.bd-arrow[data-dir="up"]::after { top: -7px; border-bottom: 7px solid currentColor; }

.bd-force {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--red);
  transition: color .3s var(--ease);
}
.bd-force.is-pos { color: var(--green); }

.bd-readout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}
.bd-line {
  background: var(--bg-elev);
  padding: 13px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bd-line span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--txt-4);
}
.bd-line b {
  font-size: 13px;
  font-weight: 600;
  color: var(--txt-2);
  transition: color .3s var(--ease);
}
.bd-line b.is-pos { color: var(--green); }
.bd-line b.is-neg { color: var(--red); }

/* ============================================================
   wing load compare
   ============================================================ */
.wl-compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: end;
  padding: 26px 24px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 8px 0 8px;
  position: relative;
}
.wl-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  height: 190px;
  justify-content: flex-end;
}
.wl-bar {
  width: 100%;
  max-width: 74px;
  flex: 1;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent);
  border-radius: 2px 2px 0 0;
  overflow: hidden;
}
.wl-bar i {
  display: block;
  width: 100%;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, var(--green), rgba(61,220,151,.25));
  box-shadow: 0 0 20px rgba(61,220,151,.18);
  animation: growUp 1s var(--ease) both;
  transform-origin: bottom;
}
@keyframes growUp { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.wl-item-muted .wl-bar i { background: linear-gradient(180deg, var(--cyan), rgba(56,189,248,.2)); }

.wl-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.wl-meta b { font-size: 12.5px; color: var(--txt-2); font-weight: 600; }
.wl-meta span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--txt-4);
  font-variant-numeric: tabular-nums;
}
.wl-note {
  grid-column: 1 / -1;
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--txt-3);
  text-align: center;
  line-height: 1.7;
}

/* ============================================================
   chain (推导链)
   ============================================================ */
.station-chain .station-line { display: none; }

.chain {
  display: grid;
  gap: 0;
  margin-bottom: 44px;
}

.chain-node {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  transition: background .2s var(--ease);
}
.chain-node:last-child { border-bottom: 1px solid var(--line); }
.chain-node:hover { background: linear-gradient(90deg, rgba(61,220,151,.035), transparent 60%); }

.chain-idx {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--txt-4);
  letter-spacing: .06em;
  padding-top: 4px;
  transition: color .25s var(--ease);
}
.chain-node:hover .chain-idx { color: var(--green); }

.chain-body h4 {
  margin: 0 0 6px;
  font-size: 16.5px;
  font-weight: 600;
  color: #eaf1f8;
  letter-spacing: -.01em;
}
.chain-body p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--txt-3);
  max-width: 62ch;
}
.chain-body code {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(61,220,151,.18);
  padding: 3px 10px;
  border-radius: 2px;
  letter-spacing: .01em;
}

.chain-link { display: none; }

.closing {
  padding: 28px;
  background: linear-gradient(135deg, var(--surface), var(--bg-elev));
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--green);
  border-radius: var(--radius);
}
.closing p {
  margin: 0 0 16px;
  font-size: 15.5px;
  line-height: 1.95;
  color: var(--txt-2);
  max-width: 74ch;
}
.closing p:last-child { margin-bottom: 0; }
.closing .closing-em {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 16.5px;
  color: var(--txt);
}
.closing .closing-em b { color: var(--green); }

/* ============================================================
   sources
   ============================================================ */
.sources {
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
  margin-top: 20px;
}
.sources-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 54px 28px 58px;
}
.sources h3 {
  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--txt-3);
  font-weight: 600;
}
.sources ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.sources li {
  background: var(--surface);
  padding: 12px 18px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--txt-3);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.sources li:hover { background: var(--surface-2); color: var(--txt-2); }
.sources sub { font-size: .7em; }

.sources-foot {
  margin: 20px 0 0;
  font-size: 12px;
  color: var(--txt-4);
  font-family: var(--mono);
  letter-spacing: .01em;
  line-height: 1.7;
}

/* ============================================================
   site foot
   ============================================================ */
.site-foot {
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.foot-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 26px 28px 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--txt-4);
}
.foot-sep { color: var(--line-3); }

/* ============================================================
   reveal — 内容默认可见，仅对首屏以下做轻量下移淡入
   （不隐藏内容，避免锚点跳转 / 快速滚动时出现空白）
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .station-body > .lead,
  .station-body > .eq-box,
  .station-body > .sym-list,
  .station-body > .derive,
  .station-body > .calculator,
  .station-body > .curve-card,
  .station-body > .data-compare,
  .station-body > .balance-demo,
  .station-body > .ratio-bars,
  .station-body > .wl-compare,
  .station-body > .flow-list,
  .station-body > .note-box,
  .station-body > .chain,
  .station-body > .closing {
    animation: riseIn .55s var(--ease) both;
  }
  .station-body > :nth-child(2) { animation-delay: .03s; }
  .station-body > :nth-child(3) { animation-delay: .06s; }
  .station-body > :nth-child(4) { animation-delay: .09s; }
  .station-body > :nth-child(5) { animation-delay: .12s; }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================
   responsive
   ============================================================ */
@media (max-width: 900px) {
  :root { --rail-w: 74px; }

  .hero-inner { padding: 62px 22px 56px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }

  .station { padding: 62px 22px 0; }
  .station-num { font-size: 26px; }
  .station-body { padding-bottom: 58px; }

  .eq-box { padding: 26px 20px; }
  .eq { font-size: clamp(19px, 4.4vw, 26px); }

  .ctrl { grid-template-columns: 100px 1fr 84px; gap: 12px; }

  .bd-readout { grid-template-columns: 1fr; }
  .wl-compare { gap: 10px; padding: 20px 16px; }

  .ratio-threshold { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  :root { --rail-w: 0px; }

  .topbar-inner { padding: 0 18px; height: 52px; gap: 18px; }
  .topnav { gap: 0; }

  /* 移动端：编号改为横向标记条 */
  .station {
    display: block;
    padding: 52px 18px 0;
  }
  .station-rail {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 0 0 10px;
  }
  .station-num { font-size: 22px; }
  .station-line { display: none; }
  .station-head h2 { font-size: 28px; }

  .hero-inner { padding: 46px 18px 44px; }
  .hero-title { font-size: clamp(40px, 13vw, 62px); }
  .hero-sub { font-size: 15px; margin-bottom: 40px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hstat { padding: 16px 14px; }
  .hstat-num { font-size: 26px; }

  .lead { font-size: 15px; }
  .derive { padding-left: 16px; }
  .derive p { font-size: 14.5px; }

  .eq-box { padding: 22px 16px; }
  .eq {
    font-size: clamp(17px, 5.2vw, 22px);
    gap: .2em;
  }

  .sym-list { grid-template-columns: 1fr; }
  .sym-row { grid-template-columns: 56px 1fr auto; padding: 11px 14px; }

  .calc-controls { padding: 16px 16px 6px; }
  .ctrl, .ctrl-inline {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .ctrl-val { text-align: left; }
  input[type="range"] { height: 44px; }

  .calc-readout { grid-template-columns: 1fr; }
  .ro { padding: 13px 16px; }

  .ratio-row { grid-template-columns: 88px 1fr 44px; gap: 10px; }
  .dc-item { grid-template-columns: 70px 1fr 44px; gap: 10px; }

  .bd-stage { padding: 44px 16px 36px; }
  .bd-surface { width: 62px; }
  .bd-surface[data-pos="tail"] { left: calc(100% - 118px); }
  .bd-surface[data-pos="canard"] { left: 50px; }
  .bd-nose, .bd-tail { width: 34px; font-size: 10px; }

  .wl-compare { grid-template-columns: repeat(3, 1fr); }
  .wl-item { height: 150px; }

  .chain-node { grid-template-columns: 40px 1fr; gap: 12px; }
  .chain-body h4 { font-size: 15.5px; }

  .closing { padding: 22px 18px; }
  .closing p { font-size: 14.5px; }
  .closing .closing-em { font-size: 15.5px; }

  .sources-inner { padding: 40px 18px; }
  .foot-inner { padding: 22px 18px 30px; }

  .calc-line { padding: 11px 14px; }
  .cl-res { font-size: 15px; }
}

/* ============================================================
   reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
}
