.fvm { max-width: 1103px; margin: 1.5rem auto; color: #24372a; }
.fvm .fvm-art { background: #fff; border: 1px solid #dbe2d7; border-radius: 12px; overflow: hidden; }
.fvm .fvm-art svg { display: block; width: 100%; height: auto; fill: #000; stroke: none; stroke-width: 1; }
.fvm .fvm-help { font-size: 1rem; }
.fvm .fvm-features { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.fvm .fvm-feature, .fvm .fvm-close { font: inherit; line-height: 1.4; text-transform: none; letter-spacing: normal; background: #fff; color: #24372a; border: 1px solid #647d5e; border-radius: 6px; padding: .7rem 1rem; min-height: 44px; cursor: pointer; }
.fvm .fvm-feature:hover, .fvm .fvm-close:hover { background: #edf3e8; }
.fvm button:focus-visible { outline: 3px solid #12637a; outline-offset: 3px; }
.fvm .fvm-hit { cursor: pointer; outline: none; }
.fvm .fvm-hit * { fill: #007a89 !important; fill-opacity: 0 !important; stroke: #004958 !important; stroke-opacity: 0 !important; stroke-width: 3px !important; opacity: 1 !important; pointer-events: all; vector-effect: non-scaling-stroke; }
.fvm .fvm-hit.fvm-active * { fill-opacity: .28 !important; stroke-opacity: 1 !important; }
.fvm .fvm-dialog { box-sizing: border-box; width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 1.5rem; border: 0; border-radius: 12px; background: #fff; color: #24372a; box-shadow: 0 16px 80px #0005; margin: auto; }
.fvm .fvm-dialog:not([open]) { display: none; }
.fvm .fvm-dialog::backdrop { background: #142217b8; }
.fvm .fvm-dialog h2 { color: inherit; font-size: 1.5rem; line-height: 1.3; margin: 1rem 0; }
.fvm .fvm-dialog p { color: inherit; font-size: 1rem; line-height: 1.65; margin: 0; }
.fvm .fvm-close { display: block; margin-left: auto; }
.fvm details { flex: 1 1 220px; padding: .75rem; border: 1px solid #dbe2d7; }

/* Feature-name tooltip: does not intercept clicks on the underlying artwork. */
.fvm { position: relative; }
.fvm .fvm-tooltip { position: absolute; z-index: 20; pointer-events: none; box-sizing: border-box; width: max-content; max-width: min(280px, calc(100% - 16px)); padding: .65rem .95rem; border: 1px solid #bba575; border-radius: 9px; background: #193f32; color: #fff; font: 500 14px/1.45 system-ui, sans-serif; text-align: center; box-shadow: 0 6px 20px #152b2933; }
.fvm .fvm-tooltip[hidden] { display: none; }

/* Keep open route geometry stroke-only, including its enlarged hit area. */
.fvm .fvm-hit .fvm-line { fill: none !important; pointer-events: stroke; stroke-width: 10px !important; }
.fvm .fvm-hit.fvm-active .fvm-line { fill: none !important; stroke-opacity: .65 !important; }


/* Explicit width prevents inline-size containment collapsing in Vital's flex column. */
.fvm { width: 100%; min-width: 0; box-sizing: border-box; container-type: inline-size; container-name: forde-map; --fvm-sticky-top: 128px; }
.fvm .fvm-layout { min-width: 0; }
@container forde-map (min-width: 760px) {
  .fvm .fvm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 24px; align-items: start; }
  .fvm .fvm-art { min-width: 0; }
  .fvm .fvm-features { position: sticky; top: var(--fvm-sticky-top); display: flex; flex-direction: column; flex-wrap: nowrap; gap: 8px; margin-top: 0; padding: 14px; border: 1px solid #dbe2d7; border-radius: 12px; background: #f6f8f3; box-sizing: border-box; max-height: calc(100dvh - var(--fvm-sticky-top) - 24px); overflow-y: auto; }
  .fvm .fvm-feature { width: 100%; flex-shrink: 0; text-align: left; font-size: 14px; padding: 10px 12px; }
  .fvm .fvm-features details { flex: 0 0 auto; min-width: 0; }
}

/* Compact feature controls for the stacked/mobile layout only. */
@container forde-map (max-width: 759px) {
  .fvm .fvm-features { gap: 6px; margin-top: 12px; align-items: stretch; }
  .fvm .fvm-feature { box-sizing: border-box; width: auto; max-width: 100%; min-width: 0; min-height: 40px; padding: 6px 10px; font-size: 13px; font-weight: 500; line-height: 1.35; border-color: #c5cfbf; border-radius: 6px; background: #f6f8f3; white-space: normal; text-align: left; box-shadow: none; }
  .fvm .fvm-feature:hover { background: #eaf0e4; border-color: #647d5e; }
}

/* Zoom controls stay outside the SVG and never scale with the artwork. */
.fvm .fvm-map-panel { min-width: 0; }
.fvm .fvm-art { aspect-ratio: 1103 / 1010.8; }
.fvm .fvm-art svg { height: 100%; }
.fvm .fvm-zoomable { touch-action: none; }
.fvm .fvm-is-zoomed { cursor: grab; }
.fvm .fvm-is-zoomed:active { cursor: grabbing; }
.fvm .fvm-zoom-controls { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.fvm .fvm-zoom-controls button { font: 500 14px/1.2 system-ui, sans-serif; color: #24372a; background: #f6f8f3; border: 1px solid #c5cfbf; border-radius: 6px; min-width: 44px; min-height: 44px; padding: 8px 12px; cursor: pointer; }
.fvm .fvm-zoom-controls button:disabled { opacity: .4; cursor: default; }
.fvm .fvm-zoom-level { font: 500 13px/1.4 system-ui, sans-serif; min-width: 48px; text-align: center; }
.fvm .fvm-art:focus-visible { outline: 3px solid #12637a; outline-offset: 3px; }
