:root {
  --low: #8ae488;
  --int1: #7abaef;
  --int2: #ca87d4;
  --high: #ff6162;
  --grid-line: rgba(255, 255, 255, 0.58);
  --text: #333;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.42857143;
  background: #fff;
}

a {
  color: #337ab7;
  text-decoration: none;
}

a:focus,
a:hover {
  color: #23527c;
  text-decoration: underline;
}

.container {
  width: min(1170px, calc(100% - 30px));
  margin: 0 auto;
}

.page-header {
  padding: 20px 0 10px;
}

h1 {
  margin: 0.67em 0;
  font-size: 36px;
  font-weight: 500;
  line-height: 1.1;
}

h2 {
  margin: 10px 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.1;
}

p {
  margin: 0 0 10px;
}

.layout {
  display: grid;
  grid-template-columns: 33.333333% 66.666667%;
  gap: 30px;
  align-items: start;
}

.sidebar {
  padding: 10px 15px;
  background-color: #f5f5f5;
  border-radius: 4px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: inline-block;
  max-width: 100%;
  margin-bottom: 5px;
  font-weight: 700;
}

.age-slider {
  display: block;
  width: 100%;
}

.slider-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  color: #555;
}

.slider-row span:last-child {
  text-align: right;
}

#age-value {
  min-width: 3ch;
  font-weight: 700;
  color: #333;
  text-align: center;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 10px;
  font-weight: 400;
}

.checkbox-row input {
  margin-top: 3px;
}

.sidebar-section {
  margin-top: 26px;
}

.sidebar-section p {
  margin-bottom: 0;
}

.reference p {
  margin-bottom: 10px;
}

.notice {
  font-size: smaller;
}

.plots {
  min-width: 0;
}

.plot-block {
  margin: 0 0 20px;
}

.plot-block img {
  display: block;
  width: 100%;
  height: auto;
}

.nomogram-canvas {
  display: block;
  width: 100%;
  max-width: 760px;
  height: auto;
  margin: 0 auto;
}

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

  h1 {
    font-size: 30px;
  }

}

@media (max-width: 520px) {
  .container {
    width: min(100% - 20px, 1170px);
  }

  h1 {
    font-size: 25px;
  }

  .sidebar {
    padding: 10px;
  }

}
