/* Listening Tour map page (page-tour-map.php). Gene's brand on the TM4C/NS26 map recipe. */
.tm-head { padding: 64px 0 40px; background: linear-gradient(180deg, #f7f5f0, #fff); }
.tm-head h1 { font: 700 52px/1.08 var(--serif); color: var(--navy); letter-spacing: -.01em; margin: 6px 0 16px; max-width: 18em; }
.tm-head .sub { margin-bottom: 26px; }
.tm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 900px; }
.tm-stats div { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold, #b8a05a); padding: 14px 16px; }
.tm-stats b { display: block; font: 700 34px/1 var(--serif); color: var(--navy); }
.tm-stats span { font: 600 12.5px/1.3 var(--sans); color: var(--mute); text-transform: uppercase; letter-spacing: .08em; }

.tm-mapsec { padding: 44px 0 56px !important; }
.tm-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.tm-toggle { display: inline-flex; border: 1.5px solid var(--navy); border-radius: 4px; overflow: hidden; }
.tm-toggle button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: #fff; color: var(--navy); font: 700 13px var(--sans);
  letter-spacing: .06em; text-transform: uppercase; padding: 11px 15px; cursor: pointer; }
.tm-toggle button.on { background: var(--navy); color: #fff; }
.tm-toggle button.on .gi { background-image: var(--gi-d); }
.tm-search { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 4px; padding: 0 12px; background: #fff; flex: 1 1 220px; max-width: 320px; }
.tm-search input { border: 0; outline: 0; font: 500 16px var(--sans); padding: 11px 0; width: 100%; color: var(--ink); background: transparent; }
.tm-reset { border: 0; background: none; color: var(--red); font: 700 13px var(--sans); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; padding: 8px 4px; }

.tm-host { position: relative; background: linear-gradient(180deg, #eef3f9, #e6edf6); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.tm-map { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 629; touch-action: manipulation; }
#tmEdge path { fill: none; stroke: var(--navy); stroke-width: 7; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
#tmTownsL path { stroke: #fff; stroke-width: .6; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .25s; }
#tmTownsL path.hov { stroke: var(--navy); stroke-width: 1.6; }
#tmCounties path { fill: none; stroke: rgba(10,42,94,.35); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; pointer-events: none; }
#tmDistricts path { fill: none; stroke: var(--navy); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; opacity: .85; }
#tmSel path { fill: none; stroke: #b8a05a; stroke-width: 4; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(184,160,90,.8)); animation: tmpulse 2.4s ease-in-out infinite; }
@keyframes tmpulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
#tmLabels { display: none; pointer-events: none; }
.tm-map.zoomed #tmLabels { display: block; }
#tmLabels text { font-weight: 700; font-family: var(--sans); font-size: inherit; fill: var(--navy); text-anchor: middle; paint-order: stroke; stroke: #fff; stroke-width: 1.5px; }
.rtc .halo { fill: #fff; stroke: rgba(10,42,94,.25); stroke-width: 1; }
.rtc.gene .halo { stroke: #b8a05a; stroke-width: 2.6; animation: tmpulse 2.4s ease-in-out infinite; }
.rtc { cursor: pointer; transition: transform .2s; }
#tmRtc a:hover .halo { stroke: var(--red); stroke-width: 2; }
.home text { font: italic 700 8px var(--serif); fill: var(--red); paint-order: stroke; stroke: #fff; stroke-width: 2px; }

.tm-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin-top: 12px; font: 500 14px var(--sans); color: var(--mute); }
.tm-legend span { display: inline-flex; align-items: center; gap: 8px; }
.tm-legend .sw { width: 16px; height: 16px; border-radius: 3px; display: inline-block; }
.tm-legend .ln { width: 22px; height: 0; border-top: 2px solid var(--navy); display: inline-block; }
.tm-legend img { width: 20px; height: 20px; }

.tm-card { position: absolute; right: 16px; top: 16px; width: min(360px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto;
  background: #fff; border-top: 4px solid #b8a05a; border-radius: 6px; box-shadow: 0 24px 50px -20px rgba(7,28,64,.55); padding: 18px 20px 20px; z-index: 5; }
.tm-card .x { position: absolute; right: 8px; top: 6px; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--mute); cursor: pointer; padding: 4px 8px; }
.tm-card .k { font: 700 11.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.tm-card h3 { font: 700 24px/1.2 var(--serif); color: var(--navy); margin: 4px 0 8px; padding-right: 20px; }
.tm-card h3 em { display: block; font: italic 600 14px var(--serif); color: #8e7a3e; margin-top: 4px; }
.tm-card .m { font-size: 15px; color: var(--mute); margin: 6px 0; }
.tm-card .tl { font-size: 15.5px; color: var(--ink); line-height: 1.55; margin: 8px 0 10px; }
.tm-card .tl small { color: var(--mute); }
.tm-card .dls { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.tm-card .dl { border: 1.5px solid var(--navy); background: #fff; color: var(--navy); font: 600 14px var(--sans); padding: 8px 12px; border-radius: 4px; cursor: pointer; text-align: left; }
.tm-card .dl:hover { background: var(--navy); color: #fff; }
.tm-card .rtcl { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; font: 600 15px var(--sans); color: var(--navy); }
.tm-card .rtcl img { width: 32px; height: 32px; }
.tm-card .rtcl em { font-style: normal; color: #8e7a3e; font-size: 13px; margin-left: 4px; }
.tm-card .btn { margin-top: 6px; }

.tm-rtcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-top: 8px; }
.tm-rtc { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; background: #fff; border: 1px solid var(--line);
  padding: 20px 12px 16px; text-decoration: none; position: relative; transition: transform .2s, box-shadow .2s; }
.tm-rtc:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -22px rgba(10,42,94,.55); }
.tm-rtc img { width: 64px; height: 64px; }
.tm-rtc b { font: 700 18px var(--serif); color: var(--navy); }
.tm-rtc span { font: 600 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.tm-rtc.gene { border-color: #b8a05a; box-shadow: inset 0 0 0 2px #b8a05a; }
.tm-rtc.gene span { color: #8e7a3e; }
.tm-fine { margin-top: 20px; color: var(--mute); }
.tm-fine a { color: var(--red); font-weight: 600; }

.tm-dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tm-d { display: grid; grid-template-columns: 14px 1fr; column-gap: 12px; text-align: left; background: #fff; border: 1px solid var(--line);
  padding: 14px 16px; cursor: pointer; font: inherit; color: inherit; transition: border-color .2s, box-shadow .2s; }
.tm-d i { grid-row: 1 / span 3; width: 14px; height: 14px; border-radius: 3px; margin-top: 5px; }
.tm-d b { font: 700 17px/1.3 var(--serif); color: var(--navy); }
.tm-d span { font-size: 14px; color: var(--mute); line-height: 1.45; }
.tm-d em { font: italic 600 13px var(--serif); color: #8e7a3e; }
.tm-d:hover, .tm-d.on { border-color: #b8a05a; box-shadow: 0 12px 26px -20px rgba(10,42,94,.6); }
.tm-d.home { box-shadow: inset 3px 0 0 #b8a05a; }
.band-mini { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 30px;
  background: var(--navy); color: #fff; padding: 22px 26px; border-radius: 4px; }
.band-mini p { margin: 0; font-size: 18px; color: #dfe6f2; }
.band-mini b { color: #fff; font-family: var(--serif); font-size: 21px; }
.tm-src { margin-top: 22px; font-size: 13px; color: var(--mute); }

@media (max-width: 860px) {
  .tm-head { padding: 40px 0 30px; }
  .tm-head h1 { font-size: 36px; }
  .tm-stats { grid-template-columns: 1fr 1fr; }
  .tm-stats b { font-size: 28px; }
  .tm-toggle { width: 100%; }
  .tm-toggle button { flex: 1; justify-content: center; padding: 12px 8px; font-size: 12px; }
  .tm-search { max-width: none; }
  .tm-card { position: static; width: auto; max-height: none; margin-top: 10px; box-shadow: 0 10px 30px -18px rgba(7,28,64,.55); }
  .tm-legend { font-size: 13px; }
}
