/* vigie's map, from the validated prototype (branch prototype/vigie-map, projects/vigie/prototype-map/index.html):
   a warm dark map, bubbles counting days of incidents, the timeline under the map, the drawer in three columns
   (movements, their incidents, the chosen incident) that a button widens over the map. Desktop width. */
:root { --drawer-w: 860px; }
html, body { height: 100%; margin: 0; overflow: hidden; background: var(--ink); color: var(--text); font: 14px/1.5 var(--fu); }

#app { position: fixed; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) var(--drawer-w); }
.map { position: relative; overflow: hidden; }
.svg { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; user-select: none; }
.svg.drag { cursor: grabbing; }
.regions path { fill: var(--land); stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; transition: fill .15s, opacity .3s; cursor: pointer; }
.regions path:hover, .regions path.hov { fill: var(--land-hi); }
.regions path.sel { fill: #352e26; }
.regions path.dim, .bub.dim { opacity: .4; }
.bub { cursor: pointer; }
.bub circle { fill: rgba(211,154,98,.22); stroke: var(--accent); stroke-width: 1.2; vector-effect: non-scaling-stroke; transition: fill .15s; }
.bub:hover circle { fill: rgba(211,154,98,.45); }
.bub { transition: opacity .3s; }
.bub.sel circle { fill: var(--accent); } .bub.sel text.n { fill: var(--ink); }
.bub.unknown circle { fill: rgba(163,151,130,.16); stroke: var(--mute); stroke-dasharray: 4 3; }
.bub.unknown:hover circle { fill: rgba(163,151,130,.32); }
.bub text { fill: var(--text); text-anchor: middle; font-family: var(--fm); font-weight: 500; pointer-events: none; }
.bub text.lbl { fill: var(--mute); font-family: var(--fu); font-weight: 500; paint-order: stroke; stroke: var(--ink); stroke-width: 3px; stroke-linejoin: round; }
.bub.unknown text.lbl { font-style: italic; }

.top { position: absolute; left: 28px; top: 24px; right: 28px; display: flex; flex-direction: column; gap: 12px; pointer-events: none; z-index: 2; }
.brand { display: flex; align-items: baseline; gap: 14px; }
.logo { font: 600 30px/1 var(--fd); }
.tagline { font: italic 15px var(--fd); color: var(--mute); }
.active { display: flex; gap: 8px; flex-wrap: wrap; pointer-events: auto; }
.chip { display: inline-flex; align-items: center; gap: 7px; background: rgba(211,154,98,.16); border: 1px solid rgba(211,154,98,.5); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 12.5px; }
.chip b { font-weight: 600; } .chip span { color: var(--accent); font-size: 15px; line-height: 1; }
/* the drawer leaves a narrower map: the secondary labels go, as in the prototype */
.range span + span { display: none; }
.level { display: none; position: absolute; right: 24px; top: 28px; font: 11px var(--fm); color: var(--mute); text-transform: uppercase; letter-spacing: .08em; z-index: 2; text-align: right; }
.level div { text-transform: none; letter-spacing: 0; font-family: var(--fu); font-size: 12px; margin-top: 4px; }
.zoom { position: absolute; left: 28px; bottom: 190px; display: flex; gap: 6px; z-index: 2; }
.zoom button { background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; min-width: 34px; height: 34px; padding: 0 10px; cursor: pointer; }
.tip { position: absolute; z-index: 5; pointer-events: none; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 8px 11px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.tip b { font: 600 15px var(--fd); } .tip span { color: var(--mute); font-size: 12px; }
.time { position: absolute; left: 28px; right: 28px; bottom: 70px; z-index: 2; display: flex; flex-direction: column; gap: 6px; background: rgba(28,25,22,.86); border: 1px solid var(--rule); border-radius: 8px; padding: 10px 14px 6px; }
.range { font-size: 12.5px; color: var(--mute); font-variant-numeric: tabular-nums; display: flex; justify-content: space-between; }
.range b { color: var(--text); font-weight: 500; }
.hist { width: 100%; height: 74px; cursor: crosshair; display: block; }
.status { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; z-index: 3; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 20px; font: 15px var(--fd); }

/* ---------- the drawer: movements, their incidents, the chosen incident */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.c-physical-violence { background: var(--c-physical-violence); } .c-illegal-practice { background: var(--c-illegal-practice); }
.c-discriminatory-speech { background: var(--c-discriminatory-speech); } .c-theft-or-damage { background: var(--c-theft-or-damage); }
.drawer { background: var(--panel); border-left: 1px solid var(--rule); min-height: 0; min-width: 0; display: flex; flex-direction: column; }
#app.wide .drawer { position: absolute; top: 0; right: 0; bottom: 0; width: calc(100% - 160px); z-index: 10; box-shadow: -24px 0 48px rgba(0,0,0,.5); }
.cols { display: grid; grid-template-columns: 220px 250px minmax(0, 1fr); min-height: 0; flex: 1; }
#app.wide .cols { grid-template-columns: 270px 330px minmax(0, 1fr); }
.col { overflow-y: auto; min-height: 0; border-right: 1px solid var(--rule); }
.col:last-child { border-right: 0; }
.col-h { position: sticky; top: 0; z-index: 1; background: var(--panel); padding: 16px 16px 8px; font: 500 11px var(--fu); text-transform: uppercase; letter-spacing: .09em; color: var(--mute); border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 20px; }
.widen { text-transform: none; letter-spacing: 0; font: 500 12px var(--fu); background: var(--raise); border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; cursor: pointer; color: var(--text); }
.widen:hover { border-color: var(--accent); }
.c1, .c2 { width: 100%; display: flex; flex-direction: column; gap: 2px; background: none; border: 0; border-bottom: 1px solid var(--rule); text-align: left; cursor: pointer; }
.c1 { padding: 11px 16px; } .c2 { padding: 10px 16px; }
.c1:hover, .c2:hover { background: rgba(255,255,255,.03); }
.c1.sel, .c2.sel { background: rgba(211,154,98,.13); box-shadow: inset 3px 0 0 var(--accent); }
.c1 .nm { font: 600 15px/1.25 var(--fd); } .nm.none, .c2-sub.none, .c2-intro b.none { font-style: italic; font-weight: 400; color: var(--mute); }
.c1 .ct { font: 11.5px var(--fm); color: var(--mute); }
.c2 .ti { font: 500 14px/1.3 var(--fu); }
.c2 .me { font-size: 12px; color: var(--mute); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.c2 .d { font-family: var(--fm); font-size: 11.5px; }
.days { font: 10.5px var(--fm); color: var(--accent); border: 1px solid rgba(211,154,98,.45); border-radius: 3px; padding: 0 4px; }
.c2-sub { padding: 12px 16px 4px; font: 600 13px var(--fd); color: var(--mute); }
.c2-intro { padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--rule); }
.c2-intro b { font: 600 17px/1.2 var(--fd); } .c2-intro p { margin: 0; font: 13.5px/1.5 var(--fd); color: var(--mute); }
.more { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--rule); color: var(--accent); text-align: left; padding: 9px 16px; cursor: pointer; font-size: 12.5px; }
.c3 { padding: 20px 22px 90px; display: flex; flex-direction: column; gap: 14px; }
.c3-empty { padding: 60px 30px; color: var(--mute); text-align: center; font: 15px/1.6 var(--fd); margin: 0; }
h2.t { font: 600 26px/1.15 var(--fd); margin: 0; text-wrap: balance; }
h3.k { margin: 4px 0 0; font: 500 11.5px var(--fu); text-transform: uppercase; letter-spacing: .09em; color: var(--mute); display: flex; justify-content: space-between; gap: 10px; }
h3.k span { color: var(--accent); }
.meta { font: 12px var(--fm); color: var(--mute); }
.meta button { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.unknown-date { color: var(--accent); }
.story { font: 16px/1.6 var(--fd); margin: 0; }
.cats { display: flex; gap: 6px; flex-wrap: wrap; }
.cat { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; border: 1px solid var(--rule); border-radius: 999px; padding: 3px 10px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { background: var(--ink); border: 1px solid var(--rule); border-radius: 6px; padding: 6px 11px; cursor: pointer; display: flex; flex-direction: column; text-align: left; line-height: 1.25; }
.tab small { font: 10.5px var(--fm); color: var(--mute); text-transform: uppercase; letter-spacing: .06em; }
.tab.on { border-color: var(--accent); background: rgba(211,154,98,.12); }
.daystory { margin: 0; font: italic 15px/1.55 var(--fd); border-left: 2px solid var(--accent); padding-left: 12px; }
.vid { margin: 0; display: flex; flex-direction: column; gap: 7px; padding-bottom: 6px; }
.media { position: relative; aspect-ratio: 16 / 9; max-width: 640px; border-radius: 6px; overflow: hidden; background: var(--ink); border: 1px solid var(--rule); display: block; }
.media iframe, .media img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
a.media.none { display: grid; place-items: center; color: var(--mute); text-decoration: none; font-size: 13px; text-align: center; padding: 12px; box-sizing: border-box; }
a.media.none b { display: block; color: var(--accent); font-weight: 500; margin-top: 4px; }
.vc-sum { margin: 0; font: italic 14px/1.5 var(--fd); }
.vc-posts { font-size: 12px; color: var(--mute); display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.vc-posts a { color: var(--accent); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
