:root {
  color-scheme: light;
  --bg: #ffffff;
  --well: #f5f5f5;
  --text: #333333;
  --muted: #737373;
  --line: #eeeeee;
  --well-line: #e3e3e3;
  --link: #337ab7;
  --link-hover: #23527c;
  --input-line: #cccccc;
  --focus: #66afe9;
}

* {
  box-sizing: border-box;
}

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

a {
  color: var(--link);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--link-hover);
  text-decoration: underline;
}

.page {
  width: min(1170px, calc(100% - 30px));
  margin: 0 auto;
  padding: 20px 15px 40px;
}

.intro {
  margin-bottom: 20px;
}

.eyebrow {
  display: none;
}

h1,
h2 {
  color: inherit;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.1;
}

h1 {
  margin: 20px 0 10px;
  font-size: 36px;
}

h2 {
  margin: 10px 0;
  font-size: 18px;
}

.lead {
  max-width: none;
  margin: 0 0 10px;
  color: var(--text);
  font-size: 14px;
}

.reference {
  max-width: none;
  margin-top: 10px;
}

.reference p,
.survival p {
  color: var(--text);
  margin: 0 0 10px;
}

.notice {
  max-width: none;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 85%;
  font-style: italic;
}

.calculator,
.results-grid {
  display: grid;
  gap: 30px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.calculator {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.visit-card,
.results-panel {
  min-height: 20px;
  border: 1px solid var(--well-line);
  border-radius: 4px;
  background-color: var(--well);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}

.visit-card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 19px;
}

.section-note,
.help {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}

label,
legend {
  display: inline-block;
  max-width: 100%;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

input[type="number"] {
  width: 100%;
  height: 34px;
  border: 1px solid var(--input-line);
  border-radius: 4px;
  padding: 6px 12px;
  background-color: #fff;
  background-image: none;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  color: var(--text);
  font: inherit;
  transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
}

input[type="number"]:focus {
  border-color: var(--focus);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
  outline: 0;
}

input[type="range"] {
  width: 100%;
  accent-color: #337ab7;
}

.range-value {
  justify-self: start;
  min-width: 48px;
  margin-top: -4px;
  border-radius: 4px;
  background: #fff;
  padding: 2px 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

fieldset {
  display: grid;
  gap: 5px;
  margin: 0 0 10px;
  border: 0;
  padding: 0;
}

.choice {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  margin-bottom: 0;
  font-weight: 400;
}

.results-grid {
  grid-template-columns: 5fr 3fr 3fr;
  margin-top: 20px;
}

.results-panel {
  padding: 19px;
}

.results-panel h2 {
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 24px;
}

.calculation,
.legend {
  padding: 0;
}

dl {
  display: grid;
  gap: 0;
  margin: 10px 0;
}

dl div {
  display: block;
  margin: 0 0 10px;
}

dt {
  display: inline;
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
}

dd {
  display: inline;
  margin: 0 0 0 4px;
  font-size: 14px;
  font-weight: 700;
}

.calculation p,
.legend p {
  margin: 0 0 10px;
}

.calculation ul {
  margin: 0 0 10px;
  padding-left: 40px;
}

.survival {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.survival img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 10px 0;
  border: 0;
  border-radius: 0;
}

@media (max-width: 900px) {
  .calculator,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .page {
    width: 100%;
    padding: 15px;
  }
}
