@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");
:root {
  --ink: #152a37;
  --muted: #60737d;
  --line: #dbe5e8;
  --teal: #007f79;
  --bg: #f4f7f6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    15px "DM Sans",
    sans-serif;
}
header {
  height: 76px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  background: #fff;
}
.brand {
  font:
    800 25px Manrope,
    sans-serif;
  text-decoration: none;
  color: var(--ink);
}
.brand span {
  color: var(--teal);
}
a {
  color: var(--teal);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 30px;
}
.header-right a {
  text-decoration: none;
  font-weight: 600;
}
.status {
  font-size: 10px;
  letter-spacing: 1.3px;
  color: var(--muted);
}
.status i {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #008d7f;
  border-radius: 50%;
  margin-right: 8px;
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 0 5vw;
}
.hero {
  padding: 58px 0 36px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--teal);
}
h1 {
  font:
    800 clamp(38px, 5vw, 66px)/1.1 Manrope,
    sans-serif;
  letter-spacing: -3px;
  margin: 16px 0;
}
h1 em {
  font-style: normal;
  color: var(--teal);
}
.hero p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}
.tags {
  display: flex;
  gap: 8px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.tags span {
  border: 1px solid #cbdedb;
  border-radius: 30px;
  padding: 7px 12px;
  font-size: 11px;
  color: #426963;
  background: #edf4f1;
}
.workspace {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 45px #203e4c06;
}
.controls {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.4fr auto;
  gap: 26px;
  align-items: center;
  padding: 25px;
  border-bottom: 1px solid var(--line);
}
label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.7px;
  color: var(--muted);
  margin-bottom: 8px;
}
select {
  width: 100%;
  border: 1px solid #d5dfe2;
  background: #fff;
  color: var(--ink);
  padding: 10px;
  border-radius: 7px;
  font:
    12px "DM Sans",
    sans-serif;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--teal);
}
.lead-control label {
  display: flex;
  justify-content: space-between;
}
.lead-control strong {
  color: var(--teal);
}
.ends {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}
button {
  background: var(--teal);
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 13px 16px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
button span {
  margin-left: 10px;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.notice {
  padding: 11px 25px;
  background: #f0f7f5;
  color: #41685f;
  font-size: 11px;
}
.notice.error {
  background: #fff0ee;
  color: #b03728;
}
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  padding: 25px;
  gap: 30px;
  border-bottom: 1px solid var(--line);
}
.metrics > div {
  border-left: 2px solid #d9e9e3;
  padding-left: 16px;
}
.metrics span {
  display: block;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1px;
}
.metrics strong {
  display: block;
  font:
    700 28px Manrope,
    sans-serif;
  margin: 5px 0;
}
.metrics small {
  color: var(--muted);
  font-size: 10px;
}
.map-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding: 25px;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 15px;
}
h2 {
  font:
    700 13px Manrope,
    sans-serif;
  margin: 0;
}
.panel-heading > span {
  font-size: 10px;
  color: var(--muted);
}
canvas {
  width: 100%;
  display: block;
  border-radius: 5px;
}
.map-grid canvas {
  cursor: crosshair;
  aspect-ratio: 1.65;
}
.legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  color: var(--muted);
  margin-top: 10px;
}
.ramp {
  height: 5px;
  flex: 1;
  background: linear-gradient(
    90deg,
    #29377d,
    #53b4c6,
    #f2e9b8,
    #e8824e,
    #9c3446
  );
  border-radius: 6px;
}
.ramp.spread {
  background: linear-gradient(90deg, #eef6f3, #198878, #103e49);
}
.caption {
  font-size: 9px;
  color: var(--muted);
  margin-top: 11px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  border-top: 1px solid var(--line);
  padding: 25px;
}
.point-controls {
  display: flex;
  gap: 12px;
}
.point-controls label {
  display: flex;
  align-items: center;
  gap: 7px;
  letter-spacing: 0;
}
.point-controls select {
  width: 90px;
  padding: 5px;
  font-size: 10px;
}
#trajectories {
  height: 230px;
}
.line-legend {
  display: flex;
  gap: 20px;
  font-size: 10px;
  color: var(--muted);
  flex-wrap: wrap;
}
.line-legend span:before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 2px;
  background: #a5bfc0;
  vertical-align: middle;
  margin-right: 7px;
}
.line-legend .mean:before {
  background: var(--teal);
}
.line-legend .observed:before {
  background: #e78550;
}
.weight {
  display: grid;
  grid-template-columns: 22px 1fr 40px;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  color: var(--muted);
  height: 30px;
}
.weight .track {
  height: 7px;
  background: #edf2f3;
  border-radius: 6px;
  overflow: hidden;
}
.weight .fill {
  height: 100%;
  background: var(--teal);
  border-radius: 6px;
  transition: width 0.25s;
}
.weight b {
  font-weight: 500;
  text-align: right;
}
details {
  border-top: 1px solid var(--line);
  padding: 20px 25px;
  font-size: 12px;
}
summary {
  cursor: pointer;
  color: var(--teal);
  font-weight: 600;
}
.graph-area {
  display: flex;
  gap: 35px;
  align-items: center;
  padding-top: 20px;
}
.graph-area canvas {
  width: 240px;
  height: 240px;
}
.graph-area p {
  max-width: 460px;
  line-height: 1.8;
  color: var(--muted);
}
.how {
  padding: 48px 0;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 24px;
}
.steps b {
  font: 600 13px Manrope;
  color: var(--teal);
}
h3 {
  font: 700 22px Manrope;
  margin: 10px 0;
}
.steps p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
footer {
  padding: 28px 0 45px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
}
footer strong {
  color: var(--ink);
}
footer p {
  max-width: 900px;
}
#valid {
  font-size: 22px;
}
@media (max-width: 900px) {
  .controls {
    grid-template-columns: 1fr 1fr;
  }
  .map-grid {
    gap: 12px;
    padding: 18px;
  }
  .panel-heading {
    align-items: flex-start;
  }
  h2 {
    font-size: 11px;
  }
  .detail-grid {
    grid-template-columns: 1.7fr 1fr;
    gap: 20px;
  }
}
@media (max-width: 600px) {
  header {
    height: 64px;
  }
  .status {
    display: none;
  }
  main {
    padding: 0 16px;
  }
  .hero {
    padding-top: 36px;
  }
  h1 {
    letter-spacing: -1.8px;
  }
  .hero p {
    font-size: 14px;
  }
  .desktop {
    display: none;
  }
  .controls {
    gap: 16px;
    padding: 18px;
  }
  .metrics {
    gap: 12px;
    padding: 18px;
  }
  .metrics strong {
    font-size: 22px;
  }
  #valid {
    font-size: 15px;
  }
  .metrics small {
    font-size: 9px;
  }
  .metrics span {
    font-size: 8px;
    letter-spacing: 0;
  }
  .map-grid {
    grid-template-columns: 1fr;
  }
  .map-grid canvas {
    max-height: 270px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
    padding: 18px;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .how {
    padding: 30px 0;
  }
  .graph-area {
    flex-direction: column;
  }
  .line-legend {
    gap: 12px;
  }
  .point-controls {
    flex-wrap: wrap;
  }
}
