/* Depends on: tokens.css. Shared by the circuit page's hero and layout cards
   (circuit_detail.html) and the event page's track panel (event_detail.html). */
/* Track maps are uploaded as dark-on-white images. On the dark theme they are
   drawn as green line art on a glowing tile instead of a white box: invert to
   white-on-black, screen it onto the tile, then multiply the accent over it so
   the lines take the accent colour and the black disappears. The light theme
   keeps the image as uploaded. */
.track-tile, .lc-track, .cd-track { position: relative; isolation: isolate; }
:root:not([data-theme="light"]) .track-tile,
:root:not([data-theme="light"]) .lc-track,
:root:not([data-theme="light"]) .cd-track { background: #050a0b; }
:root:not([data-theme="light"]) .track-tile img,
:root:not([data-theme="light"]) .lc-track img,
:root:not([data-theme="light"]) .cd-track img { filter: invert(1) grayscale(1) contrast(1.15); mix-blend-mode: screen; }
:root:not([data-theme="light"]) .track-tile::after,
:root:not([data-theme="light"]) .lc-track:has(img)::after,
:root:not([data-theme="light"]) .cd-track:has(img)::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--accent); mix-blend-mode: multiply;
}
.track-tile {
  padding: 14px; border-radius: 14px; border: 1px solid var(--accent-line);
  box-shadow: 0 0 28px -8px var(--accent), inset 0 0 30px -14px var(--accent);
  overflow: hidden;
}
/* A real satellite photo of the circuit (Circuit.aerial_image): shown as is, none of the
   line-art treatment above. */
.track-sat { position: relative; border-radius: 14px; border: 1px solid var(--accent-line); overflow: hidden; line-height: 0; }
.ch-track .track-sat img, .circuit-track .track-sat img { width: 100%; height: auto; max-height: none; aspect-ratio: 1 / 1; object-fit: cover; }
.track-sat .sat-ideal { position: absolute; inset: 0; width: 100%; height: 100%; }
.sat-ideal polyline { vector-effect: non-scaling-stroke; }
.sat-ideal-under { stroke: rgba(0, 0, 0, 0.6); stroke-width: 3.5px; }
.sat-ideal-line { stroke-width: 1.8px; }
