/* ==========================================================================
   Chart of the archipelago (Views/Shared/_Archipelago.cshtml), shared by the
   Landing and the access portal. Needs tokens.css.
   ========================================================================== */
.cv-chart { width: 100%; height: auto; overflow: visible; }
.cv-grat line { stroke: rgba(127,179,213,.07); stroke-width: 1; }
.cv-grat text, .cv-scale text { font: 500 calc(11px * var(--cv-k, 1)) var(--dv-mono); fill: var(--dv-ink-3); }
.cv-hub text { font: 600 calc(12px * var(--cv-k, 1)) var(--dv-font); transform: translateY(calc((var(--cv-k, 1) - 1) * 22px)); }
.cv-depth { fill: none; stroke: var(--dv-contour); stroke-width: .8; }
.cv-d1 { opacity: .20; }
.cv-d2 { opacity: .10; stroke-dasharray: 2 4; }
.cv-island { cursor: pointer; outline: none; transform-box: fill-box; transform-origin: center;
  transition: transform var(--dv-mid) var(--dv-ease-out); }
.cv-elev { transition: fill 420ms ease-out, stroke var(--dv-mid), opacity var(--dv-mid); }
.cv-e0 { fill: var(--p-navy-15); stroke: rgba(127,179,213,.6); stroke-width: 1; }
.cv-elev:not(.cv-e0) { fill: none; stroke: rgba(227,199,116,.26); stroke-width: .8; }
.cv-e4, .cv-e5 { stroke: rgba(227,199,116,.45); }
.cv-e3 { stroke: rgba(227,199,116,.4); }
.cv-name { font: 600 calc(12.5px * var(--cv-k, 1)) var(--dv-font); fill: var(--dv-ink); paint-order: stroke; stroke: var(--dv-sea); stroke-width: calc(3px * var(--cv-k, 1)); }
.cv-mod { font: 500 calc(11.5px * var(--cv-k, 1)) var(--dv-font); fill: var(--dv-ink-2); paint-order: stroke; stroke: var(--dv-sea); stroke-width: calc(3px * var(--cv-k, 1)); }
.cv-island--none .cv-name { fill: var(--dv-ink-3); font-weight: 500; }
.cv-island--none .cv-e0 { fill: var(--p-navy-13); }
/* selection halo: the shelf around the chosen island lights up */
.cv-halo { fill: none; stroke: transparent; stroke-width: 14; stroke-linejoin: round; pointer-events: none; transition: stroke var(--dv-mid); }
.cv-island.is-active .cv-halo { stroke: rgba(201,168,76,.2); }
.cv-island[data-status="soon"].is-active .cv-halo { stroke: rgba(185,198,216,.2); }
/* generous, invisible touch area around each coast: never below ~44 px on screen (--cv-k undoes the SVG scale) */
.cv-hit { fill: transparent; stroke: transparent; stroke-width: calc(36px * var(--cv-k, 1)); stroke-linejoin: round; pointer-events: all; }
.cv-island.is-hover .cv-e0, .cv-island:focus-visible .cv-e0 { fill: var(--p-navy-19); }
.cv-island.is-hover .cv-name { fill: var(--dv-gold-hi); }
.cv-island.is-active { transform: translate3d(0, -3px, 0); }
.cv-island.is-active .cv-e0 { fill: var(--p-navy-22); stroke: var(--dv-gold-hi); }
.cv-island.is-active .cv-elev:not(.cv-e0) { stroke: rgba(227,199,116,.75); }
.cv-island.is-active .cv-name { fill: var(--dv-gold-hi); }
.cv-island.is-active .cv-mod { fill: var(--dv-ink); }
.cv-island:focus-visible .cv-e0 { stroke: var(--dv-gold); stroke-width: 2; }
.cv-island[data-status="soon"] .cv-mod { font-style: normal; }
.cv-course { stroke: var(--dv-contour); stroke-width: 1; stroke-dasharray: 3 5; opacity: .42; transform-box: fill-box; transform-origin: left center;
  transition: opacity var(--dv-mid), stroke-width var(--dv-mid); }
.cv-course.is-active { stroke: var(--dv-gold); opacity: 1; stroke-width: 1.6; stroke-dasharray: none; }
.cv-hub-ring { fill: none; stroke: var(--dv-gold); stroke-width: 1; transform-box: fill-box; transform-origin: center; opacity: .5; }
.cv-hub-mark { transform-origin: 0 0; transform: scale(calc(1 + (var(--cv-k, 1) - 1) * .7)); }   /* stays readable on small charts */
.cv-hub-core { fill: var(--dv-abyss); stroke: var(--dv-gold); stroke-width: 1.6; }
.cv-hub-d { fill: var(--dv-gold); }
.cv-hub text { fill: var(--dv-gold-hi); paint-order: stroke; stroke: var(--dv-sea); stroke-width: calc(4px * var(--cv-k, 1)); }
.cv-scale line { stroke: var(--dv-ink-3); stroke-width: 1; }


/* Data pulses travelling island → hub along each course */
.cv-pulse { fill: var(--dv-gold-hi); opacity: 0; transform-box: fill-box; transform-origin: center; }
.cv-pulse.is-active { fill: var(--p-gold-88); r: 3.6px; }
/* brighter land in the hero so the archipelago reads from across the room */
.cv-scene .cv-e0 { fill: var(--p-navy-18-2); stroke: rgba(127,179,213,.75); }
/* flat chart (no 3D), same 60-30-10: base = navy, modules = contour blue, selected = gold */
.cv-scene .cv-island[data-status="on"] .cv-e0 { fill: color-mix(in srgb, var(--dv-contour) 42%, var(--dv-sea)); }
.cv-scene .cv-island .cv-elev:not(.cv-e0) { stroke: rgba(7,17,31,.45); }
.cv-scene .cv-island.is-active:not([data-status="soon"]) .cv-e0 { fill: color-mix(in srgb, var(--dv-gold) 78%, var(--dv-sea)); }

/* Chart furniture: neatline with graduated border, spot soundings, rhumb rose */
.cv-neat rect { fill: none; stroke: rgba(127,179,213,.35); stroke-width: 1; vector-effect: non-scaling-stroke; }
.cv-neat .cv-neat-in { stroke: rgba(127,179,213,.14); }
.cv-neat-ticks { fill: none; stroke: rgba(127,179,213,.55); stroke-width: 1; vector-effect: non-scaling-stroke; }
/* Raking light from the west: coasts facing the low sun catch gold */
.cv-scene .cv-e0 { stroke: rgba(127,179,213,.75); stroke-width: 1.2; }
.cv-scene .cv-island.is-active .cv-e0 { stroke: var(--dv-gold-hi); }
/* Narrow charts: the key chips and the readout carry modules and soundings */
.cv-chart.is-narrow .cv-island--none .cv-name, .cv-chart.is-narrow .cv-island:not(.is-active) .cv-mod, .cv-chart.is-narrow .cv-grat text { display: none; }
/* Island outline symbols (sprite) */
.cv-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.cv-mark-coast { fill: var(--mark-fill, var(--p-navy-18-2)); stroke: var(--mark-stroke, var(--p-blue-74)); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.cv-mark-c { fill: none; stroke: var(--mark-contour, rgba(227,199,116,.6)); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* Roadmap islands ("Em breve"): desaturated land, dashed coast, no gold on selection */
.cv-island[data-status="soon"] .cv-e0 { fill: var(--dv-shelf) !important; stroke: var(--dv-ink-3) !important; stroke-dasharray: 3 3; }
.cv-island[data-status="soon"].is-active .cv-e0 { fill: color-mix(in srgb, var(--dv-ink-2) 55%, var(--dv-sea)) !important; stroke: var(--dv-ink) !important; stroke-dasharray: none; }
.cv-island[data-status="soon"].is-active .cv-mod { fill: var(--dv-ink-2); }
.cv-island[data-status="soon"] .cv-elev:not(.cv-e0) { stroke: rgba(142,156,177,.35) !important; }
.cv-island[data-status="soon"] .cv-mod { fill: var(--dv-ink-3); font-style: italic; }
.cv-island[data-status="soon"].is-active .cv-name { fill: var(--dv-ink); }
/* only the selected course moves */
.cv-pulse:not(.is-active), .cv-pulse[data-pulse="brava"], .cv-pulse[data-pulse="santa-luzia"] { display: none; }
/* a pinned island: the others step back (land and courses only; names keep their contrast) */
.cv-chart.is-pinned .cv-island:not(.is-active):not(.is-hover) .cv-elev { opacity: .45; }
.cv-chart.is-pinned .cv-course:not(.is-active) { opacity: .12; }
.cv-course[data-status="base"]:not(.is-active) { opacity: .26; }
.cv-course[data-status="soon"] { stroke-dasharray: 1 6; opacity: .22; }
.cv-course[data-status="soon"].is-active { stroke: var(--dv-ink-2); stroke-dasharray: none; opacity: .9; }

/* 3D relief under the chart (shared/archipelago-3d.js): the canvas draws the land, the SVG keeps text, courses and hits */
.cv-stage { position: relative; }
.cv-3d { position: absolute; z-index: 0; pointer-events: none; }
.cv-stage .cv-chart { position: relative; z-index: 1; }
.has-3d .cv-land .cv-elev, .has-3d .cv-islets .cv-elev { fill: transparent !important; stroke: transparent !important; }
/* the coast stays visible for what the visitor is acting on: hover, keyboard focus, selection */
.has-3d .cv-island.is-active { transform: none; }
.has-3d .cv-land .cv-island.is-hover .cv-e0 { stroke: rgba(227,199,116,.6) !important; }
.has-3d .cv-land .cv-island.is-active .cv-e0 { stroke: var(--dv-gold-hi) !important; stroke-width: 1.6; }
.has-3d .cv-land .cv-island[data-status="soon"].is-active .cv-e0 { fill: transparent !important; stroke: var(--dv-ink) !important; }
.has-3d .cv-land .cv-island:focus-visible .cv-e0 { stroke: var(--dv-gold-hi) !important; stroke-width: 3; }
.has-3d .cv-halo { display: none; }   /* one contour only: the coast itself */
/* names under their island keep clear of the coast whatever the SVG scale */
.cv-island[data-island="santiago"] .cv-name, .cv-island[data-island="sao-vicente"] .cv-name { transform: translateY(calc((var(--cv-k, 1) - 1) * 13px)); }
.cv-island[data-island="santiago"] .cv-mod, .cv-island[data-island="sao-vicente"] .cv-mod { transform: translateY(calc((var(--cv-k, 1) - 1) * 27px)); }
.has-3d .cv-sea .cv-d1 { opacity: .12; }
.cv-chart.is-narrow .cv-island[data-island="santa-luzia"] .cv-name { display: none; }
/* the module line keeps its distance from the name whatever the SVG scale */
.cv-mod { transform: translateY(calc((var(--cv-k, 1) - 1) * 14px)); }
/* narrow charts: no room for these three; the card names them */
.cv-chart.is-narrow .cv-island[data-island="sal"] .cv-mod, .cv-chart.is-narrow .cv-island[data-island="brava"] .cv-mod, .cv-chart.is-narrow .cv-island[data-island="fogo"] .cv-mod { display: none; }
