.module-hub {
  width: 1240px;
  max-width: 100%;
  margin: 30px 0 28px;
  overflow: hidden;
  border: 1px solid #c6d4cf;
  border-radius: 18px;
  background: #f6f5ef;
  box-shadow: 0 18px 46px rgba(18, 60, 52, 0.12);
}

.module-hub-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
  padding: 38px 42px;
  background: #123c34;
  color: #fff;
}

.module-hub-head::after {
  position: absolute;
  top: -190px;
  right: -90px;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 52px rgba(255, 255, 255, 0.025),
    0 0 0 104px rgba(255, 255, 255, 0.018);
  content: "";
}

.module-hub-head > * {
  position: relative;
  z-index: 1;
}

.module-hub-head small {
  color: #a9c8bf;
  font: 800 11px Consolas, "Courier New", monospace;
  letter-spacing: 0.2em;
}

.module-hub-head h2 {
  margin: 13px 0 16px;
  font: 500 clamp(38px, 5vw, 64px) / 0.98 Georgia, "Songti SC", serif;
}

.module-hub-head h2 span {
  color: #e1b158;
}

.module-hub-head p {
  max-width: 660px;
  margin: 0;
  color: #c8d9d4;
  font-size: 15px;
  line-height: 1.75;
}

.module-hub-head > strong {
  flex: 0 0 auto;
  padding: 11px 15px;
  border: 1px solid rgba(226, 177, 88, 0.75);
  border-radius: 999px;
  color: #f0c976;
  font-size: 12px;
}

.module-lab-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 18px;
  padding: 24px;
}

.module-category-buttons {
  display: grid;
  gap: 8px;
  align-content: start;
}

.module-category-buttons button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px;
  min-height: 86px;
  padding: 15px 17px;
  border: 1px solid #cad8d3;
  border-radius: 11px;
  background: #fff;
  color: #173f37;
  cursor: pointer;
  text-align: left;
  transition: 0.18s ease;
}

.module-category-buttons button small {
  grid-column: 1 / -1;
  color: #748780;
  font: 800 10px Consolas, "Courier New", monospace;
  letter-spacing: 0.1em;
}

.module-category-buttons button b {
  font-size: 18px;
}

.module-category-buttons button span {
  color: #6a7d77;
  font-size: 11px;
}

.module-category-buttons button:hover {
  transform: translateX(4px);
}

.module-category-buttons button.active {
  border-color: #123c34;
  background: #123c34;
  color: #fff;
  box-shadow: 0 12px 28px rgba(18, 60, 52, 0.18);
}

.module-category-buttons button.active small,
.module-category-buttons button.active span {
  color: #b9d0c9;
}

.module-detail {
  min-height: 620px;
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid #cad8d3;
  border-radius: 14px;
  background: #fff;
}

.module-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.module-stage-head small,
.module-source small,
.module-flow small {
  display: block;
  color: #71847e;
  font: 800 10px Consolas, "Courier New", monospace;
  letter-spacing: 0.13em;
}

.module-stage-head h3 {
  margin: 8px 0;
  color: #173f37;
  font: 500 clamp(30px, 4vw, 48px) Georgia, "Songti SC", serif;
}

.module-stage-head > span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #f7eedc;
  color: #805e1e;
  font-size: 11px;
  white-space: nowrap;
}

.module-description {
  max-width: 760px;
  color: #304d46;
  font-size: 17px;
  line-height: 1.85;
}

.module-source {
  margin: 27px 0;
  padding: 17px 18px;
  border-left: 4px solid #dca950;
  background: #f8f8f4;
}

.module-source code {
  display: block;
  margin: 8px 0;
  color: #176450;
  font: 700 13px Consolas, "Courier New", monospace;
  overflow-wrap: anywhere;
}

.module-source p {
  margin: 0;
  color: #6b7d78;
  font-size: 12px;
}

.module-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  margin: 30px 0;
}

.module-flow > div {
  display: grid;
  gap: 8px;
}

.module-flow span {
  padding: 10px 11px;
  border: 1px solid #cad8d3;
  border-radius: 6px;
  color: #264a42;
  font-size: 14px;
}

.module-flow i {
  color: #dca950;
  font-size: 28px;
  font-style: normal;
}

.module-flow .module-output {
  padding: 23px;
  border-radius: 10px;
  background: #123c34;
  color: #fff;
}

.module-output small {
  color: #a9c8bf;
}

.module-output strong {
  font: 500 24px Georgia, "Songti SC", serif;
}

.module-explanation {
  padding-top: 22px;
  border-top: 1px solid #d7e0dc;
}

.module-explanation > span {
  color: #173f37;
  font-weight: 800;
}

.module-explanation p {
  color: #687b75;
  font-size: 13px;
  line-height: 1.7;
}

.module-explanation b {
  color: #176450;
  font-family: Consolas, "Courier New", monospace;
}

.module-detail-actions {
  margin-top: 20px;
}

.module-detail-actions button {
  padding: 12px 17px;
  border: 0;
  border-radius: 8px;
  background: #dca950;
  color: #173f37;
  font-weight: 800;
  cursor: pointer;
}

.module-scope-note {
  padding: 0 24px 22px;
  color: #71847e;
  font-size: 12px;
}

@media (max-width: 980px) {
  .module-lab-layout {
    grid-template-columns: 1fr;
  }

  .module-category-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-detail {
    min-height: auto;
  }
}

@media (max-width: 600px) {
  .module-hub {
    margin-top: 22px;
    border-radius: 13px;
  }

  .module-hub-head {
    display: block;
    padding: 28px 22px;
  }

  .module-hub-head h2 {
    font-size: 42px;
  }

  .module-hub-head > strong {
    display: inline-block;
    margin-top: 16px;
  }

  .module-lab-layout {
    padding: 14px;
  }

  .module-category-buttons {
    grid-template-columns: 1fr 1fr;
  }

  .module-category-buttons button {
    min-height: 90px;
    padding: 12px;
  }

  .module-category-buttons button b {
    font-size: 16px;
  }

  .module-category-buttons button span {
    display: none;
  }

  .module-detail {
    padding: 22px;
  }

  .module-stage-head {
    display: block;
  }

  .module-stage-head > span {
    display: inline-block;
    margin-top: 5px;
  }

  .module-description {
    font-size: 15px;
  }

  .module-flow {
    grid-template-columns: 1fr;
  }

  .module-flow i {
    justify-self: center;
    transform: rotate(90deg);
  }

  .module-scope-note {
    padding: 0 16px 18px;
  }
}
