/* ── Reset & base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #090910;
  --surface:     #10101c;
  --surface2:    #16162a;
  --border:      rgba(255,255,255,0.07);
  --border2:     rgba(255,255,255,0.13);
  --text:        #e8e8f0;
  --text-muted:  #6b6b88;
  --text-dim:    #9b9bbb;
  --gold:        #f5c518;
  --green:       #3ddc97;
  --blue:        #4361ee;
  --blue-light:  #7b92ff;
  --red:         #ff4d6d;
  --amber:       #f4a261;
  --sidebar-w:   300px;
  --radius:      10px;
  --font-display: 'Mono', sans-serif;
  --font-ui:      'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  overflow: hidden;
}

/* ── Layout ────────────────────────────────────────────────── */
#sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
}

#map {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
}

/* ── Brand ─────────────────────────────────────────────────── */
#brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
  flex-shrink: 0;
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 8px var(--gold); opacity: 1; }
  50%       { box-shadow: 0 0 18px var(--gold); opacity: 0.7; }
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: #fff;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-left: auto;
  margin-top: 2px;
}

/* ── Search ────────────────────────────────────────────────── */
#search-block {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

#search-row {
  display: flex;
  gap: 8px;
}

#search-input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.2s;
}

#search-input::placeholder { color: var(--text-muted); }
#search-input:focus { border-color: var(--blue-light); }

#search-btn {
  background: var(--blue);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  padding: 9px 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.1s;
  flex-shrink: 0;
}
#search-btn:hover  { background: var(--blue-light); }
#search-btn:active { transform: scale(0.94); }

/* ── Controls ──────────────────────────────────────────────── */
#controls-block {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex-shrink: 0;
}

.control-group { display: flex; flex-direction: column; gap: 8px; }

/* Slider */
.slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  background: var(--surface2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  background-image: linear-gradient(var(--gold), var(--gold));
  background-size: 33.3% 100%; /* default 1mi of 3mi range */
  background-repeat: no-repeat;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  cursor: pointer;
  transition: transform 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.slider-val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
  min-width: 42px;
  text-align: right;
}

/* Rating tabs */
.rating-tabs {
  display: flex;
  gap: 6px;
}

.rtab {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 7px 6px;
  cursor: pointer;
  transition: all 0.18s;
}

.rtab:hover { border-color: var(--green); color: var(--green); }

.rtab.active {
  background: rgba(61,220,151,0.12);
  border-color: var(--green);
  color: var(--green);
  font-weight: 500;
}

/* Toggles */
.toggle-row { display: flex; flex-direction: column; gap: 8px; }

.tog {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.tog input { display: none; }

.tog-track {
  width: 32px; height: 18px;
  border-radius: 9px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  position: relative;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.tog-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.2s, background 0.2s;
}

.tog input:checked + .tog-track {
  background: rgba(67,97,238,0.25);
  border-color: var(--blue-light);
}

.tog input:checked + .tog-track::after {
  transform: translateX(14px);
  background: var(--blue-light);
}

.tog-label {
  font-size: 13px;
  color: var(--text-dim);
}

/* ── Stats strip ───────────────────────────────────────────── */
#stats-strip {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0;
  flex-shrink: 0;
}

#stats-strip.hidden { display: none; }

.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat + .stat { border-left: 1px solid var(--border); }

.stat-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--gold);
  line-height: 1;
}

.stat-key {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Legend ────────────────────────────────────────────────── */
#legend-block {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.legend-items {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-pent {
  width: 12px; height: 11px;
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  flex-shrink: 0;
}

/* ── Spinner ───────────────────────────────────────────────── */
#spinner-bar {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#spinner-bar.hidden { display: none; }

.spinner-inner {
  width: 14px; height: 14px;
  border: 2px solid var(--border2);
  border-top-color: var(--blue-light);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

#spinner-msg {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Error bar ─────────────────────────────────────────────── */
#error-bar {
  margin: 0 20px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255,77,109,0.12);
  border: 1px solid rgba(255,77,109,0.3);
  color: var(--red);
  font-size: 12px;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

#error-bar.hidden { display: none; }

/* ── Footer ────────────────────────────────────────────────── */
#sidebar-footer {
  margin-top: auto;
  padding: 14px 20px;
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

#sidebar-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
#sidebar-footer a:hover { color: var(--blue-light); }

/* ── Leaflet overrides ─────────────────────────────────────── */
.leaflet-popup-content-wrapper {
  background: var(--surface) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6) !important;
  padding: 0 !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  color: var(--text) !important;
  font-family: var(--font-ui) !important;
}

.leaflet-popup-tip-container { display: none !important; }

.leaflet-popup-close-button {
  color: var(--text-muted) !important;
  top: 8px !important;
  right: 10px !important;
  font-size: 18px !important;
}

.leaflet-control-zoom {
  border: 1px solid var(--border2) !important;
  border-radius: 8px !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background: var(--surface) !important;
  color: var(--text-dim) !important;
  border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover {
  background: var(--surface2) !important;
  color: var(--text) !important;
}

.leaflet-control-attribution {
  background: rgba(9,9,16,0.75) !important;
  color: var(--text-muted) !important;
  font-size: 9px !important;
}

.leaflet-control-attribution a { color: var(--text-muted) !important; }

/* ── Station popup ─────────────────────────────────────────── */
.sp-wrap {
  min-width: 240px;
  padding: 16px;
}

.sp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.sp-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.sp-score-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.sp-schools-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.sp-schools-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  max-height: 180px;
  overflow-y: auto;
}

.sp-school-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.sp-school-name {
  font-size: 12px;
  color: var(--text);
  line-height: 1.3;
  flex: 1;
}

.sp-school-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.sp-school-rating {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 4px;
}

.sp-school-a8 {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
}

.sp-school-dist {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
}

.sp-no-schools {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  padding: 6px 0;
}

.sp-links {
  display: flex;
  gap: 7px;
}

.sp-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s;
  border: 1px solid;
}

.sp-link-rm {
  background: rgba(255,77,107,0.1);
  border-color: rgba(255,77,107,0.35);
  color: #ff6b8a;
}
.sp-link-rm:hover {
  background: rgba(255,77,107,0.2);
  border-color: rgba(255,77,107,0.6);
}

.sp-link-z {
  background: rgba(67,97,238,0.1);
  border-color: rgba(67,97,238,0.35);
  color: var(--blue-light);
}
.sp-link-z:hover {
  background: rgba(67,97,238,0.2);
  border-color: rgba(67,97,238,0.6);
}

/* School marker popup */
.school-popup {
  min-width: 210px;
  padding: 14px;
}

.school-popup-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.3;
}

.school-popup-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 10px;
}

.school-popup-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid;
  transition: opacity 0.15s;
}

.school-popup-badge:hover { opacity: 0.8; }

.legend-score-note {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.4;
}

.legend-score {
  color: var(--text-muted);
  font-size: 10px;
}

.legend-hint {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
}
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

/* ── Utility ───────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Responsive / mobile tray ──────────────────────────────── */
@media (max-width: 640px) {
  :root { --sidebar-w: 100vw; --tray-peek: 52px; }

  #sidebar {
    height: auto;
    top: auto;
    bottom: 0;
    left: 0; right: 0;
    width: 100%;
    border-right: none;
    border-top: 1px solid var(--border2);
    border-radius: 16px 16px 0 0;
    max-height: 75vh;
    overflow-y: auto;
    transform: translateY(calc(100% - var(--tray-peek)));
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
  }

  #sidebar.tray-open {
    transform: translateY(0);
  }

  #map {
    left: 0;
    bottom: var(--tray-peek); /* always show peek strip */
  }

  /* Drag handle */
  #tray-handle {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0 6px;
    cursor: pointer;
    flex-shrink: 0;
    gap: 6px;
  }

  #tray-handle-bar {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--border2);
    transition: background 0.15s;
  }

  #tray-handle:hover #tray-handle-bar { background: var(--text-muted); }

  #tray-handle-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
  }

  /* Slightly more compact on mobile */
  #brand { padding: 12px 16px; }
  #search-block, #controls-block { padding: 12px 16px; }
  #stats-strip { padding: 10px 16px; }
  #legend-block { padding: 10px 16px; }
}

/* Hide handle on desktop */
@media (min-width: 641px) {
  #tray-handle { display: none; }
}

/* ── School popup — Attainment 8 block ─────────────────────── */
.school-popup-a8-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.school-popup-a8-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}

.school-popup-a8-score {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.school-popup-a8-diff {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.85;
}

.school-popup-a8-band {
  font-family: var(--font-mono);
  font-size: 10px;
}

/* ── Station popup — commute block ─────────────────────────── */
.sp-commute {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.sp-commute-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.sp-commute-row {
  display: flex;
  gap: 16px;
}

.sp-commute-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sp-commute-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--blue-light);
  line-height: 1;
}

.sp-commute-unit {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--blue-light);
  opacity: 0.8;
  margin-top: -2px;
}

.sp-commute-desc {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Legend toggles ────────────────────────────────────────── */
.legend-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 6px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  text-align: left;
  transition: background 0.15s, border-color 0.15s, opacity 0.2s;
}

.legend-toggle:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--border2);
}

.legend-toggle.active {
  opacity: 1;
}

.legend-toggle:not(.active) {
  opacity: 0.35;
}

.legend-toggle:not(.active) span {
  text-decoration: line-through;
  text-decoration-color: rgba(255,255,255,0.3);
}

/* ── Welcome modal ─────────────────────────────────────────── */
#welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#welcome-overlay.hidden {
  display: none;
}

#welcome-modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 28px;
  position: relative;
}

#welcome-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

#welcome-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

#welcome-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.15s;
}
#welcome-close:hover { color: var(--text); }

#welcome-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.2;
}

#welcome-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 22px;
}

#welcome-subtitle em {
  color: var(--text);
  font-style: normal;
}

.wm-sections {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 24px;
}

.wm-section {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.wm-section:last-child { border-bottom: none; }

.wm-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  margin-top: 1px;
}

.wm-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.wm-text {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
}

.wm-green { color: #3ddc97; font-weight: 500; }
.wm-gold  { color: #f5c518; font-weight: 500; }
.wm-blue  { color: #7b92ff; font-weight: 500; }

#welcome-start {
  width: 100%;
  background: var(--blue);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  padding: 14px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.01em;
}
#welcome-start:hover  { background: var(--blue-light); }
#welcome-start:active { transform: scale(0.98); }

/* ── How-to button + footer layout ────────────────────────── */
#sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#howto-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 8px 12px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
#howto-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--blue-light);
  color: var(--blue-light);
}

.footer-links {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-align: center;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--blue-light); }

/* ── MarkerCluster overrides ───────────────────────────────── */
.leaflet-cluster-anim .leaflet-marker-icon,
.leaflet-cluster-anim .leaflet-marker-shadow {
  transition: transform 0.2s ease-out, opacity 0.2s ease-in;
}

/* Hide default cluster styles — we use custom iconCreateFunction */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large,
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: none !important;
  box-shadow: none !important;
}

/* ── Clickable school rows in station popup ────────────────── */
.sp-school-row--clickable {
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.sp-school-row--clickable:hover {
  background: rgba(123,146,255,0.1);
  border-color: rgba(123,146,255,0.3);
}

.sp-school-goto {
  font-size: 12px;
  color: var(--blue-light);
  opacity: 0;
  margin-left: auto;
  flex-shrink: 0;
  transition: opacity 0.15s;
  align-self: center;
}

.sp-school-row--clickable:hover .sp-school-goto {
  opacity: 1;
}

/* ── Contact button ────────────────────────────────────────── */
#contact-btn {
  display: block;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 8px 12px;
  width: 100%;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

#contact-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--green);
  color: var(--green);
}
