:root {
  --navy: #0b1a2e;
  --deep: #071221;
  --cyan: #14c4d4;
  --cyan-dim: #0a7a86;
  --rem: #b9a0e8;
  --paper: #d7e6ef;
  --mute: #7e93a8;
  --warn: #e08a5a;
  --ok: #6fbf9a;
  --line: rgba(20, 196, 212, 0.22);
  --serif: "ZCOOL XiaoWei", "Songti SC", serif;
  --sans: "Noto Sans SC", "PingFang SC", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 88px; }
body {
  margin: 0;
  color: var(--paper);
  background: var(--navy);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.app-link { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
button { font-family: inherit; cursor: pointer; }
code { font-family: var(--mono); font-size: 0.9em; background: rgba(20, 196, 212, 0.12); padding: 0.05em 0.35em; }

.river-grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 5;
  opacity: 0.14;
  background-image: url("images/texture.webp");
  background-size: 420px auto;
  mix-blend-mode: overlay;
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 70; background: var(--cyan); color: var(--deep); padding: 8px 12px; }

.mast {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 22px 10px 28px;
  background: rgba(7, 18, 33, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 4px solid transparent;
  border-image: linear-gradient(90deg, #142848 0 22%, #14c4d4 22% 48%, #b9a0e8 48% 62%, #0b1a2e 62% 70%, #14c4d4 70% 88%, #142848 88% 100%) 1;
}
.mark { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 22px; }
.mark small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--mute); font-weight: 400; }
.mark-bands { display: grid; width: 28px; height: 28px; grid-template-rows: 1fr 1fr 1fr; gap: 3px; }
.mark-bands i:nth-child(1) { background: var(--cyan); }
.mark-bands i:nth-child(2) { background: var(--rem); }
.mark-bands i:nth-child(3) { background: #142848; }
.nav-toggle { display: none; background: transparent; border: 2px solid var(--cyan); color: var(--cyan); padding: 8px 14px; font-size: 16px; }
.mast-links { display: flex; gap: 16px; font-size: 14px; align-items: center; }
.mast-links a { color: var(--mute); }
.mast-links a.is-active, .mast-links a:hover { color: var(--cyan); }
.mast-links .live { color: var(--deep); background: var(--cyan); padding: 7px 12px; }

.hypno-spine {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 10px;
  z-index: 45;
  display: flex;
  flex-direction: column;
}
.hypno-spine span { flex: 1; }
.spine-n3 { background: #142848; }
.spine-n2 { background: var(--cyan-dim); }
.spine-rem { background: var(--rem); }
.spine-gap { background: #04080f; box-shadow: inset 0 0 0 1px var(--warn); }

.mouth { position: relative; min-height: 100vh; display: grid; align-items: end; }
.mouth img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mouth::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 18, 33, 0.15) 0%, rgba(7, 18, 33, 0.55) 46%, rgba(11, 26, 46, 0.96) 100%);
}
.mouth-copy { position: relative; z-index: 1; padding: 10vh 8vw 8vh 7vw; max-width: 920px; }
.kicker, .vlabel {
  font-family: var(--mono);
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--cyan);
  margin: 0 0 10px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.05; margin: 0 0 14px; }
h1 { font-size: clamp(48px, 9vw, 104px); letter-spacing: -0.03em; }
h2 { font-size: clamp(30px, 4vw, 48px); }
h3 { font-size: 22px; }
.lead { font-size: 18px; max-width: 44em; color: rgba(215, 230, 239, 0.92); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 22px 0; list-style: none; }
.tags li {
  font-family: var(--mono);
  font-size: 12px;
  border: 1px solid rgba(185, 160, 232, 0.45);
  padding: 4px 10px;
  color: var(--rem);
}
.mouth-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; padding: 12px 18px; border: 2px solid currentColor; font-size: 15px; }
.solid { background: var(--cyan); color: var(--deep); border-color: var(--cyan); }
.hollow { background: transparent; color: var(--paper); }

.channel { width: min(1080px, calc(100% - 64px)); margin: 0 auto; padding: 80px 0; }
.band { background: var(--navy); }
.night-band { background: linear-gradient(180deg, #071221 0%, #0b1a2e 100%); }
.band-head { max-width: 46em; margin-bottom: 36px; }
.band-head p:last-child { color: var(--mute); margin: 0; }

.need-river {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-left: 10px solid transparent;
  border-image: linear-gradient(180deg, #14c4d4, #b9a0e8, #142848) 1;
}
.need-river li { padding: 22px 22px 22px 28px; border-bottom: 1px solid var(--line); background: rgba(7, 18, 33, 0.45); }
.need-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--rem); }
.need-river ul { margin: 8px 0 0; padding-left: 1.1em; }

.reach {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 64px;
}
.reach.flip { grid-template-columns: 0.95fr 1.05fr; }
.reach.flip figure { order: 2; }
.reach-num { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; color: var(--cyan); display: block; margin-bottom: 8px; }
figure { margin: 0; }
figure img { width: 100%; height: 300px; object-fit: cover; clip-path: polygon(0 8%, 100% 0, 100% 92%, 0 100%); }
figcaption { margin-top: 10px; font-size: 13px; color: var(--mute); }

.lead-demo {
  margin-top: 20px;
  padding: 16px;
  background: #071221;
  border: 2px solid var(--cyan-dim);
}
.clock-label { margin: 0 0 10px; font-family: var(--mono); font-size: 12px; color: var(--mute); }
.clock-row, .drop-row { display: grid; grid-template-columns: 48px 1fr 72px; gap: 10px; align-items: center; margin-bottom: 10px; font-size: 14px; }
.drop-row { grid-template-columns: 22px 1fr; }
.clock-row input[type="range"] { width: 100%; accent-color: var(--rem); }
.clock-row strong { font-family: var(--mono); color: var(--cyan); font-size: 18px; }
.drop-row input { width: 20px; height: 20px; accent-color: var(--warn); }
.lead-state { margin: 8px 0 0; font-family: var(--mono); font-size: 14px; }
.lead-state.warn { color: var(--warn); }
.lead-state.ok { color: var(--ok); }
.lead-state.note { color: var(--rem); }

.bench-river {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
}
.bench-river li { background: #0e2238; padding: 20px; }
.bench-river h3 { font-size: 20px; }
.bench-river p { margin: 0; color: var(--mute); font-size: 14px; }

.value-bands { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.value-bands article {
  padding: 22px 24px;
  border-top: 8px solid var(--cyan);
}
.value-bands article:nth-child(2) { border-top-color: var(--rem); }
.value-bands article:nth-child(3) { border-top-color: #142848; }
.value-bands article:nth-child(4) { border-top-color: var(--cyan-dim); }
.value-bands p { margin: 0; color: var(--mute); }

.rule-river { max-width: 46em; font-size: 17px; padding-left: 1.2em; }
.rule-river li { margin: 0.6em 0; padding-left: 8px; }

.io-river { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.io-river ul { margin: 0; padding-left: 1.1em; }

footer { background: var(--deep); border-top: 1px solid var(--line); color: var(--mute); }
.foot { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; padding-top: 28px; padding-bottom: 28px; }

@media (max-width: 860px) {
  .hypno-spine { display: none; }
  .mast { flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; margin-left: auto; position: relative; z-index: 60; }
  .mast-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 12px 18px 18px;
    background: var(--deep);
    border-bottom: 1px solid var(--line);
    z-index: 55;
  }
  .mast-links.open { display: flex; }
  .channel { width: min(1080px, calc(100% - 28px)); padding: 52px 0; }
  .reach, .reach.flip, .bench-river, .value-bands, .io-river, .foot {
    grid-template-columns: 1fr;
    display: grid;
  }
  .reach.flip figure { order: 0; }
  h1 { font-size: 42px; }
  figure img { height: 210px; clip-path: none; }
  .clock-row { grid-template-columns: 1fr; }
  .btn { min-height: 44px; }
}
