/* elevation-profile.css: moved out of src/components/ElevationProfile.astro on 2026-10-27, so a style fix is a single file upload. */

.profile {
  margin: 2em 0;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.profile .profile-title {
  max-width: none;
  margin: 0 0 10px;
  font: 700 1.1rem/1.25 var(--title);
}

.profile svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.profile .grid line {
  stroke: var(--line);
}

.profile .grid text {
  fill: var(--ink-soft);
  font: 400 11px var(--body);
  text-anchor: end;
}

.profile .area {
  fill: rgb(111 207 151 / 0.22);
}

.profile .trace {
  fill: none;
  stroke: var(--accent-deep);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.profile .ref {
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
}

.profile .ref-key {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: none;
  margin: 10px 0 0;
  font: 700 0.84rem/1.3 var(--head);
}

.profile .ref-key span {
  flex: 0 0 28px;
  border-top: 2px dashed var(--ink);
}

.profile .stop circle {
  fill: var(--ink);
}

.profile .stop text {
  fill: var(--paper);
  font: 700 10px var(--head);
  text-anchor: middle;
}

.profile .stops {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px 22px;
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.profile .stops li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  column-gap: 10px;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--ink-soft);
}

.profile .num {
  grid-row: span 3;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font: 700 0.72rem/1 var(--head);
}

.profile .stops b {
  font: 700 0.98rem/1.3 var(--title);
  color: var(--ink);
}

.profile .stops em {
  font-style: normal;
  font-size: 0.84rem;
}

.profile figcaption {
  margin-top: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* On a phone the drawing shrinks to about half, so its text is drawn twice as large to stay readable. */
@media (max-width: 700px) {
  .profile .grid text {
    font-size: 24px;
  }
  .profile .ref {
    stroke-width: 2.5;
  }
  .profile .stop circle {
    r: 17px;
  }
  .profile .stop text {
    font-size: 18px;
    transform: translateY(2.5px);
  }
  .profile .trace {
    stroke-width: 4;
  }
  /* One compact line per stop: number, name, height. */
  .profile .stops {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }
  .profile .stops li {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: baseline;
  }
  .profile .num {
    grid-row: span 2;
    align-self: start;
  }
  .profile .stops li > span:not(.num) {
    grid-column: 3;
    grid-row: 1;
    text-align: right;
    white-space: nowrap;
  }
  .profile .stops em {
    grid-column: 2 / 4;
  }
}
