/* Day maps and the journey overview map on the self-drive pages. Site tokens only (so the sun theme and the light setting carry over).
   Lines and markers are drawn on the map, never on a photograph. */
.legmap,.legover{margin:var(--sp-24) 0 var(--sp-32);--k:.0143}
.lm{display:block;width:100%;height:auto;max-height:min(64vh,600px);margin:0 auto;background:var(--ground,var(--midnight));border:1px solid var(--rule);touch-action:manipulation}
.lm .land{fill:color-mix(in srgb,var(--cream) 9%,var(--ground,var(--midnight)));stroke:color-mix(in srgb,var(--cream) 34%,transparent);stroke-width:1px;stroke-linejoin:round}
.lm .road0{fill:none;stroke:color-mix(in srgb,var(--cream) 24%,transparent);stroke-width:calc(var(--k)*2px);stroke-linecap:round;stroke-linejoin:round}
.lm .leg,.lm .dl{fill:none;stroke:var(--gold-light);stroke-width:calc(var(--k)*3.4px);stroke-linecap:round;stroke-linejoin:round}
.lm .dl{stroke-width:calc(var(--k)*3px)}

/* markers: drawn in screen pixels (the group is scaled by --k), with a hit area of 46 px across */
.lm .mk{outline:none;cursor:pointer}
.lm .hit{fill:transparent;pointer-events:all}
.lm .dot{fill:var(--gold-light);stroke:var(--ground,var(--midnight));stroke-width:2px}
.lm .pass .dot{fill:var(--cream)}
.lm .start .dot{fill:var(--ground,var(--midnight));stroke:var(--gold-light);stroke-width:3px}
.lm .end .dot{fill:var(--cream);stroke:var(--gold-light);stroke-width:2px}
.lm .ring{fill:none;stroke:var(--cream);stroke-width:2px;opacity:0;transition:opacity .2s}
.lm .sel .ring,.lm .mk:hover .ring{opacity:.7}
.lm .sel .ring{opacity:1}
.lm .mk:focus-visible .ring{opacity:1;stroke:var(--gold-light);stroke-width:3px}
.lm .lab{display:none;font:500 13px var(--font-text);fill:var(--cream);paint-order:stroke;stroke:var(--ground,var(--midnight));stroke-width:4px;stroke-linejoin:round;pointer-events:none}
.lm .sel .lab{display:block}
.lm .st circle{fill:none;stroke:var(--cream);stroke-width:2px}
.lm .nt rect{fill:var(--ground,var(--midnight));stroke:var(--gold-light);stroke-width:2px}
.lm .nt text{font:500 12px var(--font-text);fill:var(--cream);text-anchor:middle;dominant-baseline:central;pointer-events:none}
.lm .nt a{outline:none;cursor:pointer}
.lm .nt a:hover rect,.lm .nt a:focus-visible rect{fill:var(--gold-light)}
.lm .nt a:hover text,.lm .nt a:focus-visible text{fill:var(--ground,var(--midnight))}
.lm .nt a:focus-visible rect{stroke:var(--cream);stroke-width:3px}

.lm-cap{margin-top:var(--sp-8);font-size:var(--text-14);line-height:1.5;color:var(--muted)}

/* the panel under a day map */
.lm-panel{margin-top:var(--sp-16);padding:var(--sp-16) var(--sp-24);border:1px solid var(--rule);border-left:2px solid var(--gold)}
.lm-head{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-16)}
.day .lm-panel h4.lm-h{margin:0 0 var(--sp-8);color:var(--gold-light)}
.lm-list{list-style:none;margin:0;padding:0}
.lm-list li{max-width:none;margin:0;padding:var(--sp-8) 0;border-top:1px solid var(--rule)}
.lm-list li:first-child{border-top:0}
.lm-list h5{margin:0 0 .3em;font-family:var(--font-display);font-weight:500;font-size:clamp(20px,2vw,24px);line-height:1.2;color:var(--cream)}
.lm-list p{margin:0 0 .8em;font-size:var(--text-15);line-height:1.65;max-width:62ch}
.lm-role{display:inline-block;margin-left:.5em;font-family:var(--font-text);font-weight:400;font-size:var(--text-13);letter-spacing:.04em;color:var(--gold-light)}
.lm-hint{margin:0;color:var(--muted);font-size:var(--text-15)}
.lm-replay{flex:none;min-height:44px;padding:0 var(--sp-16);background:transparent;color:var(--gold-light);border:0;font:400 var(--text-14)/1 var(--font-text);letter-spacing:.04em;cursor:pointer}
.lm-replay:hover{color:var(--cream)}
.lm-replay[hidden]{display:none}
.legmap.lm-js .lm-panel{min-height:11.5em}

/* the overview legend */
.lm-days{list-style:none;margin:var(--sp-16) 0 0;padding:0;columns:2;column-gap:var(--sp-32);font-size:var(--text-14);line-height:1.45}
.lm-days li{break-inside:avoid;margin:0;padding:3px 0;max-width:none}
.lm-days b{display:inline-block;min-width:1.6em;font-weight:500;color:var(--gold-light)}
.lm-days a{color:var(--cream-dim);text-decoration:none}
.lm-days a:hover{color:var(--cream);text-decoration:underline}
@media(max-width:700px){.lm-days{columns:1}.lm-panel{padding:var(--sp-12) var(--sp-16)}}

/* motion: only with scripts, and never when the visitor asks for less (the system setting or the Pause switch, class "still" on the page) */
@media (prefers-reduced-motion:no-preference){
  .js:not(.still) .legmap:not(.lm-done) .leg{stroke-dasharray:1;stroke-dashoffset:1}
  .js:not(.still) .legmap:not(.lm-done) .wp{opacity:0;pointer-events:none}
  .js:not(.still) .legmap:not(.lm-done) .wp.on{opacity:1;pointer-events:auto}
  .js:not(.still) .legmap .wp{transition:opacity .5s ease}
  .js:not(.still) .legover .dl{stroke-dasharray:1;stroke-dashoffset:1}
  .js:not(.still) .legover .nt,.js:not(.still) .legover .st{opacity:0}
  .js:not(.still) .legover.in .dl{stroke-dashoffset:0;transition:stroke-dashoffset var(--step,.8s) cubic-bezier(.4,0,.2,1) calc(.3s + var(--i)*var(--step,.8s))}
  .js:not(.still) .legover.in .nt{opacity:1;transition:opacity .5s ease calc(.3s + (var(--i) + 1)*var(--step,.8s) - .2s)}
  .js:not(.still) .legover.in .st{opacity:1;transition:opacity .5s ease .1s}
}

/* the detail of a day map: the real coast and quiet land detail from open data (OpenStreetMap, Copernicus elevation), in the house palette. Nothing here is loud: it sits under the road. */
.lm .land{vector-effect:non-scaling-stroke}
.lm .shade{pointer-events:none;opacity:.9}
.lm .gl{fill:color-mix(in srgb,#cfe3f2 16%,transparent);stroke:none}
.lm .lk{fill:var(--ground,var(--midnight));stroke:color-mix(in srgb,var(--cream) 22%,transparent);stroke-width:.8px;vector-effect:non-scaling-stroke}
.lm .rv{fill:none;stroke:color-mix(in srgb,#8fb4d2 38%,transparent);stroke-width:1px;vector-effect:non-scaling-stroke;stroke-linecap:round}
.lm .tw{fill:color-mix(in srgb,#e9c48a 15%,transparent);stroke:none}
.lm .fy{fill:none;stroke:color-mix(in srgb,var(--cream) 34%,transparent);stroke-width:1.2px;stroke-dasharray:5 5;vector-effect:non-scaling-stroke}
.lm .pn text{font:400 12.5px var(--font-text);letter-spacing:.02em;fill:color-mix(in srgb,var(--cream) 62%,transparent);paint-order:stroke;stroke:var(--ground,var(--midnight));stroke-width:3.5px;stroke-linejoin:round;pointer-events:none}
.lm .pn.wn text{font-style:italic;fill:color-mix(in srgb,#9ec2de 58%,transparent)}
.lm-credit{margin:var(--sp-4,4px) 0 0;font-size:11.5px;line-height:1.45;color:var(--muted);opacity:.85;max-width:62ch}
.lm .sb path{fill:none;stroke:color-mix(in srgb,var(--cream) 70%,transparent);stroke-linecap:square}
.lm .sb text{fill:color-mix(in srgb,var(--cream) 78%,transparent);font:12px var(--font-text);text-anchor:start;paint-order:stroke;stroke:var(--ground,var(--midnight));stroke-width:3px}
