:root {
  color-scheme: light;
  --page: #eef3f8;
  --ink: #172338;
  --muted: #52627a;
  --soft: rgba(255, 255, 255, 0.72);
  --softer: rgba(255, 255, 255, 0.42);
  --line: rgba(101, 120, 146, 0.2);
  --blue: #123f8c;
  --blue-strong: #0a2c66;
  --blue-soft: #dce7f8;
  --teal: #08a88a;
  --coral: #ef6b45;
  --amber: #f4a51c;
  --panel: rgba(252, 254, 255, 0.9);
  --shadow: 0 22px 70px rgba(43, 65, 93, 0.2);
  --shadow-soft: 0 12px 36px rgba(43, 65, 93, 0.13);
  --overlay-gap: clamp(1rem, 2vw, 2rem);
  --overlay-bottom: 1.35rem;
  --timeline-width: 23rem;
  --left-rail: calc(var(--timeline-width) + (var(--overlay-gap) * 2));
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  background:
    linear-gradient(90deg, rgba(247, 250, 253, 0.96) 0, rgba(247, 250, 253, 0.96) var(--left-rail), rgba(247, 250, 253, 0) calc(var(--left-rail) + 6rem)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(237, 244, 249, 0.62) 34%, rgba(226, 234, 241, 0.7)),
    linear-gradient(115deg, #f5f1e7 0%, #eef4f9 42%, #d9e7f4 100%);
  color: var(--ink);
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(23, 35, 56, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 35, 56, 0.04) 1px, transparent 1px);
  background-size: 3.5rem 3.5rem;
  opacity: 0.55;
}

button {
  font: inherit;
}

.app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.globe-stage {
  position: fixed;
  z-index: 0;
  inset: 0 0 0 var(--left-rail);
  overflow: hidden;
}

.globe-stage::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -10rem;
  width: 16rem;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(238, 243, 248, 0.94), rgba(238, 243, 248, 0));
  z-index: 1;
}

.page-header {
  position: absolute;
  z-index: 12;
  top: 1rem;
  left: var(--left-rail);
  right: 0;
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  padding: 0 var(--overlay-gap);
  text-align: center;
  pointer-events: none;
}

.page-header > div {
  min-width: 0;
}

.brand-mark {
  display: none;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background: linear-gradient(135deg, #0a1833, #123f8c 58%, #08a88a);
  box-shadow: 0 16px 32px rgba(34, 69, 120, 0.2);
  color: white;
  font-size: 0.94rem;
  font-weight: 850;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  position: relative;
  display: inline-block;
  color: #10264b;
  font-size: clamp(2rem, 3.3vw, 3.95rem);
  line-height: 1.05;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 18px rgba(255, 255, 255, 0.95),
    0 8px 30px rgba(255, 255, 255, 0.78),
    0 16px 44px rgba(10, 44, 102, 0.22);
}

h1::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -0.42rem;
  height: 0.18rem;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(10, 44, 102, 0.92) 18%, rgba(8, 168, 138, 0.82) 50%, rgba(10, 44, 102, 0.92) 82%, transparent);
  box-shadow:
    0 0 14px rgba(255, 255, 255, 0.95),
    0 0 18px rgba(10, 44, 102, 0.22);
}

.page-header p {
  max-width: 42rem;
  margin: 0.72rem auto 0;
  color: #40516d;
  font-size: clamp(0.95rem, 1.2vw, 1.16rem);
  line-height: 1.45;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85),
    0 0 16px rgba(255, 255, 255, 0.92),
    0 8px 26px rgba(255, 255, 255, 0.75);
}

.header-stats {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  justify-content: center;
  gap: 0.55rem;
  margin: 0.85rem auto 0;
  pointer-events: auto;
}

.header-stats div {
  display: grid;
  min-width: 8.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.58rem 0.8rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(43, 65, 93, 0.12);
  text-align: left;
}

.header-stats div:last-child {
  min-width: 14rem;
}

.header-stats dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.header-stats dd {
  margin: 0.18rem 0 0;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 800;
}

h2 {
  color: #152b50;
  font-size: 1.35rem;
  line-height: 1.1;
}

.eyebrow {
  margin-bottom: 0.3rem;
  color: var(--blue-strong);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.controls,
.timeline-panel,
.selection-card,
.legend,
.status,
.map-tools {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(1.3);
}

.controls {
  display: flex;
  gap: 0.25rem;
  border-radius: 10px;
  padding: 0.25rem;
  pointer-events: auto;
}

.control-button {
  min-height: 2rem;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 0.56rem;
  background: transparent;
  color: #254d7f;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.control-button:hover,
.control-button:focus-visible {
  border-color: rgba(18, 63, 140, 0.42);
  background: rgba(255, 255, 255, 0.44);
  outline: none;
}

.control-button.is-active {
  border-color: rgba(18, 63, 140, 0.5);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 10px 22px rgba(18, 63, 140, 0.14);
  color: #173262;
}

.search-field {
  display: grid;
  gap: 0.35rem;
  pointer-events: auto;
}

.search-field span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search-field input {
  width: 100%;
  min-height: 2.45rem;
  border: 1px solid rgba(82, 98, 122, 0.22);
  border-radius: 8px;
  padding: 0 0.8rem;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  font: inherit;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.search-field input:focus {
  border-color: rgba(18, 63, 140, 0.56);
  box-shadow: 0 0 0 3px rgba(18, 63, 140, 0.13);
}

.globe {
  position: absolute;
  inset: 0;
}

.globe::before {
  content: "";
  position: absolute;
  inset: 7% 5% 1% 5%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.26) 44%, transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.globe canvas {
  display: block;
  filter: saturate(1.08) brightness(1.12) contrast(0.98);
  opacity: 1;
}

.timeline-panel {
  position: absolute;
  left: var(--overlay-gap);
  top: var(--overlay-gap);
  bottom: var(--overlay-bottom);
  z-index: 8;
  display: flex;
  width: var(--timeline-width);
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(252, 254, 255, 0.94);
}

.timeline-header {
  display: grid;
  gap: 0.85rem;
  flex: 0 0 auto;
  padding: 1.1rem 1.1rem 1rem;
  border-bottom: 1px solid rgba(101, 120, 146, 0.16);
}

.timeline {
  min-height: 0;
  overflow-y: auto;
  padding: 0.75rem 0.65rem 1rem;
  scrollbar-color: rgba(18, 63, 140, 0.54) rgba(255, 255, 255, 0.28);
}

.month-group {
  margin-top: 0.5rem;
}

.month-label {
  position: sticky;
  z-index: 2;
  top: -0.75rem;
  margin: 0 -0.65rem 0.35rem;
  padding: 0.58rem 1rem 0.32rem;
  background: rgba(252, 254, 255, 0.9);
  color: var(--blue-strong);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1.9rem minmax(0, 1fr);
  gap: 0.72rem;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  margin: 0;
  padding: 0.72rem 0.75rem 0.72rem 0.55rem;
  background: rgba(255, 255, 255, 0.36);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.timeline-item:hover,
.timeline-item:focus-visible,
.timeline-item.is-active {
  border-color: rgba(18, 63, 140, 0.22);
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 12px 26px rgba(43, 65, 93, 0.1);
  outline: none;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 1.5rem;
  top: 2.25rem;
  bottom: -0.55rem;
  width: 2px;
  background: rgba(18, 63, 140, 0.18);
}

.timeline-item:last-child::before {
  display: none;
}

.event-mark {
  position: relative;
  z-index: 1;
  width: 1rem;
  height: 1rem;
  margin: 0.18rem auto 0;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
}

.event-deadline .event-mark {
  background: var(--coral);
  box-shadow: 0 0 14px rgba(239, 107, 69, 0.48);
}

.event-conference .event-mark {
  background: var(--teal);
  box-shadow: 0 0 15px rgba(8, 168, 138, 0.42);
}

.event-body {
  min-width: 0;
}

.event-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.22rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.event-date {
  color: var(--blue-strong);
  white-space: nowrap;
}

.event-deadline .event-date {
  color: #bd4d2f;
}

.event-title {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  min-width: 0;
}

.event-title strong {
  color: #17315a;
  overflow-wrap: anywhere;
  font-size: 0.98rem;
}

.event-title span {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.event-place {
  display: block;
  margin-top: 0.22rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.event-importance {
  display: block;
  width: 3.9rem;
  height: 0.3rem;
  margin-top: 0.5rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(18, 63, 140, 0.13);
}

.event-importance span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

.selection-card {
  position: absolute;
  z-index: 9;
  right: var(--overlay-gap);
  bottom: var(--overlay-bottom);
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 1.05rem;
  width: min(34rem, calc(100vw - var(--left-rail) - (var(--overlay-gap) * 2)));
  border-radius: 14px;
  padding: 1rem;
  color: #17315a;
  box-shadow: 0 18px 46px rgba(15, 28, 45, 0.18);
}

.selection-art {
  min-height: 8rem;
  border-radius: 9px;
  background:
    linear-gradient(rgba(18, 63, 140, 0.1), rgba(18, 63, 140, 0.3)),
    linear-gradient(135deg, rgba(18, 63, 140, 0.22), rgba(255, 255, 255, 0.42));
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.54);
}

.selection-content {
  min-width: 0;
}

.selection-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.3rem;
}

.selection-card h3 {
  color: var(--ink);
  font-size: 1.55rem;
  line-height: 1.08;
}

.selection-full-name {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  border-radius: 8px;
  padding: 0 0.65rem;
  background: rgba(18, 63, 140, 0.92);
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
}

.selection-meta {
  display: grid;
  gap: 0.38rem;
  margin-top: 0.65rem;
  color: #31547d;
  font-size: 0.9rem;
}

.selection-meta span {
  min-width: 0;
}

.selection-meta a {
  color: #0c66c5;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.url-row {
  display: block;
}

.conference-link {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  border: 1px solid rgba(18, 63, 140, 0.22);
  border-radius: 8px;
  margin-top: 0.25rem;
  padding: 0 0.7rem;
  background: rgba(18, 63, 140, 0.08);
  color: var(--blue-strong);
  font-weight: 750;
}

.conference-link:hover,
.conference-link:focus-visible {
  background: rgba(18, 63, 140, 0.14);
  outline: none;
}

.score-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.8rem;
  color: #31547d;
  font-size: 0.84rem;
}

.score-dots {
  display: inline-flex;
  gap: 0.28rem;
}

.score-dots i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(18, 63, 140, 0.24);
}

.score-dots i.is-filled {
  background: var(--teal);
  box-shadow: 0 0 8px rgba(8, 168, 138, 0.48);
}

.legend {
  position: absolute;
  z-index: 6;
  left: 4.1rem;
  bottom: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: min(38rem, calc(100% - 8rem));
  border-radius: 14px;
  padding: 0.95rem 1.2rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.legend-item span:last-child {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.legend-item strong {
  color: #17315a;
  font-size: 0.95rem;
}

.legend-item small {
  color: var(--muted);
  font-size: 0.78rem;
}

.legend-dot {
  width: 1.55rem;
  height: 1.55rem;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  flex: 0 0 auto;
}

.legend-dot-deadline {
  background: var(--coral);
  box-shadow: 0 0 18px rgba(239, 107, 69, 0.48);
}

.legend-dot-conference {
  background: var(--teal);
  box-shadow: 0 0 18px rgba(8, 168, 138, 0.42);
}

.status {
  position: absolute;
  z-index: 11;
  right: 1rem;
  bottom: 1rem;
  max-width: min(24rem, calc(100% - 2rem));
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.status.is-hidden {
  display: none;
}

.empty-state {
  padding: 1rem;
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 1180px) {
  :root {
    --timeline-width: 20rem;
  }
}

@media (max-height: 720px) and (min-width: 901px) {
  h1 {
    font-size: clamp(1.7rem, 2.7vw, 3rem);
  }

  .page-header p {
    display: none;
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .app-shell {
    min-height: 100vh;
    height: 100vh;
  }

  .globe {
    inset: 0;
  }

  .globe-stage {
    inset: 0;
  }

  .globe-stage::before {
    display: none;
  }

  .timeline-panel {
    top: auto;
    left: var(--overlay-gap);
    right: var(--overlay-gap);
    bottom: var(--overlay-gap);
    width: auto;
    height: min(38vh, 24rem);
  }

  .page-header {
    left: var(--overlay-gap);
    right: var(--overlay-gap);
    width: calc(100vw - 2rem);
    text-align: left;
    justify-items: start;
  }

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

  .selection-card {
    left: var(--overlay-gap);
    right: var(--overlay-gap);
    bottom: calc(min(38vh, 24rem) + (var(--overlay-gap) * 2));
    width: auto;
  }

  .legend {
    left: 1rem;
    right: 1rem;
    width: auto;
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding: 0;
  }

  h1 {
    font-size: 1.65rem;
    white-space: normal;
  }

  .page-header p {
    font-size: 0.88rem;
  }

  .brand-mark {
    width: 2.75rem;
    height: 2.75rem;
  }

  .controls {
    max-width: 100%;
    overflow-x: auto;
  }

  .selection-card {
    grid-template-columns: 1fr;
    bottom: calc(min(38vh, 24rem) + (var(--overlay-gap) * 1.75));
    max-height: 13rem;
    overflow: hidden;
  }

  .selection-art {
    display: none;
  }

  .legend {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
}
