/* London to Brighton 2026 article: weekend strip, route map and hoard lots */

/* The weekend at a glance */
.chronicle-content .l2b-weekend {
  display: grid;
  gap: 0.75rem;
  margin: 2rem 0 2.5rem;
  font-family: var(--font-display);
}

.chronicle-content .l2b-day {
  display: block;
  padding: 0.9rem 1rem 1rem;
  border-top: 3px solid var(--teal-700);
  background: #f6f6f1;
  color: var(--ink-900);
  text-decoration: none;
  line-height: 1.35;
  transition: background-color 0.2s;
}

.chronicle-content .l2b-day:hover {
  background: #ecece4;
}

.l2b-day__when {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-700);
}

.l2b-day__what {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.l2b-day__detail {
  display: block;
  font-size: 0.9rem;
  color: #444;
}

@media (min-width: 640px) {
  .chronicle-content .l2b-weekend {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Route map */
.l2b-map {
  margin: 2.5rem 0;
  font-family: var(--font-display);
  line-height: 1.4;
}

.l2b-map__grid {
  display: grid;
  border: 1px solid #d9d9d2;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.l2b-map__mapwrap {
  position: relative;
  min-width: 0;
  /* Keeps Leaflet's high z-indexes from sliding over the sticky site header */
  isolation: isolate;
}

.l2b-map__canvas {
  height: min(62vh, 520px);
  min-height: 380px;
  background: #e9e9e3;
  font-family: var(--font-display);
}

.l2b-map__canvas[hidden],
.l2b-map--no-map .l2b-map__mapwrap {
  display: none;
}

/* Chronicle images get margins and rounded corners, which would break the map tiles */
.chronicle-content .l2b-map__canvas img {
  margin: 0;
  max-width: none;
  border-radius: 0;
}

.l2b-map__canvas .leaflet-tile-pane {
  filter: grayscale(1) sepia(0.12) brightness(1.03) contrast(0.92);
}

/* The route fits at a fractional zoom, which leaves hairline gaps between tiles. Overlapping them
   closes the gaps, as long as Leaflet's plus-lighter blend doesn't brighten the overlap. */
.chronicle-content .l2b-map__canvas img.leaflet-tile {
  width: 257px !important;
  height: 257px !important;
  mix-blend-mode: normal;
}

.l2b-map__reset {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 500;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--teal-700);
  border-radius: 4px;
  background: #fff;
  color: var(--teal-700);
  font: 600 0.8rem var(--font-display);
  cursor: pointer;
}

.l2b-map__reset[hidden] {
  display: none;
}

.l2b-map__panel {
  min-width: 0;
  padding: 1rem 1.1rem 0.6rem;
}

.chronicle-content .l2b-map__kicker {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-700);
}

.l2b-tracker[hidden] {
  display: none;
}

.l2b-tracker__time {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}

.l2b-tracker__read {
  margin: 0.4rem 0 0.75rem;
  font-size: 0.9rem;
}

.l2b-tracker__read div {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0.5rem;
  padding: 0.15rem 0;
}

.l2b-tracker__read dt {
  font-weight: 700;
}

.l2b-tracker__read dd {
  margin: 0;
  color: #333;
}

.l2b-tracker__controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.l2b-tracker__play {
  flex: none;
  min-width: 6.4rem;
  padding: 0.5rem 0.7rem;
  border: 0;
  border-radius: 4px;
  background: var(--teal-700);
  color: #fff;
  font: 600 0.85rem var(--font-display);
  cursor: pointer;
}

.l2b-tracker__slider {
  flex: 1;
  min-width: 0;
  height: 1.75rem;
  margin: 0;
  accent-color: var(--teal-700);
  cursor: pointer;
}

.l2b-tracker__play:focus-visible,
.l2b-tracker__slider:focus-visible,
.l2b-map__reset:focus-visible,
.l2b-stops button:focus-visible {
  outline: 2px solid var(--teal-700);
  outline-offset: 2px;
}

.chronicle-content .l2b-stops {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #e6e6e0;
  font-size: 0.85rem;
}

.chronicle-content .l2b-stops li {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0.3rem 0.25rem;
  border-bottom: 1px solid #efefe9;
}

/* Once the script runs each stop is a button that takes the map there */
.chronicle-content .l2b-stops li:has(> button) {
  padding: 0;
}

.l2b-stops button {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.3rem 0.25rem;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.l2b-stops button:hover {
  background: #f6f6f1;
}

.l2b-stops__name {
  position: relative;
  padding-left: 0.95rem;
}

.l2b-stops__name::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 0.55rem;
  height: 0.55rem;
  border: 2px solid #1a1a1a;
  border-radius: 50%;
  box-sizing: border-box;
  background: #fff;
}

.l2b-stops__time {
  flex: none;
  color: #555;
  font-variant-numeric: tabular-nums;
}

.l2b-stops__branch {
  color: #0277b5;
  font-weight: 600;
}

.l2b-stops li.is-passing .l2b-stops__name {
  font-weight: 700;
}

.l2b-stops li.is-passing .l2b-stops__name::before {
  border-color: var(--teal-700);
  background: var(--teal-700);
}

.l2b-stops li.is-passing .l2b-stops__time {
  color: var(--teal-700);
}

.l2b-map figcaption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #555;
}

.l2b-key {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.9rem;
  white-space: nowrap;
  color: #222;
  font-weight: 600;
}

.l2b-key::before {
  content: "";
  width: 1.4rem;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
}

.l2b-key--red::before { background: #c8102e; }
.l2b-key--blue::before { background: #0288d1; }
.l2b-key--field::before { height: 8px; background: #09484a; }

.l2b-key--note::before { display: none; }

.l2b-key__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 3px;
  background: #1a1a1a;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

.l2b-map__note {
  display: block;
  margin-top: 0.35rem;
}

/* Bits of the map Leaflet draws */
.l2b-label.leaflet-tooltip {
  padding: 1px 6px;
  border: 0;
  border-radius: 3px;
  background: var(--teal-700);
  color: #fff;
  font: 700 0.72rem var(--font-display);
  box-shadow: none;
}

.l2b-label.leaflet-tooltip::before {
  display: none;
}

.l2b-note {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 4px;
  box-sizing: border-box;
  background: #1a1a1a;
  color: #fff;
  font: 700 0.72rem var(--font-display);
}

.l2b-flag {
  background: none;
  border: 0;
}

.l2b-map .leaflet-popup-content {
  margin: 0.6rem 0.8rem;
  font: 0.85rem/1.4 var(--font-display);
}

@media (min-width: 760px) {
  .l2b-map__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }

  .l2b-map--no-map .l2b-map__grid {
    grid-template-columns: 1fr;
  }

  .l2b-map__canvas {
    height: 640px;
  }
}

/* The Somerset Hoard lots */
.chronicle-content .l2b-lots {
  display: grid;
  gap: 0.6rem;
  margin: 1.5rem 0 2rem;
  padding: 0;
  list-style: none;
}

.chronicle-content .l2b-lots li {
  list-style: none;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid #e0e0d9;
  border-radius: 6px;
  background: #fff;
}

.l2b-lot__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.15rem 1rem;
  align-items: baseline;
  font-family: var(--font-display);
}

.l2b-lot__name {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink-900);
}

.l2b-lot__estimate {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--teal-700);
  font-variant-numeric: tabular-nums;
}

.l2b-lot__text {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.12rem;
  line-height: 1.45;
  color: #3b3b3b;
}

.l2b-chip {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  font: 600 0.75rem var(--font-display);
}

.l2b-chip--in { background: #dcf2ee; color: #09484a; }
.l2b-chip--maybe { background: #eeeeea; color: #444; }
.l2b-chip--out { background: #f6e3e3; color: #8c1515; }
