/* The paper aeroplane pointer, its faint trail and the sound pill. Shared by the map and the report pages. */

/* ---------- paper aeroplane pointer ---------- */
/* a real browser cursor, so it moves exactly like the normal one; its nose (3,3) is the click point. Text boxes keep their text cursor.
   Each rule is written twice: a browser without image-set() uses the first. */
html,.world__map path,.turn:disabled{cursor:url(../img/pointer.png) 3 3,auto!important}
html,.world__map path,.turn:disabled{cursor:image-set(url(../img/pointer.png) 1x,url(../img/pointer@2x.png) 2x) 3 3,auto!important}
a,button:not(:disabled),label,summary,[role=button],[data-close],.pg,.world__map path[data-report]{cursor:url(../img/pointer-link.png) 3 3,pointer!important}
a,button:not(:disabled),label,summary,[role=button],[data-close],.pg,.world__map path[data-report]{cursor:image-set(url(../img/pointer-link.png) 1x,url(../img/pointer-link@2x.png) 2x) 3 3,pointer!important}
.contrail{position:fixed;inset:0;width:100%;height:100%;z-index:9998;pointer-events:none}

/* ---------- sound pill ---------- */
.sound{--h:36px;position:fixed;right:var(--g);bottom:24px;z-index:65;box-shadow:0 14px 30px -8px rgba(0,0,0,.85);display:inline-flex;align-items:center;gap:10px;height:var(--h);padding:0 16px 0 14px;border-radius:999px;border:1px solid rgba(247,242,234,.18);background:#171110;color:#F7F2EA;font:600 11px/1 "Archivo",system-ui,sans-serif;letter-spacing:.14em;text-transform:uppercase;white-space:nowrap;cursor:pointer;transition:border-color .3s,background .3s,bottom .5s cubic-bezier(.22,1,.36,1)}
.sound:hover{background:#2c2423;border-color:rgba(247,242,234,.36)}
.sound__dot{position:relative;flex:none;width:8px;height:8px;border-radius:50%;box-shadow:inset 0 0 0 1.5px rgba(247,242,234,.6)}
.sound[aria-checked=true]{border-color:rgba(255,49,49,.6)}
.sound[aria-checked=true] .sound__dot{background:#FF3131;box-shadow:none}
.sound[aria-checked=true] .sound__dot::after{content:"";position:absolute;inset:0;border-radius:50%;border:1.5px solid #FF3131;animation:sound 2s cubic-bezier(.22,1,.36,1) infinite}
@keyframes sound{from{scale:1;opacity:.9}to{scale:2.8;opacity:0}}

/* on the map the pill sits in the sea: right of Australia, just under New Caledonia, and never on the video banner.
   The home view (homeBox in site.js) spans the window's width and is centred on its height, so these places hold at any size:
   New Caledonia ends 12vw below the middle, and the sea right of Australia is the last 6.6vw. Change homeBox and these change too.
   On narrower windows the pill is wider than that strip, so it keeps 10px from the edge and overlaps the coast a little. */
@media (min-width:901px){
 .has-reel:not(.reading) .sound{--h:32px;--w:108px;width:var(--w);padding:0;justify-content:center;gap:8px;font-size:10px;letter-spacing:.08em;
  right:max(10px,calc((6.6vw - var(--w)) / 2));
  bottom:max(calc(clamp(176px,min(13vw,24vh),264px) * .5625 + 32px),calc(50vh - 12vw - 10px - var(--h)))}
}
@media (max-width:900px){
 .sound{--h:44px}
 /* on a phone it would hide a whole tile, so it sits just above the banner, across from "Market reads" */
 .has-reel .index__h{display:flex;align-items:center;gap:.5em;min-height:44px}
 .has-reel .sound{bottom:calc(156px * .5625 + 20px + env(safe-area-inset-bottom,0px))}
 .has-reel.reading .sound{bottom:18px}
 /* with a report open the page dots need the room, so only the dot stays */
 .has-reel.reading .sound{width:44px;padding:0;justify-content:center}
 .has-reel.reading .sound__txt{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
}
@media (prefers-reduced-motion:reduce){
 .sound,.sound *,.sound *::after{animation:none!important;transition:none!important}
}

/* phones: no sound pill over a report unless the music is already playing, and then clear of the page arrows */
@media (max-width:900px){
 body.reading .sound[aria-checked=false],body:not(.has-reel) .sound[aria-checked=false]{display:none}
 .has-reel.reading .sound{bottom:86px}
}
