/* The road on Home (chain lessons on). Paper language, same tokens as
   home-paper.css. One continuous rule runs down the middle; nodes alternate
   left and right of it, stage banners sit across it. With body.is-path-home
   the hero and the dashboard cards step aside. */

body.is-path-home .home-hero,
body.is-path-home .home-dashboard {
  display: none !important;
}

body.view-home .home-path {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}

body.view-home .home-path[hidden] {
  display: none;
}

.home-path-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-path-meters {
  display: flex;
  gap: 14px;
  font-size: 1.15rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.home-path-meter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.home-path-meter b {
  font-weight: 950;
}

.home-path-history {
  min-height: 36px;
  padding: 0 12px;
  border: 1.5px solid var(--lp-ink, #15171b);
  border-radius: 999px;
  background: var(--lp-white, #fffdf8);
  color: var(--lp-ink, #15171b);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.home-path-note {
  margin: 0;
  padding: 10px 12px;
  border: 1.5px solid var(--lp-ink, #15171b);
  border-radius: 6px;
  background: var(--lp-lime, #dbff65);
  color: var(--lp-ink, #15171b);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.5;
}

.home-path-note[hidden] {
  display: none;
}

.home-path-note.is-flash {
  animation: home-path-flash 600ms ease;
}

@keyframes home-path-flash {
  0% { transform: translateY(-2px); box-shadow: 0 0 0 4px rgba(219, 255, 101, 0.9); }
  100% { transform: none; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .home-path-note.is-flash { animation: none; }
  .home-path-node.is-next .home-path-node-mark { animation: none; }
}

.home-path-pro {
  min-height: 48px;
  margin: 0;
  padding: 0 16px;
  border: 2px solid var(--lp-ink, #15171b);
  border-radius: 6px;
  background: var(--lp-coral, #ff654a);
  color: var(--lp-ink, #15171b);
  box-shadow: 4px 4px 0 var(--lp-ink, #15171b);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 950;
  cursor: pointer;
}

.home-path-pro[hidden] {
  display: none;
}

/* ---------- the road ---------- */
.home-path-road {
  --road-x: 50%;
  position: relative;
  margin: 0;
  padding: 6px 0 18px;
  display: grid;
  gap: 6px;
  list-style: none;
}

.home-path-road::before {
  position: absolute;
  left: var(--road-x);
  top: 0;
  bottom: 0;
  width: 6px;
  margin-left: -3px;
  border-radius: 3px;
  background: repeating-linear-gradient(180deg, var(--lp-ink, #15171b) 0 14px, transparent 14px 24px);
  opacity: 0.28;
  content: "";
}

.home-path-banner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 4px;
  padding: 8px 12px;
  border: 2px solid var(--lp-ink, #15171b);
  border-radius: 6px;
  background: var(--lp-ink, #15171b);
  color: var(--lp-white, #fffdf8);
  box-shadow: 3px 3px 0 var(--lp-coral, #ff654a);
}

.home-path-banner-label {
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.home-path-banner-skip {
  flex: none;
  min-height: 28px;
  padding: 0 10px;
  border: 1.5px solid var(--lp-lime, #dbff65);
  border-radius: 999px;
  background: transparent;
  color: var(--lp-lime, #dbff65);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
}

.home-path-slot {
  position: relative;
  z-index: 1;
  display: flex;
}

.home-path-slot.is-left { justify-content: flex-start; padding-right: 38%; }
.home-path-slot.is-right { justify-content: flex-end; padding-left: 38%; }

.home-path-node {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 6px;
  border: 1.5px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--lp-ink, #15171b);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.home-path-slot.is-right .home-path-node {
  flex-direction: row-reverse;
  text-align: right;
}

.home-path-node:disabled {
  cursor: default;
}

.home-path-node.is-later,
.home-path-node.is-stage {
  opacity: 0.5;
}

.home-path-node-mark {
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 2.5px solid var(--lp-ink, #15171b);
  border-radius: 50%;
  background: var(--lp-paper, #f3efe5);
  font-size: 1.05rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.home-path-node.is-done .home-path-node-mark {
  background: var(--lp-ink, #15171b);
  color: var(--lp-lime, #dbff65);
}

.home-path-node.is-next .home-path-node-mark {
  background: var(--lp-coral, #ff654a);
  box-shadow: 4px 4px 0 var(--lp-ink, #15171b);
  animation: home-path-pulse 1.6s ease-in-out infinite;
}

@keyframes home-path-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.home-path-node.is-next {
  border-color: var(--lp-ink, #15171b);
  background: var(--lp-white, #fffdf8);
  box-shadow: 3px 3px 0 var(--lp-ink, #15171b);
}

.home-path-node.is-locked_today .home-path-node-mark {
  background: var(--lp-white, #fffdf8);
  font-size: 1.15rem;
}

.home-path-node.is-review .home-path-node-mark {
  border-style: dashed;
}

.home-path-node.is-stage .home-path-node-mark {
  border-style: dotted;
  background: transparent;
}

.home-path-node-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.home-path-node-goal {
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.home-path-node-label {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--lp-muted, #5e625f);
}

.home-path-node.is-next .home-path-node-label {
  color: var(--lp-coral-text, #a83224);
}

.home-path-node.is-next .home-path-node-label::after {
  content: " →";
}

.home-path-slot.is-right .home-path-node.is-next .home-path-node-label::after {
  content: "";
}

.home-path-slot.is-right .home-path-node.is-next .home-path-node-label::before {
  content: "← ";
}

/* The daily share button is moved to the end of the road by home-path.js. */
body.is-path-home .home-path #homeShareButton {
  margin-top: 4px;
}
