@font-face {
  font-family: "Open Sans";
  src: url("open-sans-v15-latin-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("open-sans-v15-latin-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --blue: #0068b4;
  --dark-blue: #004e88;
  --text: #303940;
  --border: #71818b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font: 1rem/1.55 "Open Sans", Arial, sans-serif;
}

main {
  padding: .3rem .35rem 1rem;
  overflow-wrap: anywhere;
}

h1 {
  margin: 0 0 .75rem;
  color: var(--blue);
  font-size: 1.45rem;
  line-height: 1.3;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--dark-blue);
  text-decoration: underline;
  text-underline-offset: .14em;
}

:focus-visible {
  outline: 3px solid #1b2630;
  outline-offset: 2px;
}

#result-heading:focus,
#ortsauswahl:focus {
  outline: none;
}

.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 44rem;
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: .25rem;
  font-weight: 700;
}

select,
button,
.button-link {
  min-height: 2.75rem;
  max-width: 100%;
  padding: .5rem .75rem;
  border: 1px solid var(--border);
  border-radius: .25rem;
  font: inherit;
}

select {
  width: 100%;
  color: var(--text);
  background: #fff;
  text-overflow: ellipsis;
}

button,
.button-link {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
  font-weight: 700;
  cursor: pointer;
}

button:hover,
.button-link:hover {
  border-color: var(--dark-blue);
  background: var(--dark-blue);
}

.button-link {
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.back {
  text-align: end;
}

.notice {
  padding: .75rem;
  border-inline-start: .25rem solid var(--blue);
  background: #eef5fa;
}

dl {
  margin: 0;
}

dd {
  margin: 0;
}

.route {
  margin-bottom: 1.5rem;
}

.route div,
.prices div {
  display: grid;
  gap: .25rem .75rem;
}

.route div {
  grid-template-columns: minmax(7rem, 26%) minmax(0, 1fr);
  padding: .25rem 0;
}

.route dt {
  font-weight: 700;
}

.fare {
  margin-bottom: 1rem;
  border: 1px solid #ccd8e0;
  border-radius: .25rem;
}

.fare h2 {
  margin: 0;
  padding: .5rem .75rem;
  color: #fff;
  background: var(--blue);
  font-size: 1.125rem;
  line-height: 1.4;
}

.fare p {
  margin: .5rem .75rem;
}

.prices div {
  grid-template-columns: minmax(0, 1fr) max-content;
  padding: .4rem .75rem;
}

.prices div + div {
  border-top: 1px solid #dce4ea;
}

.prices dd {
  text-align: end;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 34rem) {
  .fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 23rem) {
  .route div {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media print {
  .no-print {
    display: none;
  }

  body, a, h1, .fare h2 {
    color: #000;
    background: #fff;
  }

  .fare h2 {
    break-after: avoid;
  }

  .prices div {
    break-inside: avoid;
  }
}
