/* Speaking hero, 100x pass (2026-09-28). The map is one instrument: the cities are labelled at rest,
   the nearest city answers the pointer with a white card and a line home from Seattle, and the
   years below are a histogram of the talks you can scrub, play or hover (hovering a year shows only
   that year on the map). The ranked list follows the view and the year and re-ranks with a glide.
   Loaded after the page's inline <style>; new class names only, tokens from site.css :root. */

.smap-hero {
  --travel: cubic-bezier(0.28, 0.11, 0.32, 1);
  --settle: cubic-bezier(0.32, 0.72, 0, 1);
}
.smap { position: relative; margin-top: clamp(1.8rem, 4vw, 3rem); }

/* ---------- the stage ---------- */
.smap__stage {
  position: relative; aspect-ratio: 1000 / 367; overflow: hidden; background: var(--mist);
  border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); -webkit-tap-highlight-color: transparent;
}
.smap__stage svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.smap__stage.is-near { cursor: pointer; }
.smap-land { fill: none; stroke: rgba(10, 13, 18, 0.15); stroke-linecap: round; vector-effect: non-scaling-stroke; }
.smap-city {
  fill: var(--accent); fill-opacity: 0.74; stroke: #fff; stroke-width: 1.2; vector-effect: non-scaling-stroke;
  transition: fill 0.3s var(--travel), fill-opacity 0.3s var(--travel);
}
.smap-city.is-on, .smap-city.is-hot { fill: var(--ink); fill-opacity: 1; }
.smap.is-peek .smap-city { fill: var(--faint); fill-opacity: 0.5; }
.smap.is-peek .smap-city.is-in { fill: var(--accent); fill-opacity: 0.9; }
.smap-ring { fill: none; stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.smap-ring.is-on { opacity: 1; }
.smap.is-peek .smap-ring { opacity: 0; }
.smap-arc {
  fill: none; stroke: var(--accent); stroke-linecap: round; /* width set per zoom by the script, so dashes draw true */
  pointer-events: none; opacity: 0.85; transition: opacity 0.35s var(--travel);
}
.smap-arc.is-off, .smap.is-peek .smap-arc { opacity: 0; }
.smap-arc--fly { opacity: 0.55; }
.smap-ripple { fill: none; stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; pointer-events: none; }

/* labels at rest, and the white card for the city you point at */
.smap__labels { position: absolute; inset: 0; pointer-events: none; transition: opacity 0.45s var(--travel); }
.smap__labels.is-moving { opacity: 0; transition-duration: 0.18s; }
.smap-lab {
  position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; will-change: transform;
  transition: opacity 0.35s var(--travel);
}
.smap-lab.is-on { opacity: 1; }
.smap-lab.is-glide { transition: opacity 0.35s var(--travel), transform 0.45s var(--settle); }
.smap-lab__in {
  display: flex; align-items: baseline; gap: 0.3rem; font-family: var(--label); font-weight: 600; font-size: 0.82rem;
  line-height: 1; color: var(--ink);
  text-shadow: 0 0 2px var(--mist), 0 0 4px var(--mist), 0 0 1px var(--mist);
}
.smap-lab__in .k { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.smap-lab.is-card { z-index: 2; }
.smap-lab.is-card .smap-lab__in {
  flex-direction: column; align-items: flex-start; gap: 0.3rem; padding: 0.55rem 0.75rem 0.6rem;
  background: var(--paper); border-radius: 12px; text-shadow: none;
  box-shadow: 0 1px 2px rgba(10, 13, 18, 0.08), 0 10px 28px rgba(10, 13, 18, 0.12);
}
.smap-lab.is-card .n { font-family: var(--display); font-weight: 600; font-size: 1.08rem; line-height: 1.15; color: var(--ink); }
.smap-lab.is-card .m { font-family: var(--label); font-weight: 500; font-size: 0.86rem; line-height: 1.2; color: var(--muted); }
.smap__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }

/* ---------- the console: view, time, readout ---------- */
.smap__console {
  margin-top: 0.75rem; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(12.5rem, auto);
  grid-template-areas: "seg when state"; align-items: center; gap: 0.75rem 1.1rem; padding: 0.6rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-1);
}
.smap-seg {
  grid-area: seg; position: relative; isolation: isolate; display: flex; gap: 2px; padding: 4px;
  background: var(--mist); border-radius: 12px;
}
.smap-seg__plate {
  position: absolute; left: 0; top: 0; z-index: -1; border-radius: 9px; background: var(--paper);
  box-shadow: 0 1px 2px rgba(10, 13, 18, 0.08), 0 4px 14px rgba(10, 13, 18, 0.07);
  transition: transform 0.5s var(--settle), width 0.5s var(--settle), height 0.5s var(--settle);
}
.smap-seg.is-still .smap-seg__plate { transition: none; }
.smap-seg__opt {
  flex: 1 1 auto; height: 44px; padding: 0 1rem; border: 0; border-radius: 9px; background: none; white-space: nowrap;
  font-family: var(--label); font-weight: 600; font-size: 0.95rem; color: var(--muted); cursor: pointer;
  transition: color 0.3s var(--travel), background 0.3s, transform 0.35s var(--settle);
}
.smap-seg__opt:hover:not([aria-pressed="true"]) { color: var(--ink); background: rgba(255, 255, 255, 0.55); }
.smap-seg__opt[aria-pressed="true"] { color: var(--ink); }
.smap-seg__opt:active { transform: scale(0.97); }

.smap__when { grid-area: when; display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.smap__play {
  flex: none; width: 52px; height: 52px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
  background: var(--ink); color: #fff; cursor: pointer; transition: background 0.25s, transform 0.35s var(--settle);
}
.smap__play:hover { background: var(--accent-deep); }
.smap__play:active { transform: scale(0.92); }
.smap__play path { transform-origin: 7px 7px; transition: opacity 0.25s var(--travel), transform 0.35s var(--settle); }
.smap__play .i-pause, .smap__play.is-playing .i-play { opacity: 0; transform: scale(0.5); }
.smap__play.is-playing .i-pause { opacity: 1; transform: none; }

/* the years: one bar per year, height = talks that year; the blue inside is the chosen city */
.smap-years {
  position: relative; isolation: isolate; flex: 1 1 auto; min-width: 0; height: 60px; padding: 6px 8px 17px;
  background: var(--mist); border-radius: 12px; cursor: pointer;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.smap-years.is-focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.smap-years__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.smap-years__cols { position: relative; height: 100%; display: grid; grid-template-columns: repeat(33, minmax(0, 1fr)); gap: 2px; }
.smap-yc { position: relative; min-width: 0; }
.smap-yc .b, .smap-yc .o { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 2px 2px 1px 1px; }
.smap-yc .b { height: calc(var(--h, 0) * 1%); background: var(--lightbox); transition: background-color 0.3s var(--travel); }
.smap-yc .o { height: calc(var(--o, 0) * 1%); background: var(--accent); transition: height 0.45s var(--settle), opacity 0.3s; }
.smap-yc.is-later .b { background: var(--mist-2); }
.smap-yc.is-later .o { opacity: 0.4; }
.smap-yc.is-peek .b { background: var(--ink-2); }
.smap-years__plate {
  position: absolute; top: 3px; bottom: 14px; left: 0; z-index: -1; width: var(--w, 0px); transform: translateX(var(--x, 0px));
  border-radius: 6px; background: var(--paper); box-shadow: 0 1px 2px rgba(10, 13, 18, 0.08); opacity: 0;
  transition: transform 0.35s var(--settle), width 0.35s var(--settle), opacity 0.25s;
}
.smap-years__plate.is-on { opacity: 1; }
.smap-years__head {
  position: absolute; top: 2px; bottom: 15px; left: 0; width: 2px; margin-left: -1px; border-radius: 1px;
  background: var(--ink); transform: translateX(var(--x, 0px)); pointer-events: none;
  transition: transform 0.32s var(--settle);
}
.smap-years__head::before { content: ""; position: absolute; left: -3px; top: -1px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.smap-years.is-drag .smap-years__head { transition-duration: 0.12s; }
.smap-years__end {
  position: absolute; bottom: 3px; left: 8px; font-family: var(--label); font-weight: 500; font-size: 0.72rem;
  line-height: 1; color: var(--muted); pointer-events: none;
}
.smap-years__end--r { left: auto; right: 8px; }

.smap__state { grid-area: state; min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; padding-right: 0.5rem; }
.smap__state b {
  font-family: var(--display); font-weight: 600; font-size: 1.55rem; line-height: 1; color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums; transition: color 0.3s var(--travel);
}
.smap__state span { font-family: var(--label); font-weight: 500; font-size: 0.9rem; line-height: 1.25; color: var(--muted); }
.smap__state.is-peek b { color: var(--accent); }

/* ---------- ranked cities and the talks ---------- */
.smap-atlas .talks__head h2 { margin-right: auto; }
.smap-rank { position: relative; isolation: isolate; margin-top: 1rem; }
.smap-rank .cities { margin-top: 0; }
.smap-rank__plate {
  position: absolute; left: -0.35rem; right: -0.35rem; top: 0; z-index: -1; height: var(--h, 0px); transform: translateY(var(--y, 0px));
  border-radius: 10px; background: var(--mist); opacity: 0;
  transition: transform 0.45s var(--settle), height 0.45s var(--settle), opacity 0.25s;
}
.smap-rank__plate.is-on { opacity: 1; }
.smap-rank .cities li { position: relative; }
.smap-rank .cities button, .smap-rank .cities button:hover, .smap-rank .cities button.is-on { background: none; transition: none; }
.smap-rank .cities .nm { transition: color 0.3s var(--travel); }
.smap-rank .cities .tr i { transition: width 0.5s var(--settle), background-color 0.3s var(--travel); }
.smap-rank .cities .ct { font-variant-numeric: tabular-nums; transition: color 0.3s var(--travel); }
.smap-rank .cities button.is-on .ct { color: var(--accent); }
.smap-rank .cities button.is-hot .tr i, .smap-rank .cities button.is-on .tr i { background: var(--accent); }
.smap-rank .cities button:hover .tr i { background: var(--accent); }
.smap-rank__none { padding: 0.9rem 0.3rem; font-size: 0.95rem; color: var(--muted); }

.cityfind__hits button.is-act { background: var(--mist); }

.smap-atlas .talks li { animation: none; transition: opacity 0.4s var(--travel); }
.smap-atlas .talks li.is-in { animation: smap-rise 0.5s var(--travel) backwards; }
.smap-atlas .talks li.is-later { opacity: 0.38; }
.smap-atlas .talks .yr.is-rep { color: var(--faint); }
@keyframes smap-rise { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } }

@media (max-width: 1100px) {
  .smap__console { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "seg state" "when when"; }
  .smap__state { justify-self: end; text-align: right; align-items: flex-end; }
}
@media (max-width: 600px) {
  .smap__stage { aspect-ratio: 9 / 5; border-radius: 14px; }
  .smap-lab__in { font-size: 0.74rem; }
  .smap-lab.is-card .smap-lab__in { padding: 0.4rem 0.55rem 0.45rem; gap: 0.2rem; border-radius: 10px; }
  .smap-lab.is-card .n { font-size: 0.92rem; }
  .smap-lab.is-card .m { font-size: 0.76rem; }
  .smap-lab.is-card .m + .m { display: none; }
  .smap__console { grid-template-columns: minmax(0, 1fr); grid-template-areas: "seg" "when" "state"; padding: 0.5rem; gap: 0.6rem; border-radius: 16px; }
  .smap-seg__opt { padding: 0 0.4rem; font-size: 0.9rem; }
  .smap__play { width: 46px; height: 46px; }
  .smap-years { padding-inline: 5px; }
  .smap-years__cols { gap: 1px; }
  .smap__state { justify-self: start; text-align: left; align-items: flex-start; flex-direction: row; align-items: baseline; gap: 0.6rem; padding: 0 0.3rem 0.2rem; }
  .smap__state b { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .smap-hero *, .smap-hero *::before { transition-duration: 0s !important; animation: none !important; }
}

/* page pass: a city where I gave one of the named lectures below says so in its card */
.smap-lab.is-card .nl {
  display: block; margin-top: 0.35rem; padding-top: 0.35rem; border-top: 1px solid var(--line);
  font-family: var(--display); font-weight: 600; font-size: 0.86rem; line-height: 1.25; color: var(--accent-deep);
  max-width: 17rem; white-space: normal;
}
@media (max-width: 600px) { .smap-lab.is-card .nl { font-size: 0.78rem; max-width: 12rem; } }
