/* Gan Gan technical sheet. Native buttons control the three views and eight sections. */
/* The paper panel and map fill keep the photographic background visible. */
.track-map {
  margin: 88px 0 0;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: rgba(244, 241, 234, .78);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(24, 25, 22, .12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  scroll-margin-top: 25px;
}
.map-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ink);
}
.map-heading-copy { min-width: 0; }
.map-eyebrow {
  margin: 0 0 12px;
  color: var(--ink);
  font: 400 .75rem/1.6 "Michroma", Arial, sans-serif;
  letter-spacing: .06em;
}
.track-map h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.8vw, 3.5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.map-intro {
  max-width: 48ch;
  margin: 12px 0 0;
  color: var(--ink);
  font: 400 1rem/1.6 var(--font-body);
}
.map-view-switch {
  display: flex;
  flex-shrink: 0;
  max-width: 100%;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: rgba(244, 241, 234, .14);
}
.map-view-switch button {
  position: relative;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font: 500 .875rem/1.4 var(--font-tech);
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}
.map-view-switch button:hover { background: rgba(24, 25, 22, .08); }
.map-view-switch button[aria-pressed=true] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.map-view-switch button[aria-pressed=true]:after {
  position: absolute;
  content: "";
  height: 2px;
  left: 12px;
  right: 12px;
  bottom: 4px;
  background: var(--accent);
}
.map-workspace {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 28px;
  align-items: start;
}
.map-visual, .map-sidebar { min-width: 0; }
.map-stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 4/3;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background-color: rgba(244, 241, 234, .14);
  background-image: linear-gradient(rgba(24, 25, 22, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(24, 25, 22, .08) 1px, transparent 1px);
  background-size: 36px 36px;
  box-shadow: inset 0 1px 8px rgba(24, 25, 22, .06);
}
.map-stage:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(244, 241, 234, .14);
}
.map-aerial {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .28s ease;
}
.map-drawing {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  overflow: visible;
}
.map-drawing path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.map-route-shadow { stroke: var(--paper); stroke-width: 7; opacity: .85; }
.map-route { stroke: var(--ink); stroke-width: 3.5; transition: opacity .2s; }
.map-sector { stroke: var(--ink); stroke-width: 3.5; transition: stroke .2s, opacity .2s, stroke-width .2s; }
.map-marker { transition: opacity .2s; }
.map-marker circle {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  transition: fill .2s, stroke .2s;
}
.map-marker text {
  fill: var(--ink);
  font-family: var(--font-tech);
  font-size: 42px;
  font-weight: 600;
}
.map-sector.is-selected { stroke: var(--accent); stroke-width: 5.5; }
.map-sector.is-muted { opacity: .22; }
.map-marker.is-muted { opacity: .4; }
.map-marker.is-selected circle { fill: var(--ink); stroke: var(--accent); }
.map-marker.is-selected text { fill: var(--paper); }
.track-map:not([data-map-selected=all]) .map-route { opacity: .35; }
.track-map[data-map-mode=aerial] .map-aerial { opacity: 1; }
.track-map[data-map-mode=aerial] .map-route-shadow { stroke: var(--ink); opacity: .9; }
.track-map[data-map-mode=aerial] .map-route { stroke: var(--paper); opacity: 1; }
.track-map[data-map-mode=aerial] .map-sector { stroke: var(--paper); opacity: 0; }
.track-map[data-map-mode=aerial] .map-marker { opacity: 0; }
.track-map[data-map-mode=aerial] .map-sector.is-selected { stroke: var(--accent); opacity: 1; }
.track-map[data-map-mode=aerial] .map-marker.is-selected { opacity: 1; }
.track-map[data-map-mode=aerial]:not([data-map-selected=all]) .map-route { opacity: .65; }
.track-map[data-map-mode=outline] .map-marker { opacity: 0; }
.track-map[data-map-mode=outline] .map-marker.is-selected { opacity: 1; }
.map-stage-brand {
  position: absolute;
  right: 18px;
  bottom: 15px;
  color: var(--ink);
  font: 400 .75rem/1.5 "Michroma", Arial, sans-serif;
  letter-spacing: .04em;
  opacity: .65;
  pointer-events: none;
}
.map-stage-brand span {
  margin-left: 6px;
  font: 400 .75rem/1.5 var(--font-tech);
  letter-spacing: .06em;
}
.track-map[data-map-mode=aerial] .map-stage-brand {
  color: var(--paper);
  opacity: 1;
  text-shadow: 0 1px 3px var(--ink);
}
.map-file-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
}
.map-file-actions .utility-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: 500 .875rem/1.4 var(--font-tech);
  box-shadow: none;
  text-shadow: none;
  transition: background .18s, color .18s;
}
.map-file-actions .utility-button:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  box-shadow: none;
}
.map-file-actions .utility-button:active { box-shadow: none; }
.map-png-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 0;
  color: var(--ink);
  font: 400 .75rem/1.5 var(--font-tech);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--ink);
}
.map-png-link:hover { color: var(--ink); text-decoration-color: var(--accent); }
.map-selection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -5px 0 12px;
}
.map-selection-heading p {
  margin: 0;
  color: var(--ink);
  font: 500 .75rem/1.5 var(--font-tech);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.map-reset {
  min-height: 44px;
  padding: 8px 0 8px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font: 500 .875rem/1.4 var(--font-tech);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--ink);
  cursor: pointer;
}
.map-reset:hover, .map-reset[aria-pressed=true] { text-decoration-color: var(--accent); }
.map-sector-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.map-sector-button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  padding: 10px 9px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: rgba(244, 241, 234, .22);
  color: var(--ink);
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s;
}
.map-sector-button:hover { background: rgba(244, 241, 234, .65); }
.map-sector-button[aria-pressed=true] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  box-shadow: inset 3px 0 0 var(--accent);
}
.map-index {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font: 500 .75rem/1 var(--font-tech);
}
.map-sector-button[aria-pressed=true] .map-index {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}
.map-sector-name {
  min-width: 0;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: normal;
}
.map-detail {
  min-height: 190px;
  margin-top: 24px;
  padding: 20px 0 0;
  border-top: 1px solid var(--ink);
}
.map-detail-circuit {
  margin: 0 0 10px;
  color: var(--ink);
  font: 400 .75rem/1.6 "Michroma", Arial, sans-serif;
  letter-spacing: .025em;
}
.map-detail h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.01em;
}
.map-detail-description {
  margin: 0;
  color: var(--ink);
  font: 400 1rem/1.6 var(--font-body);
}
[data-map-detail][hidden] { display: none; }
.map-note {
  max-width: none;
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--ink);
  color: var(--ink);
  font: 400 .75rem/1.7 var(--font-tech);
}
.track-map :is(button, a):focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
@media (min-width: 1200px) {
  .map-workspace { grid-template-columns: minmax(0, 2.2fr) minmax(300px, 1fr); }
}
@media (max-width: 1100px) {
  .map-heading-row { align-items: flex-start; flex-direction: column; gap: 20px; }
  .map-view-switch { align-self: flex-start; }
  .map-workspace { gap: 24px; }
}
@media (max-width: 900px) {
  .map-workspace { grid-template-columns: minmax(0, 1fr); }
  .map-sidebar { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0 24px; }
  .map-selection-heading { grid-column: 1/-1; margin: 0 0 12px; }
  .map-detail { min-height: 0; margin: 0; padding: 2px 0 0 24px; border-top: 0; border-left: 1px solid var(--ink); }
  .map-marker circle { r: 42; }
  .map-marker text { font-size: 50px; }
}
@media (max-width: 700px) {
  .map-sidebar { display: block; }
  .map-detail { min-height: 170px; margin-top: 24px; padding: 20px 0 0; border-top: 1px solid var(--ink); border-left: 0; }
  .map-stage-brand { right: 13px; bottom: 10px; }
  .map-marker circle { r: 50; }
  .map-marker text { font-size: 64px; }
  .map-route, .map-sector { stroke-width: 3; }
  .map-sector.is-selected { stroke-width: 5; }
}
@media (max-width: 520px) {
  .track-map { margin: 64px 0 0; padding: 22px 16px 18px; border-radius: 8px; }
  .map-heading-row { gap: 18px; margin-bottom: 20px; padding-bottom: 20px; }
  .map-eyebrow { margin-bottom: 9px; }
  .track-map h2 { font-size: 2rem; }
  .map-intro { margin-top: 10px; }
  .map-view-switch { width: 100%; }
  .map-view-switch button { flex: 1 1 auto; min-width: 0; padding: 10px 5px; }
  .map-workspace { gap: 22px; }
  .map-marker circle { r: 61; stroke-width: 1.5; }
  .map-marker text { font-size: 80px; }
  .map-route, .map-sector { stroke-width: 2.5; }
  .map-route-shadow { stroke-width: 6; }
  .map-sector.is-selected { stroke-width: 4; }
  .map-stage-brand { right: 10px; bottom: 8px; }
  .map-stage-brand span { display: none; }
  .map-file-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
  .map-file-actions .utility-button { min-height: 48px; padding: 10px 7px; line-height: 1.3; white-space: normal; }
  .map-png-link { grid-column: 1/-1; justify-self: start; }
  .map-detail { min-height: 180px; }
  .map-note { margin-top: 20px; padding-top: 14px; }
}
@media (max-width: 380px) {
  .map-sector-button { flex-direction: column; align-items: flex-start; gap: 6px; min-height: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  .track-map * { transition: none !important; }
}
