/* Signal map: one line per live case file, plus the Izzy line for open signals. */
.map-station{padding-bottom:38px}
.map-intro{margin-top:15px;max-width:64ch}
.map-desktop{display:block;margin-top:24px}
.map-phone{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.map-key{display:flex;flex-wrap:wrap;align-items:center;gap:12px 28px;min-height:60px;padding:16px 0;border-top:2px solid var(--text);border-bottom:1px solid var(--divider);font-size:15px;color:var(--text)}
.map-key-line,.map-key-transfer{display:inline-flex;align-items:center;gap:10px;min-width:0}
.map-key-line .map-count{color:var(--muted)}
.map-bullet{display:inline-grid;place-items:center;flex:none;width:26px;height:26px;border-radius:50%;color:#fff;font-size:14px;font-weight:700;line-height:1;letter-spacing:0}
.map-bullet.small{width:24px;height:24px;font-size:13px}
.map-key-pill{display:inline-block;flex:none;width:14px;height:28px;border-radius:8px;background:var(--text)}

.map-canvas{position:relative;margin-top:12px;min-height:120px}
.map-svg{display:block;max-width:100%;height:auto}
.map-loading{padding:36px 0;color:var(--muted)}
.map-loading a{font-weight:700}

.map-line{fill:none;stroke-width:8;stroke-linejoin:round;stroke-linecap:round;stroke-dasharray:var(--len,1000);stroke-dashoffset:0}
.map-stop-dot{fill:var(--text);stroke:var(--bg);stroke-width:3}
.map-stop-pill{fill:var(--text);stroke:var(--bg);stroke-width:3}
.map-stop-label{fill:var(--text);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}
.map-transfer-label{fill:var(--text);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}
.map-label-halo{paint-order:stroke;stroke:var(--bg);stroke-width:5px;stroke-linejoin:round}
.map-line-letter{fill:#fff;text-anchor:middle;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px;font-weight:700}
.map-line-badge,.map-station-visual{opacity:1}
.map-station-visual{transform:none}

/* Animation classes are only added by JS, and only when motion is allowed. */
.map-canvas.map-ready .map-line{stroke-dashoffset:var(--len,1000)}
.map-canvas.map-ready .map-line-badge{opacity:0}
.map-canvas.map-ready .map-station-visual{opacity:0;transform:scale(.55);transform-box:fill-box;transform-origin:center}
.map-canvas.map-drawing .map-line{stroke-dashoffset:0;transition:stroke-dashoffset 1.2s cubic-bezier(.4,0,.2,1) var(--draw-delay,0ms)}
.map-canvas.map-drawing .map-line-badge{opacity:1;transition:opacity .3s ease var(--draw-delay,0ms)}
.map-canvas.map-drawing .map-station-visual{opacity:1;transform:scale(1);transition:opacity .34s ease var(--stop-delay,0ms),transform .34s ease var(--stop-delay,0ms)}

/* Invisible 44px targets sit above the drawing. They work mid-animation. */
.map-buttons{position:absolute;inset:0;pointer-events:none}
.map-stop{position:absolute;margin:0;padding:0;border:0;border-radius:9px;background:transparent;pointer-events:auto;color:transparent}
.map-stop:hover{border-radius:9px;box-shadow:inset 0 0 0 1px rgba(244,244,241,.35)}

.map-panel{display:flex;flex-direction:column;gap:18px;margin-top:26px;padding:28px 30px;border:2px solid var(--text);border-radius:12px;background:var(--surface)}
.map-panel:empty{display:none}
.map-panel-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.map-panel-mark{display:inline-block;width:16px;height:34px;border-radius:9px;background:var(--text)}
.map-panel-kicker{font-size:12px;font-weight:700;letter-spacing:.13em;text-transform:uppercase;color:var(--muted);line-height:1.5}
.map-panel-name{font-size:clamp(28px,3vw,34px);letter-spacing:-.02em;line-height:1.05}
.map-panel-lines{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.map-panel-lines>.map-line-block:only-child{grid-column:1/-1}
.map-line-block{display:flex;flex-direction:column;gap:10px;min-width:0;border-top:5px solid var(--line-color);padding-top:14px}
.map-line-head{display:flex;align-items:center;flex-wrap:wrap;gap:8px 10px;font-weight:700;color:var(--text);line-height:1.4}
.map-line-date{font-weight:400;color:var(--body)}
.map-line-copy{font-size:17px;line-height:1.55;max-width:54ch}
.map-line-call{font-size:15px;line-height:1.55;color:var(--muted)}
.map-line-links{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 18px;margin-top:2px}
.map-line-links a{font-weight:700}

@media(max-width:900px){
  .map-panel{padding:24px 22px}
  .map-panel-lines{grid-template-columns:1fr;gap:18px}
}

@media(max-width:720px){
  .map-desktop{display:none}
  .map-phone{position:static;width:auto;height:auto;padding:0;margin:26px 0 0;overflow:visible;clip:auto;white-space:normal}
  .map-strip{padding:20px 0 4px;border-top:1px solid var(--divider)}
  .map-strip:first-child{padding-top:0;border-top:0}
  .map-strip-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px}
  .map-strip-title{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;font-size:19px;line-height:1.25}
  .map-strip-name{font-weight:700}
  .map-strip-count{font-size:14px;font-weight:400;color:var(--muted)}
  .map-strip-toggle{display:inline-flex;align-items:center;min-height:44px;padding:8px 14px;border:1px solid var(--divider);border-radius:999px;background:transparent;color:var(--text);font-size:14px;font-weight:700}
  .map-strip-body{position:relative;margin-top:14px}
  .map-strip-rule{position:absolute;top:26px;bottom:26px;left:9px;width:8px;border-radius:4px;transform-origin:top center}
  .map-strip-stops{list-style:none;margin:0;padding:0}
  .map-strip-stop{display:grid;grid-template-columns:26px minmax(0,1fr);column-gap:14px;align-items:start;padding:8px 0}
  .map-strip-marker{position:relative;z-index:1;display:grid;place-items:center;width:26px;min-height:44px}
  .map-strip-dot{width:14px;height:14px;border-radius:50%;background:var(--text);box-shadow:0 0 0 3px var(--bg)}
  .map-strip-pill{display:block;width:22px;height:38px;border-radius:11px;background:var(--text);box-shadow:0 0 0 3px var(--bg)}
  .map-strip-stop-main{min-width:0}
  .map-strip-stop-btn{display:block;width:100%;min-height:44px;margin:0;padding:8px 0;border:0;border-radius:8px;background:transparent;color:var(--text);font-size:17px;font-weight:500;line-height:1.35;text-align:left}
  .map-strip-stop-btn.is-open{font-weight:700}
  .map-strip-also{display:inline-flex;align-items:center;gap:4px;margin-left:6px;font-size:13px;font-weight:400;color:var(--muted);white-space:nowrap}
  .map-strip-also-letter{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;color:#fff;font-size:11px;font-weight:700;line-height:1}
  .map-strip-detail{margin:4px 0 14px}
  .map-strip-panel{margin-top:0;padding:18px 16px;background:var(--surface)}
  .map-strip-panel .map-panel-lines{grid-template-columns:1fr;gap:16px}
  .map-strip-panel .map-panel-name{font-size:24px}
  .map-strip-panel .map-line-copy{font-size:16px}
}

/* Strip maps draw top to bottom, with stops fading in just behind the edge. */
.map-strip.is-armed .map-strip-rule{transform:scaleY(0)}
.map-strip.is-armed .map-strip-stop{opacity:0;transform:translateY(6px)}
.map-strip.is-drawn .map-strip-rule{transform:scaleY(1);transition:transform 1.2s cubic-bezier(.4,0,.2,1)}
.map-strip.is-drawn .map-strip-stop{opacity:1;transform:none;transition:opacity .3s ease var(--stop-delay,0ms),transform .3s ease var(--stop-delay,0ms)}

@media(prefers-reduced-motion:reduce){
  .map-line,.map-station-visual,.map-line-badge,.map-strip-rule,.map-strip-stop{transition:none!important}
}
