/* Cities next door: a live map in the same ink and light as the home page's money flow. */
main .city-map { --cm-accent:#e8694a; background:#172820; color:#f3efdf; padding-block:34px 30px; position:relative; overflow:hidden; }
.city-map::before { content:""; position:absolute; inset:0; pointer-events:none; opacity:.18; background-image:radial-gradient(#a8b5a4 1px,transparent 1px); background-size:24px 24px; mask-image:linear-gradient(transparent,#000 35%,transparent); }
.city-map > .wrap { position:relative; }
.city-map a { color:#d8e5b6; }
.city-map :focus-visible { outline:2px solid #ef7d5f; outline-offset:4px; }
.cm-edition { display:flex; justify-content:space-between; gap:16px; border-bottom:1px solid #74877660; padding-bottom:17px; font:.72rem var(--f-mono); text-transform:uppercase; letter-spacing:.12em; color:#afc0ad; }
.cm-motion { border:0; padding:0; background:transparent; color:#bfccba; font:.72rem var(--f-mono); cursor:pointer; letter-spacing:0; text-transform:none; }
.cm-workbench { display:grid; grid-template-columns:minmax(220px,.75fr) minmax(0,1.6fr); gap:40px; align-items:start; margin-top:26px; }

/* The card beside the map */
.cm-card { position:sticky; top:24px; min-height:300px; }
.cm-card h2 { font-size:clamp(2.1rem,3.4vw,3.1rem); line-height:1.04; color:#f3efdf; margin:0 0 6px; }
.cm-card h2 em { color:#c4d6a3; font-weight:400; }
.cm-kicker { font:.72rem var(--f-mono); text-transform:uppercase; letter-spacing:.1em; color:#a9baa4; margin:0 0 12px; }
.cm-rel { color:#bfccba; font-size:.82rem; line-height:1.7; margin:0 0 20px; max-width:38ch; }
.cm-facts { display:grid; grid-template-columns:1fr 1fr; border-top:1px solid #74877660; margin:0; }
.cm-facts div { padding:13px 0 12px; border-bottom:1px solid #74877638; }
.cm-facts div:nth-child(odd) { padding-right:14px; }
.cm-facts dt { font-size:.72rem; color:#a9baa4; }
.cm-facts dd { margin:3px 0 0; font:400 1.45rem var(--f-editorial); letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.cm-facts dd small { display:block; font:.7rem var(--f-mono); color:#a9baa4; letter-spacing:0; margin-top:2px; }
.cm-go { display:inline-flex; gap:10px; margin-top:20px; font-size:.82rem; text-decoration:none; border-bottom:1px solid #d8e5b680; padding-bottom:3px; }
.cm-go span { color:var(--cm-accent); }
.cm-wait { display:inline-block; margin-top:20px; font:.72rem var(--f-mono); color:#e2c57d; }
.cm-hint { font-size:.72rem; color:#a9baa4; line-height:1.7; margin-top:16px; }
.cm-card-body { animation:cm-card-in .22s ease-out; }

/* The map */
.cm-stage { position:relative; min-width:0; }
.cm-stage svg { display:block; width:100%; height:auto; max-width:min(100%,calc(min(84vh,940px) * .863)); margin-inline:auto; overflow:visible; }
.cm-loading { font:.72rem var(--f-mono); color:#a9baa4; padding:40px 0; }
.cm-la { fill:#14231b; stroke:#c4d6a3; stroke-width:1.4; vector-effect:non-scaling-stroke; }
.cm-hood { fill:transparent; stroke:#a8b5a4; stroke-opacity:.16; stroke-width:.6; vector-effect:non-scaling-stroke; transition:fill .2s; }
.cm-hood:hover { fill:#c4d6a314; }
.cm-city { fill:#2a3f31; stroke:#8ea18b; stroke-width:.9; vector-effect:non-scaling-stroke; cursor:pointer; transition:fill .25s,opacity .3s,stroke .25s; }
.cm-city.is-ready { fill:#3b5f46; stroke:#c4d6a3; }
.cm-city.is-pending { fill:#26372b; stroke-dasharray:3 3; }
.cm-city.is-ready:hover, .cm-city.is-ready.is-active { fill:var(--cm-accent); stroke:#f3efdf; }
.cm-city.is-pending:hover, .cm-city.is-pending.is-active { fill:color-mix(in srgb, var(--cm-accent) 45%, #26372b); stroke:#f3efdf; }
.cm-dim .cm-city:not(.is-active) { opacity:.55; }
.cm-city:focus { outline:none; }
.cm-city:focus-visible { stroke:#ef7d5f; stroke-width:2.5; }
.cm-border { fill:none; stroke:#8ec6b0; stroke-width:2.2; stroke-linecap:round; stroke-dasharray:4 46; vector-effect:non-scaling-stroke; pointer-events:none; opacity:.85; animation:cm-stream 7s linear infinite; animation-play-state:paused; }
.cm-border.is-active { stroke:#f3efdf; stroke-width:3.2; opacity:1; }
.cm-running .cm-border { animation-play-state:running; }
.cm-label { font:600 13px var(--f-mono); fill:#f3efdf; paint-order:stroke; stroke:#172820; stroke-width:4px; stroke-linejoin:round; text-anchor:middle; pointer-events:none; }
.cm-label.is-hood { font-weight:400; fill:#c4d6a3; }
.cm-legend { display:flex; flex-wrap:wrap; gap:6px 18px; margin:14px 0 0; padding:0; list-style:none; font:.7rem var(--f-mono); color:#a9baa4; justify-content:center; }
.cm-legend li { display:flex; align-items:center; gap:7px; }
.cm-legend i { width:16px; height:10px; display:inline-block; border:1px solid #c4d6a3; }
.cm-legend .k-la { background:#14231b; }
.cm-legend .k-ready { background:#3b5f46; }
.cm-legend .k-pending { background:#26372b; border-style:dashed; border-color:#8ea18b; }
.cm-legend .k-border { height:0; border:0; border-top:2px dashed #8ec6b0; }

/* First view: city lines draw in, one after another */
.cm-intro .cm-city { stroke-dasharray:1; stroke-dashoffset:1; animation:cm-draw 1.1s ease-out forwards; animation-delay:calc(var(--i) * 45ms); }
.cm-intro .cm-la { opacity:0; animation:cm-fade .8s ease-out forwards; }

@keyframes cm-stream { to { stroke-dashoffset:-1000; } }
@keyframes cm-draw { to { stroke-dashoffset:0; } }
@keyframes cm-fade { to { opacity:1; } }
@keyframes cm-card-in { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

@media (max-width:900px) {
  .cm-workbench { grid-template-columns:1fr; gap:18px; }
  .cm-card { position:static; min-height:0; order:2; }
  .cm-stage { order:1; }
  .cm-stage svg { max-width:min(100%,calc(72vh * .863)); }
}
@media (prefers-reduced-motion:reduce) {
  .city-map *, .city-map *::before { animation:none!important; transition:none!important; }
  .cm-intro .cm-city { stroke-dasharray:none; stroke-dashoffset:0; }
  .cm-intro .cm-la { opacity:1; }
}
