:root {
  color-scheme: dark;
  --bg: #101216;
  --panel: #171a20;
  --panel-2: #1e232b;
  --ink: #f4f1e8;
  --muted: #a9a49a;
  --soft: #d4cec1;
  --line: rgba(244, 241, 232, 0.12);
  --accent: #d6a95f;
  --green: #83b67a;
  --blue: #78a8c7;
  --shadow: rgba(0, 0, 0, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  min-height: 100dvh;
  margin: 0;
  background: linear-gradient(180deg, #14171d 0%, var(--bg) 42%, #0d0f13 100%);
  color: var(--ink);
  font-family: "Geist", "Satoshi", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.directory-header,
.directory-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.directory-header {
  padding: 24px 0 18px;
}

.back-link,
.competition-card a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.back-link:hover,
.competition-card a:hover {
  text-decoration: underline;
}

.header-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(360px, 0.62fr);
  gap: 28px;
  align-items: stretch;
  padding-top: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(34px, 6vw, 60px);
  line-height: 0.98;
}

.summary {
  max-width: 680px;
  margin: 14px 0 4px;
  color: var(--soft);
  font-size: 15px;
  line-height: 1.55;
}

.activity-map {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(178px, 0.65fr);
  gap: 16px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(214, 169, 95, 0.08), transparent 48%),
    rgba(23, 26, 32, 0.88);
  padding: 16px;
}

.activity-map h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1;
}

.activity-map-copy p:not(.eyebrow) {
  margin: 0;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.45;
}

.activity-map-body {
  display: grid;
  gap: 10px;
  min-width: 0;
  place-items: center;
}

.activity-ball-wrap {
  display: grid;
  width: 178px;
  height: 178px;
  place-items: center;
  perspective: 840px;
}

.activity-ball {
  position: relative;
  width: 142px;
  height: 142px;
  border: 1px solid rgba(244, 241, 232, 0.22);
  border-radius: 50%;
  transform-style: preserve-3d;
  animation: activity-ball-spin 18s linear infinite;
}

.activity-ball::before,
.activity-ball::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(244, 241, 232, 0.13);
  border-radius: 50%;
}

.activity-ball::before {
  inset: 13px;
}

.activity-ball::after {
  inset: 35px;
}

.ball-ring,
.ball-activity {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(244, 241, 232, 0.15);
  border-radius: 50%;
  transform-style: preserve-3d;
}

.ball-ring-one {
  transform: rotateY(54deg);
}

.ball-ring-two {
  transform: rotateY(-54deg);
}

.ball-ring-three {
  transform: rotateX(68deg);
}

.ball-ring-four {
  transform: rotateX(-68deg) scale(0.88);
}

.ball-activity {
  border-width: 2px;
}

.ball-activity-europe {
  border-color: rgba(131, 182, 122, 0.88);
  transform: rotateX(63deg) rotateZ(-18deg) scale(0.84);
}

.ball-activity-us {
  border-color: rgba(120, 168, 199, 0.78);
  transform: rotateX(64deg) rotateZ(142deg) scale(0.66);
}

.activity-pin {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(214, 169, 95, 0.1);
}

.activity-pin-europe {
  left: 58%;
  top: 34%;
  background: var(--green);
}

.activity-pin-us {
  left: 26%;
  top: 42%;
  background: var(--blue);
}

.activity-status-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.activity-status-row span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0 8px;
  text-transform: uppercase;
}

.region-summary {
  display: grid;
  width: 100%;
  gap: 6px;
  margin: 0;
}

.region-summary div {
  display: grid;
  grid-template-columns: minmax(58px, 0.3fr) minmax(0, 1fr);
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 7px;
}

.region-summary dt,
.region-summary dd {
  min-width: 0;
  font-size: 11px;
  line-height: 1.25;
}

.region-summary dt {
  color: var(--muted);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.region-summary dd {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  overflow-wrap: anywhere;
  text-align: right;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.stats-strip div {
  min-width: 0;
  background: rgba(23, 26, 32, 0.92);
  padding: 14px 16px;
}

.stats-strip span {
  display: block;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.stats-strip small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.directory-shell {
  padding-bottom: 34px;
}

.control-panel {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 220px) auto;
  gap: 12px;
  align-items: end;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 18, 22, 0.94);
  padding: 12px;
  backdrop-filter: blur(18px);
}

.input-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.input-field label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.input-field input,
.input-field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  outline: none;
  padding: 0 12px;
}

.input-field input:focus,
.input-field select:focus {
  border-color: rgba(214, 169, 95, 0.72);
}

.filter-tabs {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  padding: 4px;
}

.filter-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 0 12px;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.filter-tabs button:hover,
.filter-tabs button.is-active {
  background: rgba(214, 169, 95, 0.16);
  color: var(--ink);
}

.filter-tabs button:active {
  transform: translateY(1px);
}

.dashboard-section {
  padding: 14px 0 22px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1;
}

.section-heading > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.section-heading strong {
  color: var(--ink);
}

.card-grid {
  display: grid;
  gap: 12px;
}

.active-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.watchlist-grid {
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}

.competition-card {
  display: flex;
  min-width: 0;
  min-height: 285px;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(30, 35, 43, 0.96), rgba(22, 25, 31, 0.96));
  box-shadow: 0 14px 36px -28px var(--shadow);
  padding: 16px;
  transition: border-color 160ms ease, transform 160ms ease;
}

.competition-card[hidden] {
  display: none;
}

.competition-card:hover {
  border-color: rgba(214, 169, 95, 0.42);
  transform: translateY(-1px);
}

.card-topline,
.stage-row,
.card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.meta {
  margin: 0;
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
}

.coverage,
.stage-row span,
.card-action span,
.card-action a {
  display: inline-flex;
  max-width: 100%;
  min-height: 26px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.coverage-adapter-v1 {
  border-color: rgba(131, 182, 122, 0.34);
  color: var(--green);
}

.coverage-planned {
  border-color: rgba(120, 168, 199, 0.32);
  color: var(--blue);
}

.card-main h2 {
  margin: 0 0 10px;
  font-size: clamp(21px, 2.6vw, 29px);
  line-height: 1.06;
  overflow-wrap: anywhere;
}

.card-main p {
  margin: 12px 0 0;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.45;
}

.stage-row {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.stage-row span {
  color: var(--muted);
}

.card-facts {
  display: grid;
  gap: 8px;
  margin: 0;
}

.card-facts div {
  display: grid;
  grid-template-columns: minmax(64px, 0.28fr) minmax(0, 1fr);
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.card-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-facts dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: right;
}

.card-action {
  justify-content: flex-end;
}

.card-action a {
  border-color: rgba(214, 169, 95, 0.48);
  color: var(--accent);
}

.card-action span {
  color: var(--muted);
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  margin: 0;
  padding: 18px;
  text-align: center;
}

@media (max-width: 860px) {
  .header-grid,
  .control-panel,
  .active-grid {
    grid-template-columns: 1fr;
  }

  .control-panel {
    position: static;
  }

  .filter-tabs {
    width: 100%;
  }

  .filter-tabs button {
    flex: 1 1 0;
  }

  .activity-map {
    grid-template-columns: minmax(0, 1fr) minmax(170px, 0.5fr);
  }
}

@media (max-width: 560px) {
  .directory-header,
  .directory-shell {
    width: min(100% - 20px, 1240px);
  }

  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .watchlist-grid {
    grid-template-columns: 1fr;
  }

  .activity-map {
    grid-template-columns: 1fr;
  }

  .competition-card {
    min-height: 0;
  }

  .card-topline,
  .card-action {
    align-items: flex-start;
    flex-direction: column;
  }

  .card-facts div {
    grid-template-columns: 1fr;
  }

  .card-facts dd {
    text-align: left;
  }
}

@keyframes activity-ball-spin {
  from {
    transform: rotateX(-13deg) rotateY(0deg);
  }

  to {
    transform: rotateX(-13deg) rotateY(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .activity-ball {
    animation: none;
    transform: rotateX(-13deg) rotateY(-24deg);
  }
}

.directory-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  width: min(100% - 32px, 1240px);
  margin: 0 auto;
  padding: 18px 0 32px;
  border-top: 1px solid var(--line);
}

.directory-footer a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.directory-footer a:hover,
.directory-footer a:focus-visible {
  text-decoration: underline;
}
