#controls {
  margin-bottom: 15px;
}

#controls label {
  margin-right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#controls input {
  font-size: 12px;
  width: 75px;
  height: 28px;
  padding: 2px 4px;
}

svg {
  width: 100%;
  height: auto;
  max-width: 880px;
  max-height: 660px;
  display: block;
  touch-action: none;
}
.overlay {
  stroke: transparent;
  stroke-width: 40; /* larger for touch */
  fill: none;
  pointer-events: all;
}
.line-y {
  stroke: steelblue;
  stroke-width: 2;
  fill: none;
}

.line-z1 {
  stroke: orange;
  stroke-width: 2;
  fill: none;
}

.line-z2 {
  stroke: green;
  stroke-width: 2;
  fill: none;
}

.tooltip {
  position: absolute;
  background: white;
  border: 1px solid #999;
  padding: 6px 8px;
  font-size: 10px;
  pointer-events: none;
  opacity: 0;
}

.span-tooltip {
  position: relative;       /* Needed so tooltip-text is positioned relative to this */
  cursor: pointer;          /* Makes it look clickable/hoverable */
}

.tooltip-text {
  visibility: hidden;       
  width: 200px;             
  background-color: #fff;   /* White background */
  color: #000;              /* Black text */
  text-align: center;
  padding: 5px 8px;
  border-radius: 4px;
  border: 1px solid #000;  /* Optional: add border so it stands out */

  position: absolute;       
  bottom: 125%;             
  left: 75%;
  transform: translateX(-50%);
  z-index: 1;
}

.span-tooltip:hover .tooltip-text,
input:hover + .tooltip-text {
  visibility: visible;
}

.legend {
  font-size: 12px;
}

.legend line {
  stroke-width: 2;
}

#input_container {
  position: relative;
  height: 35px;
}

#primary_input, #secondary_input {
  position: absolute;
  top: 0;
  left: 0%;
  width: 100%;
}

.text-z1 {
  color: #ffa500;
}

.text-z2 {
  color: #228B22;
}

.footnote {
  font-size: 10px;
  fill: #666;
}

.subtitle {
  font-size: 0.6rem;
}

#share_btn {
  font-size: 0.8rem;
}

#summary {
  display: flex;
  gap: 5px;
}

.card {
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  width: 100px;
  text-align: center;
  vertical-align: center;
  margin-bottom: 10px;
}

.card h5 {
  font-size: 11px;
  font-weight: bold;
  margin-top: 5px;
}

.value {
  font-size: 11px;
  align-items: center;
  justify-content: center;
  display: inline-flex;
  margin-left: 12px;
}

.circle {
  display: inline-flex;
  width: 15px;
  height: 15px;
  border: 1px solid grey;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: bold;
  margin-left: 10px;
  color: white;
}
