/* Route pages (/door/<key>): the same poster family as the section pages —
   page-mast headline, receipt card with a hard shadow, numbered entries on
   thin rules — plus the blue thread that strings the stops together. */

.route-mast {
  --page-accent: var(--vermilion);
}

.route-mast--door-1 { --page-wash: #e7d9c4; }
.route-mast--door-3 { --page-wash: rgba(71, 117, 148, 0.24); --page-accent: var(--blue); }
.route-mast--door-4 { --page-wash: #d9d7b7; --page-accent: var(--mustard); }

.route-mast__title {
  view-transition-name: route-heading;
}

.route-mast__name {
  margin: 22px 0 0;
  font-family: var(--display);
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 900;
  line-height: 1.2;
}

.route-mast .page-mast__lead small {
  display: block;
  margin-top: 6px;
  color: rgba(23, 47, 74, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.route-receipt dl {
  display: grid;
  margin: 18px 0 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.route-receipt dl div {
  padding: 12px 0 10px;
}

.route-receipt dl div + div {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.route-receipt dt {
  font-size: 12px;
  font-weight: 800;
}

.route-receipt dd {
  margin: 0;
  font-family: var(--display);
  font-size: 40px;
  font-weight: 900;
  line-height: 1.05;
}

.route-receipt p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}

.route-body {
  display: grid;
  gap: 54px;
}

/* Track switcher: whole-row buttons, as reachable as the door spines. */
.route-switch {
  display: grid;
  max-width: 900px;
  gap: 10px;
}

.route-switch button {
  min-height: 60px;
  display: flex;
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--indigo);
  background: var(--rice);
  border: 2px solid var(--indigo);
  font: 800 16px var(--body);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms var(--motion-out), box-shadow 180ms var(--motion-out), background 180ms ease-out;
}

.route-switch button[aria-pressed="true"] {
  color: var(--paper);
  background: var(--indigo);
  box-shadow: 6px 6px 0 var(--mustard);
}

.route-switch__group {
  display: grid;
  gap: 8px;
  padding: 12px 14px 14px;
  border: 2px dashed rgba(23, 47, 74, 0.45);
}

.route-switch__group > span {
  font-size: 14px;
  font-weight: 900;
}

.route-switch__group > div {
  display: grid;
  gap: 8px;
}

.route-switch__group button {
  min-height: 52px;
  font-size: 15px;
}

/* 先说结论 */
.route-first {
  max-width: 900px;
}

.route-card {
  border-top: 1px solid var(--line);
}

.route-card:last-child {
  border-bottom: 1px solid var(--line);
}

.route-card summary {
  min-height: 60px;
  display: flex;
  padding: 14px 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-family: var(--display);
  font-size: 20px;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}

.route-card summary::-webkit-details-marker {
  display: none;
}

.route-card summary i {
  font-style: normal;
  font-family: var(--utility);
  font-size: 24px;
  transition: transform 220ms var(--motion-out);
}

.route-card[open] summary i {
  transform: rotate(45deg);
}

.route-card div {
  padding: 0 0 18px;
}

.route-card p {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.85;
}

.route-card a {
  color: var(--vermilion);
  font-weight: 800;
}

/* The line: a blue thread down the left margin strings the numbered stops. */
.route-line__stops {
  position: relative;
  display: grid;
  max-width: 900px;
  margin: 0;
  padding: 0 0 0 58px;
  list-style: none;
  gap: 14px;
}

.route-line__stops::before {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 21px;
  width: 3px;
  content: "";
  background: var(--blue);
  transform-origin: top;
  transform: scaleY(var(--thread, 1));
}

.route-stop a {
  position: relative;
  display: grid;
  padding: 18px 22px 20px;
  color: var(--indigo);
  background: var(--paper);
  border: 2px solid var(--indigo);
  box-shadow: var(--shadow-x, 6px) var(--shadow-y, 6px) 0 rgba(23, 47, 74, 0.2);
  text-decoration: none;
  transition: box-shadow 180ms var(--motion-out), transform 180ms var(--motion-out);
}

.route-stop a:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 rgba(23, 47, 74, 0.2);
}

.route-stop__num {
  position: absolute;
  top: 16px;
  left: -58px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: var(--rice);
  border: 3px solid var(--blue);
  border-radius: 50%;
  font: 900 15px var(--utility);
  transition: color 240ms ease-out, background 240ms ease-out;
}

.route-stop.is-passed .route-stop__num {
  color: var(--paper);
  background: var(--blue);
}

.route-stop__meta {
  color: rgba(23, 47, 74, 0.74);
  font-size: 12px;
  font-weight: 800;
}

.route-stop__meta em {
  color: var(--vermilion);
  font-style: normal;
}

.route-stop__title {
  margin: 6px 0 6px;
  font-family: var(--display);
  font-size: clamp(20px, 2.1vw, 26px);
  font-weight: 900;
  line-height: 1.3;
}

.route-stop__dek {
  font-size: 14px;
  line-height: 1.75;
}

.route-ticket a {
  position: relative;
  display: grid;
  margin-right: 18%;
  padding: 12px 18px 13px;
  color: var(--indigo-deep);
  background: var(--mustard);
  border: 2px solid var(--indigo-deep);
  box-shadow: 4px 4px 0 rgba(23, 47, 74, 0.25);
  text-decoration: none;
}

.route-ticket a::before {
  position: absolute;
  top: 50%;
  left: -44px;
  width: 16px;
  height: 16px;
  content: "";
  background: var(--mustard);
  border: 2px solid var(--indigo-deep);
  transform: translateY(-50%) rotate(45deg);
}

.route-ticket a > span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.route-ticket strong {
  font-family: var(--display);
  font-size: 19px;
  line-height: 1.35;
}

.route-ticket small {
  font-size: 13px;
}

.route-also ul {
  max-width: 900px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.route-also li a {
  min-height: 52px;
  display: block;
  padding: 12px 0;
  color: var(--indigo);
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  text-decoration: none;
}

.route-also li b {
  margin-right: 8px;
  color: var(--blue);
  font-family: var(--utility);
}

.route-also li small {
  margin-left: 6px;
  color: rgba(23, 47, 74, 0.7);
  font-size: 12px;
}

.route-end {
  padding-top: 36px;
  border-top: 2px solid var(--indigo);
}

.route-end h2 {
  margin: 0 0 26px;
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 900;
  line-height: 1.15;
}

.route-end__beside {
  display: grid;
  max-width: 900px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.route-beside {
  display: grid;
  min-height: 120px;
  padding: 16px 18px;
  color: var(--indigo);
  background: #e7d9c4;
  border: 2px solid var(--indigo);
  box-shadow: 6px 6px 0 rgba(23, 47, 74, 0.18);
  text-decoration: none;
}

.route-beside--door-2 { background: var(--rose); }
.route-beside--door-3 { color: var(--paper); background: var(--indigo); }
.route-beside--door-4 { background: #d9d7b7; }
.route-beside--door-5 { color: var(--paper); background: var(--blue); }
.route-beside--door-6 { background: var(--mustard); }

.route-beside > span {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.route-beside strong {
  font-size: 16px;
}

.route-beside small {
  font-size: 13px;
  opacity: 0.86;
}

.route-end__boundary {
  margin: 26px 0 0;
  font-size: 13px;
}

@media (max-width: 880px) {
  .route-body {
    gap: 40px;
  }

  .route-line__stops {
    padding-left: 44px;
  }

  .route-line__stops::before {
    left: 15px;
  }

  .route-stop__num {
    left: -44px;
    width: 34px;
    height: 34px;
    font-size: 13px;
  }

  .route-stop a {
    padding: 14px 16px 16px;
  }

  .route-ticket a {
    margin-right: 0;
  }

  .route-ticket a::before {
    left: -36px;
  }

  .route-card summary {
    font-size: 18px;
  }

  .route-end__beside {
    grid-template-columns: 1fr;
  }
}
