@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  color-scheme: light;
  --ink: #19233c;
  --muted: #8b93a7;
  --panel: #ffffff;
  --panel-2: #f7f8fa;
  --line: #e1e5f2;
  --accent: #fe815f;
  --accent-strong: #ef6848;
  --lime: #3a8f62;
  --blue: #596b9b;
  --bg: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  min-height: 100vh;
  background-image: radial-gradient(circle at 76% 0%, rgba(254,129,95,.12), transparent 29%);
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }

.topbar {
  height: 68px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(18px);
}
.brand { text-decoration: none; display: flex; align-items: center; gap: 10px; letter-spacing: .1em; font-size: 13px; }
.brand strong { font-weight: 800; }
.brand-disc { width: 25px; height: 8px; border-radius: 50%; border: 2px solid var(--accent); transform: rotate(-10deg); box-shadow: 0 0 14px rgba(254,129,95,.28); }
.topbar-meta { font-size: 11px; letter-spacing: .035em; color: var(--muted); display: flex; align-items: center; gap: 9px; }
.topbar-coverage { letter-spacing: .08em; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(254,129,95,.12); }

main { max-width: 1480px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 64px) 90px; }
.hero { padding: clamp(42px, 6vw, 78px) 0 38px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(390px, .84fr); align-items: center; gap: clamp(22px, 3vw, 44px); }
.hero-copy { min-width: 0; }
.eyebrow, .kicker { color: var(--accent); font-weight: 700; }
.eyebrow { font-size: 13px; letter-spacing: .025em; }
.kicker { font-size: 11px; letter-spacing: .18em; }
h1 { font-family: "Space Grotesk", "DM Sans", sans-serif; font-size: clamp(42px, 5.5vw, 82px); letter-spacing: -.06em; line-height: 1; margin: 18px 0 22px; max-width: 920px; white-space: nowrap; }
h1 em { font-style: normal; color: var(--accent); }
.lede { color: var(--muted); font-size: clamp(15px, 1.5vw, 19px); max-width: 690px; line-height: 1.7; margin: 0; }

.filter-panel { width: 100%; display: grid; grid-template-columns: 1fr; gap: 1px; justify-self: end; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 20px 55px rgba(25,35,60,.09); }
.filter-panel label { background: var(--panel); padding: 13px 16px 11px; min-height: 68px; }
.filter-panel .search-field { display: flex; align-items: center; gap: 10px; padding-top: 18px; }
.search-field span { color: var(--accent); font-size: 24px; }
.filter-panel input, .filter-panel select { width: 100%; color: var(--ink); border: 0; background: transparent; outline: none; }
.country-combobox { position: relative; display: flex; align-items: center; }
.country-combobox input { padding-right: 34px; }
.country-toggle { position: absolute; right: -3px; top: 50%; width: 32px; height: 32px; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); font-size: 18px; }
.country-options { position: absolute; z-index: 40; top: calc(100% + 10px); left: -16px; right: -16px; max-height: min(320px, 48vh); overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 18px 42px rgba(25,35,60,.18); }
.country-option { display: block; width: 100%; border: 0; border-radius: 8px; background: transparent; color: var(--ink); padding: 10px 12px; text-align: left; font-size: 14px; }
.country-option:hover, .country-option:focus-visible, .country-option[aria-selected="true"] { outline: none; background: rgba(254,129,95,.12); color: #b84e34; }
.filter-panel select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 8px) 52%, calc(100% - 3px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 16px; }
.filter-panel select option { background: var(--panel); }
.filter-panel .label { display: block; text-transform: uppercase; letter-spacing: .12em; font-size: 9px; color: var(--muted); margin-bottom: 8px; }
.clear-button { min-height: 54px; border: 0; background: linear-gradient(135deg, #ffa88f, var(--accent) 55%, #ff6846); color: white; font-weight: 700; }
.clear-button:hover { background: linear-gradient(135deg, #ff9c80, var(--accent-strong)); }

.explorer { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(390px, .84fr); gap: clamp(22px, 3vw, 44px); align-items: start; padding-top: 42px; }
.map-card { position: sticky; top: 98px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; padding: 25px 27px 18px; }
.section-heading h2 { font-size: 26px; margin: 5px 0 0; letter-spacing: -.035em; }
.map-legend { font-size: 11px; color: var(--muted); }
.map-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 5px; }
.map { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: linear-gradient(145deg, #ffffff, var(--panel-2)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); isolation: isolate; }
.radar-grid { position: absolute; left: 50%; top: 50%; width: 90%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 1.5px solid rgba(254,129,95,.62); border-radius: 50%; z-index: 0; }
.radar-grid i { position: absolute; left: 50%; top: 50%; border: 1px solid rgba(254,129,95,.27); border-radius: 50%; transform: translate(-50%, -50%); }
.radar-grid i:nth-child(1) { width: 22%; height: 22%; }
.radar-grid i:nth-child(2) { width: 45%; height: 45%; }
.radar-grid i:nth-child(3) { width: 70%; height: 70%; }
.radar-axis { position: absolute; left: 50%; top: 50%; background: rgba(254,129,95,.34); transform: translate(-50%, -50%); }
.radar-axis-x { width: 100%; height: 1px; }
.radar-axis-y { width: 1px; height: 100%; }
.radar-sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 205deg, transparent 0 78%, rgba(254,129,95,.04) 84%, rgba(254,129,95,.3) 96%, transparent 100%); animation: radar-scan 11s linear infinite; }
.radar-core { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); transform: translate(-50%, -50%); box-shadow: 0 0 0 8px rgba(254,129,95,.12); }
#mapMarkers { position: absolute; inset: 0; z-index: 3; }
.map-marker { --x: 50%; --y: 50%; position: absolute; left: var(--x); top: var(--y); padding: 0; transform: translate(-50%, -50%); border: 0; border-radius: 999px; color: var(--ink); background: transparent; display: block; z-index: 3; transition: transform .18s; cursor: pointer; touch-action: manipulation; }
.map-marker-main { display: inline-flex; align-items: center; gap: 5px; min-width: 49px; height: 27px; padding: 2px 8px 2px 3px; border: 1px solid rgba(254,129,95,.34); border-radius: 999px; color: var(--ink); background: rgba(255,255,255,.96); box-shadow: 0 4px 13px rgba(25,35,60,.1); font-size: 10px; line-height: 1; white-space: nowrap; }
.map-marker-main strong { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; color: #fff; background: var(--accent); font-size: 9px; }
.map-marker-main b { letter-spacing: .08em; font-size: 9px; }
.map-label-full { display: none; position: absolute; left: 50%; top: calc(100% + 7px); transform: translateX(-50%); padding: 5px 7px; border: 1px solid rgba(254,129,95,.45); border-radius: 7px; color: var(--ink); background: #fff; box-shadow: 0 6px 16px rgba(25,35,60,.18); font-size: 10px; line-height: 1; white-space: nowrap; pointer-events: none; }
.map-marker.warm .map-marker-main { box-shadow: 0 0 0 4px rgba(254,129,95,.1), 0 4px 13px rgba(25,35,60,.1); }
.map-marker.hot .map-marker-main { box-shadow: 0 0 0 6px rgba(254,129,95,.14), 0 4px 13px rgba(25,35,60,.1); }
.map-marker:hover, .map-marker:focus-visible, .map-marker.active { z-index: 10; transform: translate(-50%, -50%) scale(1.03); outline: none; }
.map-marker:hover .map-label-full, .map-marker:focus-visible .map-label-full { display: inline; }
.map-marker.active .map-marker-main { border-color: var(--accent); background: #fff0ed; }
@keyframes radar-scan { to { transform: rotate(360deg); } }
.map-note { color: var(--muted); font-size: 10px; padding: 0 27px 14px; }

.results-heading { padding: 0 0 18px; border-bottom: 1px solid var(--line); }
.active-filters { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 14px; min-height: 20px; }
.active-filters:empty { display: none; }
.active-filters button { border: 1px solid rgba(254,129,95,.42); background: rgba(254,129,95,.09); color: #b84e34; border-radius: 100px; padding: 5px 9px; font-size: 10px; }
.active-filters button span { margin-left: 7px; color: var(--accent); }
.event-list { display: grid; gap: 10px; padding-top: 14px; }
.event-card { display: grid; grid-template-columns: 58px 1fr 38px; gap: 17px; align-items: center; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; transition: transform .18s, background .18s, border-color .18s; }
.event-card:hover { transform: translateY(-2px); background: var(--panel-2); border-color: rgba(254,129,95,.42); }
.date-block { height: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid var(--line); color: var(--accent); }
.date-block span { font-size: 10px; letter-spacing: .12em; font-weight: 700; }
.date-block strong { font-size: 30px; line-height: 1.1; letter-spacing: -.06em; }
.card-topline { display: flex; flex-wrap: wrap; gap: 7px 9px; align-items: center; color: var(--muted); font-size: 10px; line-height: 1.35; text-transform: uppercase; letter-spacing: .08em; }
.status { display: inline-flex; align-items: center; width: fit-content; border-radius: 3px; font-size: 9px; letter-spacing: .06em; font-weight: 700; padding: 4px 6px; text-transform: uppercase; }
.status-confirmed { background: rgba(63,121,51,.12); color: var(--lime); }
.status-save { background: rgba(36,109,161,.11); color: var(--blue); }
.status-tba { background: rgba(176,112,20,.12); color: #965f10; }
.status-past { background: rgba(102,116,125,.12); color: var(--muted); }
.status-cancelled { background: rgba(181,46,46,.12); color: #a72b2b; }
.status-cancel { background: rgba(181,46,46,.12); color: #a72b2b; }
.status-live { background: rgba(63,121,51,.12); color: var(--lime); }
.event-copy { min-width: 0; }
.event-copy h3 { max-width: 100%; font-size: 17px; line-height: 1.28; margin: 9px 0 5px; letter-spacing: -.025em; overflow-wrap: anywhere; }
.event-location, .event-date { margin: 0; font-size: 11px; color: var(--muted); }
.event-location span { color: var(--accent); }
.event-date { margin-top: 4px; color: #616b84; }
.details-button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink); background: transparent; }
.details-button:hover { background: var(--accent); border-color: var(--accent); }

.empty-state { text-align: center; color: var(--muted); padding: 75px 20px; border: 1px dashed var(--line); border-radius: 12px; margin-top: 14px; }
.empty-state span { color: var(--accent); font-size: 42px; }
.empty-state h3 { color: var(--ink); margin-bottom: 5px; }
.empty-state p { font-size: 13px; }
.empty-state button { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 7px; padding: 9px 13px; }

.event-dialog { width: min(620px, calc(100vw - 30px)); border: 1px solid var(--line); border-radius: 18px; background: #ffffff; color: var(--ink); padding: 38px; box-shadow: 0 38px 100px rgba(25,35,60,.24); }
.event-dialog::backdrop { background: rgba(25,35,60,.34); backdrop-filter: blur(6px); }
.dialog-close { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 20px; }
.dialog-kicker { color: var(--accent); font-size: 10px; letter-spacing: .14em; margin: 28px 0 8px; text-transform: uppercase; }
.event-dialog h2 { font-size: clamp(30px, 5vw, 48px); line-height: 1.05; letter-spacing: -.05em; margin: 0 0 30px; }
.dialog-facts { display: grid; grid-template-columns: 1.2fr 1fr .6fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dialog-facts div { padding: 17px 10px 17px 0; }
.dialog-facts span { display: block; color: var(--muted); font-size: 9px; margin-bottom: 6px; }
.dialog-facts strong { font-size: 12px; }
.dialog-summary { color: #616b84; line-height: 1.7; font-size: 14px; margin: 24px 0; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 15px; }
.source-link { color: var(--blue); font-size: 12px; text-decoration: none; }
.source-link.muted { color: var(--muted); }
.source-unavailable { color: var(--muted); font-size: 10px; line-height: 1.55; max-width: 100%; }
.source-unavailable > span { display: block; color: var(--ink); font-weight: 700; margin-bottom: 5px; }
.source-unavailable p { margin: 0; max-height: 110px; overflow: auto; white-space: normal; }
.source-copy { flex: 1 0 100%; order: 2; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); padding: 12px 14px; color: var(--ink); }
.source-copy strong { display: block; margin-bottom: 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.source-copy p { margin: 0; font-size: 13px; line-height: 1.65; color: #616b84; }
.ics-button { border: 0; border-radius: 7px; background: var(--accent); color: white; font-weight: 700; padding: 10px 14px; }

footer { max-width: 1480px; margin: 0 auto; padding: 26px clamp(20px, 4vw, 64px); border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 24px; color: var(--muted); font-size: 10px; }
footer span { color: var(--ink); font-weight: 700; letter-spacing: .14em; }
.footer-link { color: var(--accent); font-weight: 700; text-decoration: none; white-space: nowrap; }
.footer-link:hover { text-decoration: underline; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .filter-panel { max-width: none; }
  .explorer { grid-template-columns: 1fr; }
  .map-card { position: static; }
}

@media (max-width: 580px) {
  .topbar { height: 58px; }
  .topbar-meta { max-width: 190px; justify-content: flex-end; gap: 6px; font-size: 9px; line-height: 1.25; text-align: right; }
  .topbar-coverage, .meta-separator { display: none; }
  .hero { padding-top: 38px; }
  h1 { font-size: clamp(30px, 10vw, 42px); }
  .clear-button { grid-column: auto; min-height: 46px; }
  .country-toggle { width: 40px; height: 40px; right: -7px; }
  .country-combobox input { padding-right: 40px; }
  .country-options { max-height: 42vh; }
  .map-card { border-radius: 12px; }
  /* Extra vertical room lets the full regional layout retain north/south order
     while the collision pass keeps every compact marker separated. */
  .map { min-height: 0; aspect-ratio: 2 / 3; }
  .map-marker-main { min-width: 43px; height: 23px; gap: 4px; padding: 2px 6px 2px 2px; font-size: 8px; }
  .map-marker-main strong { width: 17px; height: 17px; font-size: 8px; }
  .map-marker-main b { font-size: 8px; }
  .event-card { grid-template-columns: 50px 1fr 32px; gap: 11px; padding: 14px 12px; }
  .date-block { height: 62px; }
  .card-topline > span:last-child { display: none; }
  .dialog-facts { grid-template-columns: 1fr; }
  .dialog-facts div { border-bottom: 1px solid var(--line); }
  .event-dialog { padding: 28px 22px; }
  .dialog-actions { align-items: flex-start; flex-direction: column; }
  footer { align-items: flex-start; gap: 12px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .radar-sweep { animation: none !important; }
}
