/* Grade-wide, static-first skill journeys. Visual path never owns navigation. */
.journey-map {
  --map-ink:#174364;--map-muted:#47647b;--map-surface:#ffffff;
  --map-rail:#3aa4ad;--map-accent:#137e9e;--map-highlight:#ffe19d;
  --map-cover:#146b91;--map-soft:#d6f8f3;
  color:var(--map-ink);min-height:80vh;padding:0 0 clamp(3rem,7vw,6rem);
  background:linear-gradient(180deg,#edfcfb 0%,#d9f2f9 30%,#f8fbf5 100%);
}
.journey-map.world-earth {
  --map-ink:#264d43;--map-muted:#516b62;--map-rail:#589568;
  --map-accent:#37684c;--map-highlight:#ffdfa2;--map-cover:#346d63;--map-soft:#e9f7df;
  background:linear-gradient(180deg,#f1fae5 0%,#d1efde 39%,#fffaf0 100%);
}
.journey-map.world-space {
  --map-ink:#f3f4ff;--map-muted:#c5cdec;--map-surface:#202d62;
  --map-rail:#7896dd;--map-accent:#7bead2;--map-highlight:#b8f1ff;
  --map-cover:#1b285e;--map-soft:#233574;
  background:radial-gradient(circle at 8% 13%,#2c3979 0%,transparent 30%),
    radial-gradient(circle at 94% 67%,#1d3a67 0%,transparent 35%),#0d1537;
}
/* Ocean group pages keep the painted sea of their board, pale behind the content (class comes from group-page-template). */
.journey-selection.world-ocean {--sea-wash:linear-gradient(180deg,rgb(237 252 251 / .88),rgb(217 242 249 / .82));background-size:cover;background-position:center top;background-repeat:no-repeat;}
.journey-selection.world-ocean.board-preschool {background-image:var(--sea-wash),url(/assets/boards/coral-cove.webp);}
.journey-selection.world-ocean.board-pre-k {background-image:var(--sea-wash),url(/assets/boards/turtle-lagoon.webp);}
.journey-selection.world-ocean.board-k {background-image:var(--sea-wash),url(/assets/boards/treasure-reef.webp);}
.map-content {width:min(calc(100% - 2rem),66rem);margin-inline:auto;}
.map-breadcrumbs {width:min(calc(100% - 2rem),66rem);padding-block:1rem;color:var(--map-muted);}
.map-breadcrumbs a {color:inherit;}
.journey-map.world-space .map-breadcrumbs {color:#d9ddff;}
.map-cover,.selection-cover {
  position:relative;isolation:isolate;overflow:hidden;
  border-radius:clamp(20px,4vw,36px);background:var(--map-cover);color:#fff;
  box-shadow:0 16px 33px rgb(12 36 70 / .13);
}
.map-cover {min-height:clamp(17.5rem,31vw,22rem);padding:clamp(1.55rem,4vw,3.4rem);}
.map-cover::after,.selection-cover::after {
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(90deg,var(--map-cover) 0%,rgb(18 90 122 / .9) 33%,transparent 100%);
}
.world-earth .map-cover::after,.world-earth .selection-cover::after {background:linear-gradient(90deg,#346d63 0%,rgb(52 109 99 / .95) 37%,transparent 100%);}
.world-space .map-cover::after,.world-space .selection-cover::after {background:linear-gradient(90deg,#1b285e 0%,rgb(27 40 94 / .94) 42%,transparent 100%);}
.map-cover-copy,.selection-cover-copy {position:relative;z-index:1;max-width:38rem;}
.map-eyebrow {font-size:clamp(.78rem,1.7vw,.92rem);letter-spacing:.11em;text-transform:uppercase;font-weight:900;margin:0 0 .75rem;opacity:.94;}
.map-cover h1,.selection-cover h1 {font-size:clamp(2.2rem,6vw,4.25rem);letter-spacing:-.035em;line-height:1.07;max-width:14ch;}
.map-cover h1 span {display:block;font-size:.77em;color:#ffdfa0;}
.world-earth .map-cover h1 span {color:#ffe3a7;}
.world-space .map-cover h1 span {color:#b7f7ee;}
.map-lead {font-size:clamp(.98rem,2vw,1.18rem);font-weight:800;margin:1rem 0 1.25rem;max-width:30rem;}
.map-back {
  display:inline-flex;align-items:center;min-height:44px;padding:.45rem .95rem;
  border-radius:100px;border:1.5px solid rgb(255 255 255 / .65);
  color:#fff;text-decoration:none;font-weight:800;background:rgb(0 0 0 / .13);
}
.map-back:hover,.map-back:focus-visible {background:rgb(255 255 255 / .17);}
.map-cover-art {position:absolute;z-index:-2;inset:0 0 0 auto;width:58%;pointer-events:none;overflow:hidden;}
.map-cover-art img {display:block;width:100%;height:100%;object-fit:cover;object-position:center;}
.topic-jumps {margin:clamp(1.5rem,4vw,2.25rem) 0 2.4rem;}
.topic-jumps-label {display:block;font-size:.9rem;font-weight:900;letter-spacing:.04em;margin-bottom:.65rem;}
.topic-jump-links {display:flex;gap:.65rem;flex-wrap:wrap;}
.topic-jump-links a {
  display:inline-flex;align-items:center;min-height:44px;
  padding:.45rem .95rem;border-radius:100px;text-decoration:none;
  background:var(--map-surface);color:var(--map-ink);
  border:1px solid rgb(64 120 149 / .18);box-shadow:0 4px 10px rgb(9 43 70 / .06);
  font-weight:800;font-size:.94rem;
}
.topic-jump-links a:hover,.topic-jump-links a:focus-visible {text-decoration:underline;border-color:var(--map-accent);}
.world-space .topic-jump-links a {border-color:rgb(139 169 250 / .35);}
.journey-trail {position:relative;padding:1rem 0 .4rem;}
.journey-trail::before {
  content:"";position:absolute;z-index:0;top:1rem;bottom:0;left:32px;
  width:0;border-left:5px dashed var(--map-rail);opacity:.68;
  border-radius:50%;pointer-events:none;
}
.map-chapter {position:relative;margin:0 0 2.5rem;}
.chapter-heading {
  position:relative;z-index:1;max-width:30rem;margin:0 auto 1.8rem;
  padding:.85rem 1.3rem;text-align:center;border-radius:24px;
  background:var(--map-soft);border:2px solid rgb(255 255 255 / .65);
  box-shadow:0 7px 17px rgb(20 50 90 / .1);
}
.world-space .chapter-heading {border-color:rgb(149 185 255 / .3);}
.chapter-mark {display:inline-block;font-size:.78rem;font-weight:900;letter-spacing:.12em;text-transform:uppercase;opacity:.75;margin-bottom:.2rem;}
.chapter-heading h2 {font-size:clamp(1.35rem,3vw,1.85rem);}
.map-route {display:block;list-style:none;padding:0;margin:0;}
.map-node {position:relative;min-width:0;width:calc(100% - 76px);margin:0 0 1.25rem 76px;}
.map-node::before {content:"";position:absolute;top:2rem;left:-43px;width:43px;border-top:4px dotted var(--map-rail);opacity:.85;pointer-events:none;}
.map-step {
  display:grid;place-items:center;position:absolute;z-index:2;
  top:1.05rem;left:-63px;width:42px;height:42px;border-radius:50%;
  background:var(--map-highlight);border:3px solid var(--map-rail);color:#203d60;
  font:900 1rem/1 var(--font-display);box-shadow:0 3px 0 rgb(15 54 83 / .13);
}
.map-node-link {
  display:flex;align-items:center;flex-wrap:wrap;gap:.5rem .85rem;
  position:relative;min-height:99px;padding:1rem 1.15rem;
  background:var(--map-surface);color:var(--map-ink);text-decoration:none;
  border:2px solid transparent;border-radius:22px;
  box-shadow:0 11px 21px rgb(17 69 94 / .1);
}
.map-node-link:focus-visible {outline:4px solid var(--map-accent);outline-offset:4px;}
.map-node-link:hover {border-color:var(--map-rail);}
.map-node-main {display:flex;flex:1 1 12rem;flex-direction:column;gap:.2rem;min-width:0;}
.map-node-title {font:700 clamp(1.03rem,2.2vw,1.24rem)/1.24 var(--font-display);}
.map-node-count {font-size:.84rem;color:var(--map-muted);font-weight:800;}
.map-status {
  display:inline-flex;align-items:center;justify-content:center;min-height:29px;
  padding:.23rem .65rem;border-radius:100px;font-size:.77rem;font-weight:900;
  background:var(--map-soft);color:var(--map-ink);
}
.map-status.is-ready {background:#e3f7c8;color:#275a35;}
.world-space .map-status.is-ready {background:#2e5758;color:#dcffea;}
.map-node-arrow {display:grid;place-items:center;margin-left:auto;width:2rem;height:2rem;border-radius:50%;background:var(--map-soft);font-weight:900;flex:none;}
.journey-finish {position:relative;z-index:2;display:grid;place-items:center;margin:0 auto;width:3.25rem;height:3.25rem;border-radius:50%;background:var(--map-highlight);color:#275476;border:3px solid var(--map-rail);font-size:1.7rem;}
.journey-end {padding:1.6rem 1rem;text-align:center;font-weight:800;}
.journey-end a {display:inline-flex;min-height:44px;align-items:center;color:var(--map-ink);padding:.4rem;}
/* Separate group selection view */
.selection-cover {min-height:16rem;padding:clamp(1.45rem,4vw,2.6rem);}
.selection-cover h1 {font-size:clamp(2rem,5vw,3.4rem);max-width:20ch;}
.selection-cover .map-back {margin:.35rem 0 1.5rem;}
.selection-chapter {font-size:.94rem;font-weight:900;letter-spacing:.02em;opacity:.9;margin-bottom:.45rem;}
.selection-body {padding:2rem 0 1rem;}
.selection-topline {display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:.6rem;margin-bottom:1.2rem;}
.selection-topline h2 {font-size:clamp(1.55rem,3vw,2.1rem);}
.selection-topline span {font-size:.85rem;font-weight:800;color:var(--map-muted);}
.journey-items {display:grid;grid-template-columns:1fr;gap:1rem;list-style:none;padding:0;margin:0;}
.journey-item {min-width:0;padding:1.25rem;background:var(--map-surface);border-radius:20px;border:2px solid rgb(100 151 172 / .17);box-shadow:0 9px 20px rgb(16 50 90 / .08);}
.world-space .journey-item {border-color:rgb(147 177 250 / .29);}
.journey-item.is-soon {opacity:.85;}
.journey-item-heading {display:flex;gap:.75rem;align-items:flex-start;}
.journey-item-index {flex:none;display:grid;place-items:center;border-radius:12px;width:2.15rem;height:2.15rem;background:var(--map-soft);color:var(--map-ink);font-size:.9rem;font-weight:900;}
.journey-item h3 {font-size:clamp(1rem,2.5vw,1.23rem);padding-top:.25rem;}
.journey-item-state {font-size:.83rem;font-weight:900;margin:.75rem 0 0;color:var(--map-muted);}
.journey-item.is-ready .journey-item-state {color:var(--map-accent);}
.journey-item-actions {display:flex;flex-wrap:wrap;gap:.55rem;margin-top:1rem;}
.journey-item-actions a {
  display:inline-flex;align-items:center;justify-content:center;min-height:44px;
  padding:.55rem .9rem;border-radius:13px;font-size:.86rem;font-weight:900;text-decoration:none;
}
.journey-play {gap:.45rem;background:var(--map-highlight);color:#173b53;}
.journey-download {border:1.5px solid var(--map-rail);color:var(--map-ink);}
.journey-item-actions a:hover,.journey-item-actions a:focus-visible {outline:3px solid var(--map-accent);outline-offset:2px;}
.map-return-bottom {display:inline-flex;align-items:center;min-height:44px;margin-top:1.75rem;padding:.55rem 0;color:var(--map-ink);font-weight:900;}
/* Optional, local-only progress overlays. Static routes and CTAs never depend on them. */
.map-status.is-practiced {background:#fae4b9;color:#754719;}
.map-status.is-completed {background:#d9f5d4;color:#275b38;}
.world-space .map-status.is-practiced {background:#675634;color:#ffe9a9;}
.world-space .map-status.is-completed {background:#234e4b;color:#d5fff2;}
.map-node.is-next .map-node-link,.journey-item.is-next {border-color:var(--map-rail);box-shadow:0 9px 24px rgb(14 80 101 / .18);}
.journey-item.is-earned {border-color:#7bb69a;}
.world-space .journey-item.is-earned {border-color:#7bead2;}
.journey-next-hint {
  display:inline-flex;align-items:center;width:max-content;margin-top:.35rem;
  padding:.22rem .55rem;border-radius:100px;background:var(--map-highlight);
  color:#23415a;font-size:.76rem;font-weight:900;
}
.journey-item.is-practiced .journey-item-state,.journey-item.is-earned .journey-item-state {color:var(--map-accent);}
/* Every node and route remains visible without JS. */
@media (min-width:768px) {
  .journey-trail::before {left:50%;}
  .map-node {width:calc(50% - 3.15rem);margin:0 0 1.65rem;}
  .map-node:nth-child(even) {margin-left:auto;}
  .map-node::before {left:100%;width:3.15rem;top:2rem;}
  .map-node:nth-child(even)::before {left:-3.15rem;}
  .map-step {left:calc(100% + 1.9rem);top:1rem;}
  .map-node:nth-child(even) .map-step {left:-4.4rem;}
  .journey-items {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:600px) {
  .map-cover-art,.selection-cover .map-cover-art {width:100%;opacity:.4;}
  .map-cover::after,.selection-cover::after {background:linear-gradient(90deg,var(--map-cover),rgb(20 82 118 / .72));}
  .world-earth .map-cover::after,.world-earth .selection-cover::after {background:linear-gradient(90deg,#346d63,rgb(52 109 99 / .77));}
  .world-space .map-cover::after,.world-space .selection-cover::after {background:linear-gradient(90deg,#1b285e,rgb(27 40 94 / .7));}
  .map-node-link {padding:.85rem;gap:.4rem;}
  .map-node-main {flex-basis:calc(100% - 2.8rem);}
  .map-status {order:3;}
  .map-node-arrow {order:2;}
  .chapter-heading {margin-left:61px;text-align:left;border-radius:17px;padding:.75rem 1rem;}
  .map-cover h1 {font-size:clamp(2rem,9vw,3rem);}
}
@media (max-width:359px) {
  .journey-map {font-size:1rem;}
  .map-content,.map-breadcrumbs {width:calc(100% - 1.25rem);}
  .map-cover,.selection-cover {padding:1.15rem;}
  .map-node-link {border-radius:17px;}
  .topic-jump-links a {font-size:.88rem;}
  .journey-item-actions a {padding:.5rem .7rem;}
}
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .map-node-link,.journey-item-actions a {transition:transform .18s ease,box-shadow .18s ease;}
  .map-node-link:hover {transform:translateY(-3px);box-shadow:0 14px 22px rgb(16 58 97 / .18);}
  .map-cover-art img {animation:journey-art-drift 10s ease-in-out infinite alternate;}
}
@keyframes journey-art-drift {from{transform:translateX(-.5rem) scale(1.02);}to{transform:translateX(.5rem) scale(1.05);}}
@media (prefers-reduced-motion:reduce) {
  .journey-map *, .journey-map *::before, .journey-map *::after {animation:none!important;transition:none!important;scroll-behavior:auto!important;}
}
