*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  color: #333;
  background: #fff;
}

.text_content {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.text_content h1 {
  margin: 50px 0;
}

.text_content h4 {
  margin: 0 0 22px;
  color: #333;
  font-size: 24px;
}

.text_content h5 {
  margin: 0;
  padding-bottom: 20px;
  line-height: 34px;
}

.text_content p {
  margin: 0 0 22px;
  color: #999;
  font-size: 14px;
  line-height: 26px;
}

.text_content a {
  overflow-wrap: anywhere;
}

.text_content table {
  width: 100%;
  margin-bottom: 30px;
  border-collapse: collapse;
  color: #383b48;
  font-size: 14px;
  line-height: 34px;
  table-layout: fixed;
  text-align: left;
  word-break: break-all;
}

.text_content table caption {
  border: 1px solid #ccc;
  border-bottom: 0;
  line-height: 48px;
  text-align: center;
}

.text_content table tr th,
.text_content table tr td {
  padding: 10px;
  border: 1px solid #ccc;
  word-break: break-all;
}

.history_entry {
  padding-top: 10px;
  text-align: right;
}

.history_entry a,
.latest_version_link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid #ffaf2c;
  border-radius: 6px;
  color: #b56e00;
  font-size: 14px;
  text-decoration: none;
}

.history_entry a,
.latest_version_link {
  border: 0;
  color: #1677ff;
}

.history_shell {
  display: flex;
  height: 100vh;
  min-height: 480px;
  flex-direction: column;
  overflow: hidden;
}

.history_toolbar {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #ddd;
  background: #fff;
}

.history_toolbar h1 {
  margin: 0 auto 0 0;
  font-size: 20px;
}

.history_toolbar label {
  color: #666;
  font-size: 14px;
}

.history_toolbar select {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  color: #333;
  background: #fff;
  font-size: 14px;
}

.history_frame {
  width: 100%;
  min-height: 0;
  flex: 1;
  border: 0;
  background: #fff;
}

@media (max-width: 768px) {
  .text_content h1 {
    text-align: center;
  }

  .history_toolbar {
    flex-wrap: wrap;
    padding: 12px;
  }

  .history_toolbar h1 {
    width: 100%;
    font-size: 18px;
  }

  .history_toolbar label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .history_toolbar select {
    min-width: 0;
    flex: 1;
  }
}

@media (prefers-color-scheme: dark) {
  html {
    color-scheme: dark;
  }

  body,
  .text_content,
  .history_toolbar {
    color: #ccc;
    background: #252525;
  }

  .text_content h4,
  .text_content table {
    color: #ccc;
  }

  .text_content a {
    color: #ffbd4a;
  }

  .history_entry a,
  .latest_version_link {
    color: #69a9ff;
  }

  .history_toolbar {
    border-bottom-color: #444;
  }

  .history_toolbar label {
    color: #bbb;
  }

  .history_toolbar select {
    border-color: #555;
    color: #eee;
    background: #333;
  }
}
