* {
  box-sizing: border-box;
  font-family: "Helvetica Neue Medium", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
}

:root {
  color-scheme: light dark;
  --page-bg: #fff;
  --text: #000;
  --muted: #555;
  --border: #343a40;
  --button-bg: #f7f8fa;
  --button-text: #222;
  --button-active-bg: #111827;
  --button-active-text: #fff;
  --button-border: #e5e7eb;
  --button-hover-bg: #eef2f7;
  --notice-bg: #A9C1CB;
  --notice-border: #000;
  --rule: #ddd;
  --focus: #80bdff;
}

@media (prefers-color-scheme: dark) {
  body[data-theme="system"] {
    --page-bg: #111;
    --text: #f4f4f4;
    --muted: #c6c6c6;
    --border: #d8d8d8;
    --button-bg: rgba(255, 255, 255, 0.05);
    --button-text: #f4f4f4;
    --button-active-bg: #f4f4f4;
    --button-active-text: #111;
    --button-border: #4b5563;
    --button-hover-bg: rgba(255, 255, 255, 0.12);
    --notice-bg: #18324a;
    --notice-border: #9bc8f0;
    --rule: #3a3a3a;
    --focus: #9bc8f0;
  }
}

body[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #111;
  --text: #f4f4f4;
  --muted: #c6c6c6;
  --border: #d8d8d8;
  --button-bg: rgba(255, 255, 255, 0.05);
  --button-text: #f4f4f4;
  --button-active-bg: #f4f4f4;
  --button-active-text: #111;
  --button-border: #4b5563;
  --button-hover-bg: rgba(255, 255, 255, 0.12);
  --notice-bg: #18324a;
  --notice-border: #9bc8f0;
  --rule: #3a3a3a;
  --focus: #9bc8f0;
}

body[data-theme="light"] {
  color-scheme: light;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7.5rem;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.5;
}

a,
button {
  color: inherit;
}

a:hover {
  text-decoration: none;
}

img {
  width: 100%;
}

ul,
ol {
  margin-bottom: 0;
}

p {
  margin-top: 0;
}

sup {
  font-size: 0.65em;
  line-height: 0;
  vertical-align: super;
}

sup a {
  font-size: inherit;
  text-decoration: none;
}

a[href^="#ref-"],
.references a[href^="https://pubmed.ncbi.nlm.nih.gov/"] {
  color: #2a6ebb;
}

.references a[href^="https://pubmed.ncbi.nlm.nih.gov/"] {
  white-space: nowrap;
}

.references li.is-highlighted {
  border-radius: 6px;
  background-color: rgba(42, 110, 187, 0.14);
  box-shadow: 0 0 0 2px rgba(42, 110, 187, 0.22);
  transition: background-color 1800ms ease, box-shadow 1800ms ease;
}

.references li {
  scroll-margin-top: 1.25rem;
}

[id^="ref-"] {
  scroll-margin-top: 1rem;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin-right: auto;
  margin-left: auto;
  padding: 1.5rem 15px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

.col-12,
.col-6,
.col-sm-4,
.col-sm-5,
.col-sm-6,
.col-sm-8,
.col-md-2,
.col-md-3,
.col-md-4,
.col-md-6 {
  position: relative;
  width: 100%;
  min-height: 1px;
  padding-right: 15px;
  padding-left: 15px;
}

.col-12 {
  flex: 0 0 100%;
  max-width: 100%;
}

.col-6 {
  flex: 0 0 50%;
  max-width: 50%;
}

.pb-3 {
  padding-bottom: 1rem;
}

.pb-4 {
  padding-bottom: 1.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  align-items: flex-start;
  margin-top: -1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 0.8rem;
  background: var(--page-bg);
  border-bottom: 1px solid transparent;
  transition: border-color 140ms ease;
}

body.is-scrolled .site-header {
  border-bottom-color: rgba(148, 163, 184, 0.38);
}

.control-group {
  display: inline-flex;
  width: max-content;
  max-width: max-content;
  gap: 0.25rem;
  padding: 0.15rem;
  border: 1px solid var(--button-border);
  border-radius: 999px;
  background: var(--button-bg);
}

.control-group-single {
  gap: 0;
}

.theme-controls {
  margin-top: 0.5rem;
  max-width: max-content;
}

.control-button {
  min-height: 2.15rem;
  padding: 0.42rem 0.72rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--button-text);
  cursor: pointer;
  line-height: 1;
  appearance: none;
  -webkit-appearance: none;
  white-space: nowrap;
  transition: color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.theme-button {
  width: 2.15rem;
  padding-right: 0;
  padding-left: 0;
  font-size: 15px;
}

.header-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.control-button.is-active,
.control-button:hover {
  background: var(--button-active-bg);
  color: var(--button-active-text);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.16);
}

.control-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.logo {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 60px;
}

body[data-theme="dark"] .logo {
  filter: invert(1);
}

@media (prefers-color-scheme: dark) {
  body[data-theme="system"] .logo {
    filter: invert(1);
  }
}

h1,
.title {
  margin: 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 28px;
}

h2,
h3,
.subtitle {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 24px;
}

h2,
h3 {
  padding-bottom: 1rem;
}

.tabs {
  padding-top: 0.7rem;
  padding-bottom: 1.35rem;
}

.tab,
.download-button {
  display: flex;
  width: 100%;
  min-height: 2.65rem;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background-color: var(--button-bg);
  color: var(--button-text);
  text-align: center;
  text-decoration: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.tab:hover,
.download-button:hover {
  background-color: var(--button-hover-bg);
  color: var(--button-text);
  transform: translateY(-1px);
}

.tab.is-active,
.download-button {
  background-color: var(--button-active-bg);
  color: var(--button-active-text);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
}

.download-button:hover {
  background-color: var(--button-active-bg);
  color: var(--button-active-text);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
}

.tab:focus-visible,
.download-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

body[data-language="zh"] .lang-content[data-lang="en"],
body[data-language="en"] .lang-content[data-lang="zh"] {
  display: none !important;
}

.lang-content[hidden] {
  display: none !important;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.notice {
  width: 100%;
  margin: 0 auto 1rem;
  border: none;
  background-color: var(--notice-bg);
  border-radius: 6px;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.content-section {
  padding-top: 0.5rem;
  padding-bottom: 1.5rem;
}

.content-section p,
.content-section ul,
.content-section ol {
  margin-bottom: 1rem;
}

.content-section p:last-child,
.content-section ul:last-child,
.content-section ol:last-child {
  margin-bottom: 0;
}

.button-row {
  display: grid;
  grid-template-columns: minmax(0, 16rem);
  gap: 1rem;
  margin-top: 1rem;
  justify-content: start;
}

.result-language {
  padding-top: 1rem;
  text-align: justify;
  hyphens: auto;
}

.result-language h2,
.result-language h3,
.result-language figcaption,
.result-language li,
.result-language .references {
  text-align: left;
  hyphens: none;
}

.result-language > h2 {
  font-size: 24px;
  font-weight: 400;
  line-height: 28px;
}

.figure-note,
.result-figure figcaption {
  color: var(--muted);
  font-style: italic;
}

.result-figure {
  margin: 1rem 0;
  overflow-x: auto;
}

.result-figure img {
  display: block;
  width: 100%;
  min-width: 46rem;
  height: auto;
  border: 1px solid var(--rule);
  background: #fff;
}

.result-figure figcaption {
  margin-top: 0.5rem;
}

.references li {
  font-size: 14px;
  line-height: 1.45;
}

.site-footer {
  padding-top: 1rem;
}

.site-footer p {
  margin: 0;
}

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 30;
  min-width: 3.25rem;
  min-height: 3.25rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--button-border);
  border-radius: 999px;
  background: var(--button-active-bg);
  color: var(--button-active-text);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.6rem);
  transition: opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.28);
}

.back-to-top:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }

  .col-sm-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }

  .col-sm-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
  }

  .col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .col-sm-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }

  .offset-sm-1 {
    margin-left: 8.333333%;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }

  .col-md-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
  }

  .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }

  .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }

  .offset-md-2 {
    margin-left: 16.666667%;
  }

  .offset-md-3 {
    margin-left: 25%;
  }
}

@media (max-width: 767.98px) {
  html {
    scroll-padding-top: 8rem;
  }

  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem 0.75rem;
    align-items: center;
    padding-bottom: 0.65rem;
  }

  .site-header .col-md-4,
  .site-header .col-md-6,
  .site-header .col-md-2 {
    flex: none;
    max-width: none;
    width: auto;
    padding-bottom: 0;
  }

  .site-header .col-md-4 {
    grid-column: 1;
    grid-row: 1;
  }

  .site-header .col-md-2 {
    grid-column: 2;
    grid-row: 1;
  }

  .site-header .col-md-6 {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .site-header h1 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 17px;
    line-height: 21px;
  }

  .site-header .logo {
    max-height: 42px;
  }

  .header-controls {
    gap: 0.35rem;
  }

  .control-button {
    min-height: 2rem;
    padding: 0.38rem 0.62rem;
  }

  .theme-button {
    width: 2rem;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

@media (max-width: 575.98px) {
  .container {
    padding-top: 1.25rem;
  }

  html {
    scroll-padding-top: 7.5rem;
  }

  .site-header {
    margin-top: -1.25rem;
    padding-top: 1.25rem;
  }

  .logo {
    max-height: 38px;
  }

  h1 {
    font-size: 17px;
    line-height: 21px;
  }

  .result-language > h2 {
    font-size: 22px;
    line-height: 26px;
  }

  .button-row {
    grid-template-columns: 1fr;
  }

  .result-figure img {
    min-width: 38rem;
  }

  .header-controls {
    align-items: center;
    justify-content: flex-end;
  }

  .control-group,
  .theme-controls {
    width: max-content;
    max-width: 100%;
  }

  .control-button {
    flex: 0 0 auto;
    padding-right: 0.55rem;
    padding-left: 0.55rem;
  }

  .tabs {
    padding-top: 0.6rem;
    padding-bottom: 1rem;
  }

  .tab {
    min-height: 2.5rem;
  }

  .back-to-top {
    right: 0.9rem;
    bottom: 0.9rem;
    min-width: 3rem;
    min-height: 3rem;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }
}
