:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #171717;
  background: #f5f5f7;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.page {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.header {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-height: 44px;
}

.brand {
  color: inherit;
  text-decoration: none;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.product {
  font-size: 21px;
  font-weight: 600;
}

.intro {
  margin: 42px 0 22px;
}

h1 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: -0.8px;
}

.intro p,
.footnote {
  margin: 0;
  color: #6e6e73;
  line-height: 1.45;
}

.card {
  background: #fff;
  border: 1px solid #e3e3e7;
  border-radius: 18px;
  padding: 22px;
}

label,
.caption {
  display: block;
  color: #6e6e73;
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 7px;
}

.check-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input,
button {
  min-height: 44px;
  border-radius: 11px;
  font: inherit;
}

input {
  width: 100%;
  border: 1px solid #c9c9ce;
  background: #fff;
  color: #171717;
  padding: 9px 12px;
  outline: none;
}

input:focus {
  border-color: #7c7c82;
}

button {
  border: 0;
  padding: 9px 18px;
  background: #1d1d1f;
  color: #fff;
  cursor: pointer;
}

button:disabled {
  opacity: .55;
  cursor: default;
}

.message {
  margin-top: 16px;
  line-height: 1.4;
}

.message.error {
  color: #b42318;
}

.result {
  margin-top: 22px;
}

.route-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.route-name {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.3px;
}

.divider {
  height: 1px;
  background: #e8e8eb;
  margin: 20px 0;
}

.measurement {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  padding: 9px 0;
}

.measurement + .measurement {
  border-top: 1px solid #eeeeef;
}

.measurement-route {
  font-weight: 600;
}

.measurement-detail {
  color: #6e6e73;
  font-size: 13px;
}

.measurement-total {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  font-variant-numeric: tabular-nums;
}

.footnote {
  margin-top: 16px;
  padding: 0 4px;
  font-size: 13px;
}

.hidden {
  display: none !important;
}

@media (max-width: 560px) {
  .page {
    width: min(100% - 24px, 720px);
    padding-top: 16px;
  }

  .intro {
    margin-top: 30px;
  }

  h1 {
    font-size: 30px;
  }

  .card {
    padding: 18px;
    border-radius: 16px;
  }

  .check-row {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}
