/* "What should I do next?" concept. Uses the site's own tokens (style.css). */
.nx { min-height: calc(100vh - 66px); min-height: calc(100svh - 66px); padding: clamp(22px, 5vh, 56px) 0 90px; }
.nx [hidden] { display: none !important; }

/* the sentence you fill in: it's the question, the progress and the plan's heading */
.nx-say { margin: 0; font: 900 clamp(38px, 6.6vw, 88px)/1.04 var(--cond); font-stretch: 68%; text-transform: uppercase; letter-spacing: .005em; max-width: 20ch; }
.nx-nw { white-space: nowrap; }
.nx-b { font: inherit; font-stretch: inherit; letter-spacing: inherit; text-transform: inherit; line-height: .98; border: 0; border-radius: 0; cursor: pointer; padding: .05em .16em 0; margin: 0 .02em; text-align: left; transform: rotate(-1.2deg); background: var(--lime); color: var(--ink); }
.nx-b:nth-of-type(even) { transform: rotate(.9deg); }
.nx-b.open { background: none; color: var(--mute); box-shadow: inset 0 -.09em 0 var(--mute); transform: none; min-width: 2.4em; cursor: default; }
.nx-b.open.now { color: var(--lime); box-shadow: inset 0 -.09em 0 var(--lime); }
.nx-b.slap { animation: nx-slap .34s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes nx-slap { from { transform: scale(1.35) rotate(-7deg); opacity: 0; } }
.nx-say.small { font-size: clamp(27px, 3.6vw, 48px); max-width: 34ch; }

.nx-ask { margin-top: clamp(22px, 4.5vh, 44px); animation: nx-in .3s cubic-bezier(.2,.8,.2,1) both; }
@keyframes nx-in { from { opacity: 0; transform: translateY(14px); } }
.nx-hint { margin: 14px 0 0; color: var(--mute); font-size: 16px; }

/* chapters: what you've played lights up, what's ahead stays dark */
.nx-ch { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; max-width: 760px; }
.nx-ch button { position: relative; min-height: clamp(84px, 17vw, 170px); border: 0; border-radius: var(--radius); background: var(--ink-3); color: var(--text); font: 900 clamp(48px, 9.4vw, 112px)/1 var(--cond); font-stretch: 68%; cursor: pointer; transition: background .16s, color .16s; padding: .06em 0 0; }
.nx-ch button.lit { background: var(--lime); color: var(--ink); }
.nx-done { margin-top: 8px; width: 100%; max-width: 760px; min-height: 54px; border: 0; border-radius: var(--radius); background: var(--ink-3); color: var(--text); font: 800 18px/1 var(--cond); cursor: pointer; }
.nx-done:hover { background: var(--paper); color: var(--paper-ink); }

.nx-goals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.nx-goal { position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; padding: 0; cursor: pointer; background: var(--ink-3); color: var(--text); text-align: left; }
.nx-goal img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.nx-goal::after { content: ""; position: absolute; inset: 35% 0 0; z-index: -1; background: linear-gradient(0deg, rgba(13,13,12,.92), rgba(13,13,12,0)); }
.nx-goal b { position: absolute; left: 16px; right: 12px; bottom: 11px; font: 900 clamp(22px, 2.7vw, 36px)/.95 var(--cond); font-stretch: 68%; text-transform: uppercase; }
.nx-goal:hover img { transform: scale(1.05); }
.nx-goal:hover, .nx-goal:focus-visible { outline: 3px solid var(--lime); outline-offset: 0; }

.nx-list { display: grid; gap: 8px; max-width: 760px; }
.nx-list button { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; min-height: 72px; padding: 18px 20px 14px; border: 0; border-radius: var(--radius); background: var(--ink-3); color: var(--text); cursor: pointer; text-align: left; font: 900 clamp(24px, 3.4vw, 38px)/1 var(--cond); font-stretch: 68%; text-transform: uppercase; }
.nx-list button span { font: 500 16px/1.2 var(--cond); text-transform: none; color: var(--mute); flex: none; }
.nx-list button:hover, .nx-list button:focus-visible { background: var(--lime); color: var(--ink); }
.nx-list button:hover span, .nx-list button:focus-visible span { color: var(--ink); }

/* the plan */
.nx-plan { display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr); grid-template-areas: "first map" "rest map"; grid-template-rows: auto 1fr; gap: 18px 28px; margin-top: 30px; align-items: start; }
.nx-plan.nomap { grid-template-columns: minmax(0, 820px); grid-template-areas: "first" "rest"; }
.nx-first { scroll-margin-top: 84px; grid-area: first; background: var(--ink-2); border-radius: 10px; overflow: hidden; }
.nx-first.in { animation: nx-in .36s cubic-bezier(.2,.8,.2,1) both; }
.nx-pic { position: relative; aspect-ratio: 16 / 8; background: var(--ink-3); }
.nx-pic img { width: 100%; height: 100%; object-fit: cover; }
.nx-big { position: absolute; left: 0; bottom: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; max-width: 100%; padding: 13px 20px 0 22px; background: var(--ink-2); border-radius: 0 10px 0 0; }
.nx-big b { font: 900 clamp(44px, 6vw, 76px)/.86 var(--cond); font-stretch: 68%; color: var(--lime); font-variant-numeric: tabular-nums; }
.nx-big span { font-size: 17px; font-weight: 700; }
.nx-body { padding: 14px 22px 20px; }
.nx-body h2 { font-size: clamp(30px, 3.6vw, 46px); text-wrap: balance; }
.nx-why { margin: 10px 0 0; font-size: 18px; line-height: 1.45; max-width: 56ch; }
.nx-codes { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.nx-codes li { background: var(--paper); color: var(--paper-ink); border-radius: var(--radius); padding: 9px 14px 6px; }
.nx-codes small { display: block; font-size: 13px; font-weight: 600; color: #4a4840; line-height: 1.1; }
.nx-codes b { font: 900 30px/1 var(--cond); font-stretch: 75%; letter-spacing: .05em; }
.nx-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.nx-acts .btn { min-height: 50px; cursor: pointer; font-family: var(--cond); }
.nx-mini { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 10px; }
.nx-link { border: 0; background: none; color: var(--text); font: 700 16px/1 var(--cond); padding: 14px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--mute); }
.nx-link:hover { color: var(--lime); }
.nx-src { margin: 8px 0 0; font-size: 14px; color: var(--mute); }

.nx-rest { grid-area: rest; }
.nx-rest h3 { font-size: 24px; margin: 8px 0 6px; }
.nx-rest ol { list-style: none; margin: 0; padding: 0; }
.nx-rest li + li { border-top: 1px solid var(--line); }
.nx-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 10px 4px; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; font: 700 18px/1.2 var(--cond); }
.nx-row i { font: 900 15px/30px var(--cond); width: 30px; height: 30px; border-radius: 50%; text-align: center; background: var(--ink-3); color: var(--text); }
.nx-row em { font: 900 24px/1 var(--cond); font-stretch: 68%; color: var(--lime); white-space: nowrap; }
.nx-row:hover { color: var(--lime); }
.nx-ticked .nx-row { color: var(--mute); text-decoration: line-through; min-height: 48px; }
.nx-ticked .nx-row i { background: var(--lime); color: var(--ink); text-decoration: none; }
.nx-foot { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 0 22px; }

.nx-map { grid-area: map; position: sticky; top: 84px; }
.nx-mapbox { height: min(66vh, 620px); border-radius: 10px; overflow: hidden; background: #2f90af; z-index: 0; }
.nx-mapbox .leaflet-control-attribution { font-size: 10px; background: rgba(13,13,12,.7); color: #cfccc2; }
.nx-mapbox .leaflet-control-attribution a { color: #cfccc2; }
.nx-pin { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--paper); color: var(--ink); font: 900 17px/1 var(--cond); box-shadow: 0 0 0 3px rgba(13,13,12,.75); }
.nx-pin.on { background: var(--lime); width: 42px; height: 42px; margin: -5px 0 0 -5px; font-size: 22px; }

.nx-answer { margin-top: 30px; max-width: 820px; }
.nx-answer .nx-body h2 { font-size: clamp(32px, 4.4vw, 54px); }
.nx-end { padding: 34px 24px; }
.nx-end h2 { font-size: clamp(36px, 5vw, 64px); }

/* menu, homepage, guides and the button that stays on screen */
.nav a.nx-nav, .nav a.nx-nav:hover { background: var(--lime); color: var(--ink); padding: 7px 12px 5px; border: 0; border-radius: var(--radius); font-weight: 900; }
.nav a.nx-nav:hover { background: #d8ff63; }
.nav { align-items: center; }
.nx-home { margin: 0 0 22px; max-width: 660px; animation: h3-up .8s .26s cubic-bezier(.2,.8,.2,1) both; }
.nx-home p, .nx-card p, .nx-inline p { margin: 0 0 12px; font-size: 18px; font-weight: 700; line-height: 1.3; }
.nx-home p { font-size: clamp(19px, 2vw, 24px); text-shadow: 0 2px 16px rgba(0,0,0,.7); }
.nx-pick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.nx-pick a { display: grid; place-items: center; min-height: 56px; border-radius: var(--radius); background: var(--lime); color: var(--ink); text-decoration: none; font: 900 32px/1 var(--cond); font-stretch: 68%; padding-top: 3px; }
.nx-pick a:hover, .nx-pick a:focus-visible { background: var(--paper); color: var(--ink); }
.nx-home .nx-pick { gap: 8px; } .nx-home .nx-pick a { min-height: clamp(70px, 9vw, 108px); font-size: clamp(48px, 6vw, 78px); }
.nx-home.has { padding: 12px; border-radius: 12px; background: rgba(13,13,12,.85); }
.nx-go { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: center; color: var(--text); text-decoration: none; }
.nx-go img { width: 132px; height: 92px; object-fit: cover; border-radius: 8px; }
.nx-go small { display: block; font-size: 15px; color: #d6d3c9; line-height: 1.3; }
.nx-go b { display: block; font: 900 clamp(24px, 3vw, 34px)/1 var(--cond); font-stretch: 68%; text-transform: uppercase; margin: 3px 0 5px; }
.nx-go:hover { color: var(--text); } .nx-go:hover b { color: var(--lime); }
.nx-inline { margin: 26px 0; padding: 18px 20px 20px; border-radius: 10px; background: var(--ink-3); max-width: 780px; }
.nx-dock { position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 1050; }
.nx-dock.onmap { position: absolute; right: 12px; bottom: 34px; }
.nx-dock [hidden] { display: none; }
.nx-fab { display: block; min-height: 50px; padding: 4px 20px 0; border: 0; border-radius: 999px; background: var(--lime); color: var(--ink); font: 900 20px/1 var(--cond); font-stretch: 75%; text-transform: uppercase; cursor: pointer; box-shadow: 0 6px 22px rgba(0,0,0,.55); }
.nx-fab:hover { background: #d8ff63; }
.nx-card { position: relative; width: min(350px, calc(100vw - 28px)); padding: 16px; background: #171715; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.7); animation: nx-in .3s both; }
.nx-card p { padding-right: 34px; }
.nx-card .nx-x { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; background: none; color: var(--text); font-size: 24px; cursor: pointer; }
.nx-card .nx-go { grid-template-columns: 84px minmax(0, 1fr); padding-right: 30px; } .nx-card .nx-go img { width: 84px; height: 70px; } .nx-card .nx-go b { font-size: 22px; }
.map-nudge .nx-in { display: flex; margin: 0 30px 12px 0; text-align: center; }
/* step aside while a map spot, the map's filters or another map message is open */
body:has(.pp-sheet:not([hidden])) .nx-dock, body:has(.map-app.panel-open) .nx-dock, body:has(.map-nudge:not([hidden])) .nx-dock { display: none; }

@media (max-width: 860px) {
  .nx { padding-top: 22px; }
  .nx-goals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .nx-goal { aspect-ratio: 16 / 11; } .nx-goal b { left: 11px; bottom: 9px; }
  .nx-plan { display: flex; flex-direction: column; align-items: stretch; gap: 16px; margin-top: 20px; }
  .nx-plan > * { min-width: 0; }
  .nx-map { position: static; } .nx-mapbox { height: 250px; }
  .nx-pic { aspect-ratio: auto; } .nx-pic img { aspect-ratio: 2 / 1; height: auto; }
  .nx-big { position: static; padding: 12px 16px 0; border-radius: 0; } .nx-big b { font-size: 46px; }
  .nx-say { font-size: 34px; } .nx-say.small { font-size: 27px; }
  body:has(.nx) .glr:not(.on):not(.open) { display: none; }  /* the radio button covered the plan's buttons: show it here only while music plays */ .nx-body { padding: 12px 16px 18px; }
  .nx-acts .btn { flex: 1 1 auto; }
  .nx-codes { flex-wrap: nowrap; gap: 6px; margin-top: 12px; } .nx-codes li { flex: 1 1 auto; padding: 7px 10px 4px; } .nx-codes b { font-size: 23px; letter-spacing: .02em; }
  .nx-acts { margin-top: 14px; }
  body:has(.nx-dock .nx-card:not([hidden])) .glr:not(.on):not(.open) { display: none; }  /* the radio button sat on chapter 1 */
  .nx-framed .nx-dock:not(.onmap), body:has(.glr.on) .nx-dock:not(.onmap) { bottom: calc(78px + env(safe-area-inset-bottom)); }  /* music playing: sit above the radio */
  .nx-fab { min-height: 46px; padding: 3px 16px 0; font-size: 18px; }
  .nx-dock.onmap { right: 10px; bottom: 82px; }  /* above the map's own buttons */
  .nx-go { grid-template-columns: 96px minmax(0, 1fr); } .nx-go img { width: 96px; height: 76px; }
}
@media (prefers-reduced-motion: reduce) { .nx *, .nx-home, .nx-card { animation: none !important; transition: none !important; } }
.nx-goal img[src$="/guns.jpg"], .nx-pic img[src$="/selfie.jpg"] { object-position: 50% 30%; }
