* {
	box-sizing: border-box;;
  margin: 0;
  padding: 0;
}

body {
	height: 100%;
	width: 100%;
	overflow: hidden;
	font-family: sans-serif;
	padding: 1em;
}

.draggable {
  cursor: grab;
  cursor: -webkit-grab;
	pointer-events: all;
}

body.dragging, body.dragging .draggable {
  cursor: grabbing;
  cursor: -webkit-grabbing;
}

svg {
	display: block;
}

svg * {
	pointer-events: none;
}

@media (min-aspect-ratio: 8/5) {
	svg {
		width: calc(100vh - 2em);
	}

	form {
		left: calc(100vh + 2em);
	}
}
    
@media (max-aspect-ratio: 8/5) {
	svg {
		width: 62.5vw;
	}

	form {
		left: calc(62.5vw + 2em);
	}
}

.plot {
	fill: none;
	stroke: #AE81FF;
	stroke-width: 0.05;
}

.point-y {
	cursor: grab;
	fill: #1A69B5;
}

.line-y {
	stroke-dasharray: 0.05 0.05;
	stroke: #1A69B5;
	stroke-width: 0.01;
}

.point-x {
	fill: #A52117;
}

.line-x {
	stroke-dasharray: 0.05 0.05;
	stroke: #A52117;
	stroke-width: 0.01;
}

/* mobile dragging */
.fat-fingers {
	fill: transparent;
}

@media (any-hover: hover) {
	.fat-fingers {
		display: none;
	}
}

/* form */
form {
	position: absolute;
	top: 1em;
}

form > span {
	display: block;
	font-size: 2em;
	margin: 2em 0;
}

button {
	background: #1BBB68;
	border-radius: 2px;
	box-shadow: 0 0 2px #000;
	border: none;
	color: #FFF;
	display: block;
	font-size: 2em;
	padding: .2em;
	user-select: none;
	-webkit-user-select: none;
}

button:active {
	background: #169653;
}

.test-region {
	fill: #169653;
	fill-opacity: 0.5;
}

.pause-resume {
	background: #FF0;
	color: #444;
	margin: 1em 0;
}

.pause-resume:active {
	background: #DD0;
}

/* hiding */
.point-x, .line-x, #x-approx, .test-region {
	visibility: hidden;
}

.show-x > svg > .point-x,
.show-x > svg > .line-x,
.show-x > svg > .test-region,
.show-x > form > #x-approx {
	visibility: visible;;
}

/* grid */
.gridline {
  stroke: #666;
  stroke-width: 0.01;
}

.major-axis {
  stroke: #000;
  stroke-width: 0.08;
}

.axis-label {
  fill: #000;
  font-size: 0.04ex;
  text-anchor: middle;
  stroke:; none;
}

.axis-tick {
  stroke: #777;
  stroke-width: 0.05;
}