.mrm-root {
  position: fixed;
  inset: 0;
  z-index: 10050;
  pointer-events: none;
}

.mrm-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 4, 10, 0.62);
  backdrop-filter: blur(6px);
  pointer-events: auto;
  cursor: pointer;
}

.mrm-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(100vw, 460px);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(165deg, rgba(18, 24, 38, 0.96) 0%, rgba(8, 12, 22, 0.98) 100%);
  border-left: 1px solid rgba(120, 150, 200, 0.14);
  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.45);
  border-radius: 18px 0 0 18px;
  overflow: hidden;
}

.mrm-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mrm-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.72);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.mrm-close:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.mrm-header__copy {
  flex: 1;
  min-width: 0;
}

.mrm-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.94);
  letter-spacing: -0.01em;
}

.mrm-subtitle {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.48);
}

.mrm-body {
  flex: 1;
  overflow: auto;
  padding: 18px 22px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.mrm-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mrm-section__title {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.88);
}

.mrm-section__head .mrm-section__title {
  margin-bottom: 0;
}

.mrm-section__icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.mrm-section__icon--info {
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
}

.mrm-section__icon--eye {
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
}

.mrm-section__icon--eye svg {
  width: 14px;
  height: 14px;
}

.mrm-link-muted {
  font-size: 0.78rem;
  color: #60a5fa;
  white-space: nowrap;
}

.mrm-copy {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.62);
}

.mrm-copy--muted {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.8rem;
}

.mrm-factor-hint {
  flex: 0 0 auto;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.42);
  max-width: 42%;
  text-align: left;
  line-height: 1.3;
}

.mrm-current {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mrm-current__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.mrm-current__eyebrow {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.48);
}

.mrm-current__caption {
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.mrm-badge {
  align-self: flex-start;
  margin-top: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 650;
}

.mrm-tone--positive .mrm-badge,
.mrm-badge.mrm-tone--positive {
  background: rgba(74, 222, 128, 0.12);
  color: #86efac;
}

.mrm-tone--neutral .mrm-badge,
.mrm-badge.mrm-tone--neutral {
  background: rgba(251, 191, 36, 0.14);
  color: #fcd34d;
}

.mrm-tone--negative .mrm-badge,
.mrm-badge.mrm-tone--negative {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

.mrm-ring {
  position: relative;
  flex: 0 0 auto;
}

.mrm-ring--lg {
  width: 112px;
  height: 112px;
}

.mrm-ring--sm {
  width: 88px;
  height: 88px;
}

.mrm-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.mrm-ring__track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 5;
}

.mrm-ring__fill {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
}

.mrm-ring__label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: rgba(255, 255, 255, 0.92);
}

.mrm-ring__label strong {
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 700;
}

.mrm-ring--sm .mrm-ring__label strong {
  font-size: 1.05rem;
}

.mrm-ring__label span {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.42);
}

.mrm-factors {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mrm-factor__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.mrm-factor__name {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.78);
}

.mrm-factor__score {
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.46);
}

.mrm-factor__bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mrm-factor__bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.mrm-factor__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.35s ease;
}

.mrm-factor.mrm-tone--positive .mrm-factor__bar i {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.85), #4ade80);
}

.mrm-factor.mrm-tone--neutral .mrm-factor__bar i {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.85), #fbbf24);
}

.mrm-factor.mrm-tone--negative .mrm-factor__bar i {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.85), #f87171);
}

.mrm-factor-trend {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.mrm-factor-trend--up {
  color: #4ade80;
}

.mrm-factor-trend--down {
  color: #f87171;
}

.mrm-factor-trend--flat {
  color: #fbbf24;
}

.mrm-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 16px 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  background:
    linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.mrm-summary-card__copy strong {
  display: block;
  font-size: 0.95rem;
  color: #fcd34d;
  margin-bottom: 6px;
}

.mrm-summary-card__copy p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.58);
}

.mrm-summary-card__icon {
  flex: 0 0 auto;
  color: rgba(252, 211, 77, 0.85);
}

.mrm-summary-card.mrm-tone--positive {
  border-color: rgba(74, 222, 128, 0.22);
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.mrm-summary-card.mrm-tone--positive .mrm-summary-card__copy strong {
  color: #86efac;
}

.mrm-summary-card.mrm-tone--negative {
  border-color: rgba(248, 113, 113, 0.22);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.mrm-summary-card.mrm-tone--negative .mrm-summary-card__copy strong {
  color: #fca5a5;
}

@media (max-width: 520px) {
  .mrm-panel {
    width: 100vw;
    border-radius: 0;
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mrm-panel,
  .mrm-backdrop {
    transition: none !important;
    animation: none !important;
  }
}

/* /indicators — IndicatorDecisionReadingModal visual overrides only */

.idrm-root .mrm-backdrop {
  background: rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
}

.idrm-root .mrm-panel {
  width: clamp(420px, 28vw, 460px);
  max-width: 460px;
  box-shadow: -14px 0 52px rgba(0, 0, 0, 0.34);
}

.idrm-root .mrm-header {
  padding: 20px 22px 16px;
}

.idrm-root .mrm-body {
  padding: 22px 22px 24px;
  gap: 24px;
}

.idrm-root .mrm-section__title {
  margin-bottom: 12px;
}

.idrm-root .mrm-copy {
  line-height: 1.8;
}

.idrm-root .mrm-copy--muted {
  line-height: 1.7;
}

.idrm-root .mrm-current {
  padding: 16px 18px;
  gap: 18px;
}

.idrm-root .mrm-factors {
  gap: 14px;
}

.idrm-root .mrm-factor__head {
  margin-bottom: 7px;
}

.idrm-root .mrm-summary-card {
  padding: 18px 18px 18px 20px;
}

.idrm-root .mrm-summary-section {
  padding-bottom: 4px;
}

@media (max-width: 520px) {
  .idrm-root .mrm-panel {
    width: 100vw;
    max-width: 100vw;
  }

  .idrm-root .mrm-body {
    padding: 20px 20px 22px;
    gap: 22px;
  }
}

