/* Pagine di contenuto (elenco fermate, errore 404): testo scorrevole e leggibile. */

body {
  background: var(--bg);
}

.page {
  width: min(880px, 100%);
  margin: 0 auto;
  padding: calc(16px + var(--safe-top)) calc(16px + var(--safe-right)) calc(40px + var(--safe-bottom)) calc(16px + var(--safe-left));
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand span {
  color: var(--ink-2);
  font-weight: 600;
}

.brand-mark {
  width: 28px;
  height: 35px;
}

.brand-pin,
.brand-glass {
  fill: var(--brand);
}

.brand-bus {
  fill: #ffffff;
}

.page h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 65ch;
  margin: 0 0 20px;
  color: var(--ink-2);
  font-size: 1.0625rem;
}

.filter {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 -16px 16px;
  padding: 10px 16px;
  background: var(--bg);
}

.filter label {
  display: block;
  margin-bottom: 6px;
  font-weight: 650;
}

.filter input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 16px;
}

.letters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.letters a {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}

.letters a:hover {
  background: var(--surface-2);
}

.group h2 {
  margin: 28px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  font-size: 1.25rem;
  scroll-margin-top: 90px;
}

.stops {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stops li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
}

.stops li > span {
  display: grid;
  min-width: 0;
}

.stops b {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.stops small {
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.stops a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.stops a:hover {
  background: var(--surface-2);
}

.empty {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
}

.page-footer {
  margin-top: 40px;
  color: var(--ink-2);
  font-size: 0.875rem;
}

.error-page {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  text-align: center;
}

.error-page .actions-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
