/* RadioMonitor — tableaux de bord airplay */
.rm-insights {
  --rm-accent: 255, 179, 0;
  --rm-cyan: 48, 214, 210;
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid rgba(var(--rm-accent), 0.2);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 95% 0%, rgba(var(--rm-accent), 0.14), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(var(--rm-cyan), 0.09), transparent 31%),
    linear-gradient(145deg, rgba(26, 25, 32, 0.98), rgba(12, 12, 17, 0.99));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  isolation: isolate;
}

.rm-insights::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}

.rm-insights__heading,
.rm-panel__header,
.rm-metric-card__top,
.rm-ranking__line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.rm-insights__heading {
  align-items: flex-end;
  margin-bottom: 28px;
}

.rm-insights__heading h2 {
  max-width: 820px;
  margin: 8px 0 6px;
  color: #fff;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  letter-spacing: -0.035em;
}

.rm-insights__heading p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
}

.rm-insights__eyebrow,
.rm-panel__kicker {
  color: rgb(var(--rm-accent));
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.rm-insights__eyebrow i {
  margin-right: 7px;
}

.rm-insights__freshness {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(73, 216, 145, 0.22);
  border-radius: 999px;
  color: rgba(255, 255, 255, .78);
  background: rgba(73, 216, 145, 0.07);
  font-size: .74rem;
  font-weight: 700;
  white-space: nowrap;
}

.rm-insights__freshness > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #49d891;
  box-shadow: 0 0 0 5px rgba(73, 216, 145, .12);
  animation: rm-live-pulse 2.2s infinite;
}

@keyframes rm-live-pulse {
  50% { box-shadow: 0 0 0 9px rgba(73, 216, 145, 0); }
}

.rm-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.rm-metric-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .022));
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.rm-metric-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--rm-accent), .28);
  background: linear-gradient(145deg, rgba(var(--rm-accent), .085), rgba(255, 255, 255, .025));
}

.rm-metric-card__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: rgb(var(--rm-accent));
  background: rgba(var(--rm-accent), .12);
}

.rm-metric-card > strong {
  display: block;
  overflow: hidden;
  margin-top: 19px;
  color: #fff;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.055em;
  line-height: 1;
  text-overflow: ellipsis;
}

.rm-metric-card__label {
  display: block;
  margin-top: 9px;
  color: rgba(255, 255, 255, .86);
  font-size: .88rem;
  font-weight: 700;
}

.rm-metric-card small {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: rgba(255, 255, 255, .48);
  font-size: .72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rm-trend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
}

.rm-trend--up {
  color: #71e1a9;
  background: rgba(73, 216, 145, .1);
}

.rm-trend--down {
  color: #ff858c;
  background: rgba(255, 91, 103, .1);
}

.rm-trend--neutral {
  color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .07);
}

.rm-insights__details {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, .85fr);
  gap: 14px;
  margin-top: 14px;
}

.rm-panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 18px;
  background: rgba(255, 255, 255, .032);
}

.rm-panel__header {
  align-items: flex-start;
}

.rm-panel__header h3 {
  margin: 4px 0 0;
  color: #fff;
  font-size: 1.05rem;
}

.rm-panel__legend {
  color: rgba(255, 255, 255, .48);
  font-size: .7rem;
  white-space: nowrap;
}

.rm-panel__legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 3px;
  background: rgb(var(--rm-accent));
}

.rm-bar-chart {
  display: grid;
  grid-template-columns: repeat(30, minmax(3px, 1fr));
  align-items: end;
  height: 210px;
  margin-top: 25px;
  padding-top: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, .055) 0,
    rgba(255, 255, 255, .055) 1px,
    transparent 1px,
    transparent 25%
  );
}

.rm-bar-chart__item {
  position: relative;
  display: flex;
  height: 100%;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  flex-direction: column;
}

.rm-bar-chart__bar {
  width: clamp(3px, 56%, 13px);
  height: var(--rm-bar-height);
  min-height: 1px;
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(to top, rgba(var(--rm-accent), .48), rgb(var(--rm-accent)));
  box-shadow: 0 0 16px rgba(var(--rm-accent), .08);
  transition: height .35s ease, filter .2s ease;
}

.rm-bar-chart__item:hover .rm-bar-chart__bar {
  filter: brightness(1.22);
}

.rm-bar-chart__value {
  position: absolute;
  bottom: calc(var(--rm-bar-height) + 6px);
  opacity: 0;
  padding: 3px 5px;
  border-radius: 5px;
  color: #111;
  background: rgb(var(--rm-accent));
  font-size: .62rem;
  font-weight: 900;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity .15s ease, transform .15s ease;
  white-space: nowrap;
}

.rm-bar-chart__item:hover .rm-bar-chart__value {
  opacity: 1;
  transform: translateY(0);
}

.rm-bar-chart__label {
  position: absolute;
  bottom: -22px;
  color: rgba(255, 255, 255, .38);
  font-size: .58rem;
  white-space: nowrap;
}

.rm-ranking {
  display: grid;
  gap: 15px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.rm-ranking li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
}

.rm-ranking__position {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 9px;
  color: rgb(var(--rm-accent));
  background: rgba(var(--rm-accent), .1);
  font-size: .72rem;
  font-weight: 900;
}

.rm-ranking__body,
.rm-ranking__line {
  min-width: 0;
}

.rm-ranking__line a,
.rm-ranking__line strong {
  overflow: hidden;
  color: rgba(255, 255, 255, .9);
  font-size: .8rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rm-ranking__line a:hover {
  color: rgb(var(--rm-accent));
}

.rm-ranking__line b {
  flex: 0 0 auto;
  color: #fff;
  font-size: .76rem;
  font-variant-numeric: tabular-nums;
}

.rm-ranking__body small {
  display: block;
  overflow: hidden;
  margin: 2px 0 6px;
  color: rgba(255, 255, 255, .42);
  font-size: .65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rm-ranking__track {
  display: block;
  overflow: hidden;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .07);
}

.rm-ranking__track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgb(var(--rm-accent)), rgb(var(--rm-cyan)));
}

.rm-panel__empty {
  margin: 30px 0 10px;
  color: rgba(255, 255, 255, .5);
  font-size: .8rem;
}

.rm-insights__method {
  display: flex;
  gap: 8px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, .4);
  font-size: .68rem;
  line-height: 1.5;
}

.rm-insights__method i {
  margin-top: 2px;
  color: rgba(var(--rm-accent), .75);
}

.rm-streaming-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.rm-streaming-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .045);
  font-size: .75rem;
  font-weight: 750;
  transition: border-color .2s ease, transform .2s ease, color .2s ease;
}

.rm-streaming-links a:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--primary-1), .5);
  color: rgb(var(--primary-1));
}

@media (max-width: 991px) {
  .rm-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rm-insights__details {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575px) {
  .rm-insights {
    padding: 20px 14px;
    border-radius: 18px;
  }

  .rm-insights__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .rm-metric-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .rm-metric-card,
  .rm-panel {
    padding: 15px;
  }

  .rm-metric-card > strong {
    font-size: 1.7rem;
  }

  .rm-metric-card__label {
    font-size: .75rem;
  }

  .rm-bar-chart {
    height: 180px;
  }

  .rm-panel__legend {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rm-insights__freshness > span,
  .rm-metric-card,
  .rm-bar-chart__bar {
    animation: none;
    transition: none;
  }
}

