/* Section map: dashed outlines, hover label, key. Only active when <html> has .map-on. */
:root{
  --map-same:#2F6FD1;
  --map-yours:#9B084F;
  --map-shared-job:#B7791F;
}
[data-map="same"]{--map-c:var(--map-same);--map-t:#1F55A8}
[data-map="yours"]{--map-c:var(--map-yours);--map-t:#9B084F}
[data-map="shared-job"]{--map-c:var(--map-shared-job);--map-t:#85570F}
[data-map-g="same"]{--map-c:var(--map-same)}
[data-map-g="yours"]{--map-c:var(--map-yours)}
[data-map-g="shared-job"]{--map-c:var(--map-shared-job)}
/* on the dark green band the blue needs to be lighter to read */
.row.minted[data-map="same"]{--map-c:#9CC0F5}

/* outline: a pseudo-element laid over the section, so nothing moves */
.map-on [data-map]{position:relative}
.map-on [data-map]::before{
  content:"";position:absolute;inset:0;z-index:4;pointer-events:none;
  border:2px dashed var(--map-c);
  transition:background-color .12s ease;
}
.map-on [data-map]:hover::before,
.map-on [data-map]:focus::before,
.map-on [data-map]:focus-within::before{
  background:color-mix(in srgb,var(--map-c) 4%,transparent);
}
.map-on [data-map]:focus{outline:none}
.map-on [data-map]:focus-visible::before{border-style:solid}

/* hover label */
.map-chip{
  display:none;position:absolute;z-index:6;top:4px;left:4px;
  max-width:min(620px,calc(100% - 8px));
  padding:3px 10px 3px 8px;border-radius:999px;
  background:#fff;border:1px solid var(--map-c);
  font:500 12px/1.45 "Onest",system-ui,sans-serif;color:#1C1E2A;
  box-shadow:0 2px 8px rgba(28,30,42,.12);
  pointer-events:none;opacity:0;transition:opacity .12s ease;
}
.map-on .map-chip{display:block}
.map-chip b{font-weight:700;color:var(--map-t)}
.map-chip b::before{content:"";display:inline-block;width:8px;height:8px;margin-right:6px;border-radius:50%;background:var(--map-c);vertical-align:0}
.map-chip span{color:#4A4F5C}
.map-chip span::before{content:" \00b7  "}
.row.minted .map-chip{border-color:#9CC0F5}
.map-on [data-map]:hover > .map-chip,
.map-on [data-map]:focus > .map-chip,
.map-on [data-map]:focus-within > .map-chip{opacity:1}

/* touch screens have no hover: name chip always shown, the line appears on tap */
@media (hover:none){
  .map-on .map-chip{opacity:1}
  .map-on .map-chip span{display:none}
  .map-on [data-map]:focus > .map-chip span,
  .map-on [data-map]:focus-within > .map-chip span{display:inline}
}
@media (max-width:700px){
  .map-chip{font-size:11px;top:3px;left:3px}
}

/* key */
.map-key{display:none;font-family:"Onest",system-ui,sans-serif;color:#1C1E2A}
.map-on .map-key{display:block}
.map-key ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:10px 32px}
.map-key li{display:flex;align-items:flex-start;gap:10px;flex:1 1 280px;max-width:420px;font-size:13px;line-height:1.5;color:#4A4F5C}
.map-key li i{flex:none;width:22px;height:16px;margin-top:3px;border:2px dashed var(--map-c);border-radius:3px;background:color-mix(in srgb,var(--map-c) 8%,#fff)}
.map-key li b{display:block;font-weight:700;color:#1C1E2A;font-size:13px}
.map-key--band{background:#fff;border-bottom:1px solid #EFEFEF;padding:16px 0}
.map-key--band .map-key-in{width:1200px;max-width:calc(100% - 48px);margin:0 auto}
/* the Design notes control is fixed top left (16px in, about 182px wide), so the key starts clear of it */
@media (min-width:701px){.map-key--band .map-key-in{padding-left:max(0px,calc(214px - max(24px,(100vw - 1200px)/2)))}}
@media (max-width:900px){
  .map-key--band .map-key-in{width:auto;max-width:none;padding:0 20px}
  .map-key ul{flex-direction:column}
  .map-key li{flex-basis:auto;max-width:none}
}
@media (min-width:701px) and (max-width:900px){
  .map-key--band .map-key-in{padding-left:214px}
}
@media (prefers-reduced-motion:reduce){
  .map-chip,.map-on [data-map]::before{transition:none}
}
@media print{.map-chip,.map-key{display:none!important}.map-on [data-map]::before{display:none}}
