/* Release Map — first 28 days launch dashboard */

.rm-body-wrap {
  display: flex;
  gap: 0;
  align-items: flex-start;
  position: relative;
}

.rm-main {
  flex: 1;
  min-width: 0;
  transition: padding-right 0.22s ease;
}

.rm-panel.filters-open .rm-main {
  padding-right: 340px;
}

.rm-filters-drawer {
  position: fixed;
  top: 1rem;
  right: 0;
  bottom: 0;
  width: 320px;
  z-index: 40;
  overflow: auto;
  padding: 0.6rem 0.85rem 1.25rem;
  box-sizing: border-box;
  transform: translateX(0);
  transition: transform 0.22s ease;
  background: rgba(4, 10, 18, 0.96);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px 0 0 0;
}

.rm-filters-drawer.collapsed {
  transform: translateX(110%);
}

.rm-ai-dock {
  position: fixed;
  right: 0.85rem;
  bottom: 1.35rem;
  z-index: 42;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.rm-ai-dock .ai-sparkle-btn {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.rm-filters-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.rm-filter-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rm-filter-label-sm {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.rm-filter-hint {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #64748b;
}

.rm-filter-label {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: #94a3b8;
}

.rm-range-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: -0.35rem 0 0.75rem;
  padding: 0.35rem 0.55rem 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.08);
  font-size: 0.78rem;
  color: #7dd3fc;
}

.rm-range-label {
  font-weight: 500;
}

.rm-range-clear {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rm-range-clear:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.rm-compare-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
}

.rm-compare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 0.55rem;
}

.rm-compare-controls .deep-source-select {
  width: 100%;
}

.rm-compare-main {
  display: none !important;
}

.rm-vs {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.08em;
}

.rm-drawer-backdrop {
  display: none;
}

.rm-compare-grid {
  grid-template-columns: repeat(2, 1fr) !important;
}

.rm-compare-kpi .rm-compare-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.rm-compare-a { color: #f472b6; }
.rm-compare-b { color: #38bdf8; }
.rm-vs-mini {
  font-size: 0.65rem;
  color: #64748b;
  font-weight: 600;
}

.rm-panel {
  padding: 0.25rem 0 2rem;
  max-width: 100%;
  overflow-x: hidden;
}

.rm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  transition: padding-right 0.22s ease;
}

@media (min-width: 769px) {
  .rm-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem 0.75rem;
    flex-wrap: nowrap;
  }

  .rm-hero-head {
    flex: none;
    margin: 0;
    min-width: 0;
    max-width: 100%;
  }

  .rm-head-actions {
    justify-self: end;
    align-self: center;
  }
}

.rm-panel.filters-open .rm-head {
  padding-right: 332px;
}

.rm-panel.filters-collapsed .rm-head {
  padding-right: 0;
}

.rm-head-left {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  min-width: 0;
}

.rm-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.rm-head-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.rm-track-select {
  min-width: 12rem;
}

.rm-hero-head {
  min-width: 0;
  margin-bottom: 0;
  padding: 0.7rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rm-hero-head .rm-hero-art {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.rm-hero-head .rm-hero-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.rm-hero-head .rm-hero-meta h2 {
  font-size: 1.05rem;
  margin: 0 0 0.12rem;
}

.rm-hero-head .rm-hero-meta p {
  font-size: 0.78rem;
  margin: 0;
}

.rm-hero-head .rm-hero-badge {
  display: none !important;
}

.rm-learning-case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.rm-case-btn {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.rm-case-btn:hover:not(:disabled) {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.55);
  color: #bbf7d0;
}

.rm-case-btn:disabled,
.rm-case-btn[aria-disabled="true"] {
  opacity: 0.42;
  cursor: not-allowed;
  color: #94a3b8;
}

.rm-case-btn.is-ready {
  border-color: rgba(34, 197, 94, 0.45);
  color: #bbf7d0;
}

.rm-case-btn-report.is-ready {
  background: rgba(34, 197, 94, 0.14);
}

.rm-case-report-modal {
  position: fixed;
  inset: 0;
  z-index: 1210;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0.75rem;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(5px);
}

.rm-case-report-modal.hidden {
  display: none !important;
}

.rm-case-report-shell {
  width: min(980px, 100%);
  max-height: calc(100vh - 1.5rem);
  display: flex;
  flex-direction: column;
  background: #020617;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.rm-case-report-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.95);
}

.rm-case-report-toolbar h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 1.05rem;
}

.rm-case-report-status {
  margin: 0.25rem 0 0;
  color: #94a3b8;
  font-size: 0.78rem;
}

.rm-case-report-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rm-case-report-body {
  overflow: auto;
  padding: 0.4rem 0.6rem 1.2rem;
}

.rm-report-article {
  color: #e2e8f0;
  padding: 0.75rem 0.85rem 1.2rem;
}

.rm-report-hero {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.rm-report-cover {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.rm-report-article h1 {
  margin: 0.15rem 0 0.35rem;
  font-size: 1.35rem;
  color: #f8fafc;
}

.rm-report-article h2 {
  margin: 1.35rem 0 0.55rem;
  font-size: 1.02rem;
  color: #bbf7d0;
}

.rm-report-hero-human {
  display: flex;
  gap: 0.95rem;
  align-items: flex-start;
  margin-bottom: 1.1rem;
}

.rm-report-name {
  font-size: 1.45rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.15;
}

.rm-report-daytag {
  margin-top: 0.2rem;
  color: #94a3b8;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rm-report-verdict {
  margin-top: 0.45rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #86efac;
}

.rm-report-hero-phrase {
  margin: 0.55rem 0 0;
  color: #cbd5e1;
  font-size: 0.98rem;
  line-height: 1.45;
  max-width: 42rem;
}

.rm-report-story-card,
.rm-report-turning,
.rm-report-mech {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  margin: 0.4rem 0;
}

.rm-report-story-range,
.rm-report-turning-title,
.rm-report-mech-title {
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.25rem;
}

.rm-report-story-card p,
.rm-report-turning p,
.rm-report-mech p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.4;
  font-size: 0.9rem;
}

.rm-report-mech.good {
  border-color: rgba(34, 197, 94, 0.35);
}

.rm-report-mech.warn {
  border-color: rgba(251, 191, 36, 0.35);
}

.rm-report-insight,
.rm-report-takeaway {
  background: rgba(34, 197, 94, 0.1);
  border-left: 3px solid rgba(34, 197, 94, 0.75);
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  color: #dcfce7;
  line-height: 1.45;
}

.rm-report-lessons {
  margin: 0.25rem 0 0.7rem 1.1rem;
  padding: 0;
  color: #e2e8f0;
}

.rm-report-lessons li {
  margin: 0.35rem 0;
  line-height: 1.4;
}

.rm-report-advisor {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  color: #cbd5e1;
}

.rm-report-advisor summary {
  cursor: pointer;
  font-weight: 650;
  color: #e2e8f0;
}

.rm-report-advisor-body {
  margin-top: 0.55rem;
  font-size: 0.88rem;
  line-height: 1.4;
}

.rm-report-advisor-fix {
  color: #fde68a;
}

.rm-report-article h3 {
  margin: 0.9rem 0 0.35rem;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.rm-report-kicker {
  margin: 0;
  color: #4ade80;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rm-report-meta,
.rm-report-muted {
  color: #94a3b8;
  font-size: 0.8rem;
}

.rm-report-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.rm-report-kpi {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 0.65rem 0.7rem;
}

.rm-report-kpi-label {
  font-size: 0.7rem;
  color: #94a3b8;
}

.rm-report-kpi-value {
  margin-top: 0.15rem;
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
}

.rm-report-chart {
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  padding: 0.45rem;
  margin: 0.35rem 0 0.85rem;
}

.rm-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.rm-report-table th,
.rm-report-table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  padding: 0.4rem 0.3rem;
  text-align: left;
  vertical-align: top;
}

.rm-report-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.rm-report-lead {
  background: rgba(34, 197, 94, 0.1);
  border-left: 3px solid rgba(34, 197, 94, 0.7);
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  color: #dcfce7;
}

.rm-report-learn {
  color: #cbd5e1;
  font-style: italic;
}

.rm-report-conclusion {
  font-size: 0.98rem;
  line-height: 1.5;
  color: #f1f5f9;
}

.rm-report-guarantee {
  color: #86efac;
  font-weight: 600;
  font-size: 0.85rem;
}

.rm-report-digest {
  display: grid;
  gap: 0.35rem;
  margin: 0.55rem 0;
}

.rm-report-digest-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  font-size: 0.8rem;
  color: #cbd5e1;
}

.rm-report-article ul {
  margin: 0.2rem 0 0.7rem 1.1rem;
  padding: 0;
}

.rm-report-article li {
  margin: 0.28rem 0;
  line-height: 1.4;
}

@media (max-width: 800px) {
  .rm-report-kpis,
  .rm-report-cols {
    grid-template-columns: 1fr 1fr;
  }
  .rm-case-report-toolbar {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .rm-report-kpis,
  .rm-report-cols {
    grid-template-columns: 1fr;
  }
}

.rm-case-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(4px);
}

.rm-case-modal.hidden {
  display: none !important;
}

.rm-case-modal-box {
  width: min(560px, 100%);
  max-height: min(80vh, 640px);
  overflow: auto;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  padding: 1rem 1.1rem 1.05rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.rm-case-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.rm-case-modal-head h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #f8fafc;
}

.rm-case-modal-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.35rem;
}

.rm-case-modal-sub {
  margin: 0 0 0.75rem;
  color: #94a3b8;
  font-size: 0.78rem;
}

.rm-case-modal-body {
  white-space: pre-wrap;
  color: #e2e8f0;
  font-size: 0.9rem;
  line-height: 1.45;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  padding: 0.85rem 0.9rem;
}

.rm-case-modal-lines {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  font-size: 0.8rem;
  line-height: 1.4;
}

.rm-case-modal-lines div + div {
  margin-top: 0.35rem;
}

.rm-case-modal-foot {
  margin: 0.75rem 0 0;
  color: #86efac;
  font-size: 0.75rem;
  line-height: 1.35;
}

.rm-panel.filters-open .rm-head .deep-rail-toggle {
  display: none;
}

.rm-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rm-hero-art {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: #374151;
  flex-shrink: 0;
}

.rm-hero-meta h2 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  font-weight: 600;
}

.rm-hero-meta p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.88rem;
}

.rm-hero-badge {
  display: inline-flex;
  margin-top: 0.45rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.rm-day-strip-wrap {
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  margin-bottom: 1rem;
  max-width: 100%;
  padding: 2px 0;
  cursor: crosshair;
  touch-action: pan-x;
  user-select: none;
  -webkit-user-select: none;
}

.rm-day-strip-wrap.rm-day-strip-brushing {
  cursor: col-resize;
  touch-action: none;
}

.rm-day-strip-wrap::-webkit-scrollbar {
  display: none;
}

.rm-day-strip {
  display: flex;
  gap: 0.35rem;
  width: max-content;
  padding: 0.15rem 0;
}

.rm-day-btn {
  flex: 0 0 auto;
  min-width: 3.1rem;
  min-height: 4.35rem;
  border: 2px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: #94a3b8;
  padding: 0.35rem 0.55rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  box-sizing: border-box;
}

.rm-day-btn span {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  color: #64748b;
  margin-top: 0.15rem;
}

.rm-day-btn.has-data {
  color: #e2e8f0;
}

.rm-day-btn.active {
  border-color: rgba(56, 189, 248, 0.85);
  background: rgba(56, 189, 248, 0.12);
  color: #fff;
  /* Always-visible selection frame (survives has-advice gradient + fri/mon underline). */
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
  z-index: 1;
}

.rm-day-btn.rm-day-in-range:not(.active) {
  border-color: rgba(56, 189, 248, 0.28);
  background: rgba(56, 189, 248, 0.06);
}

.rm-day-btn.rm-day-out-range {
  opacity: 0.32;
}

.rm-day-btn.has-advice {
  border: 2px solid transparent;
  background:
    rgba(255, 255, 255, 0.03) padding-box,
    linear-gradient(135deg, #f472b6, #c084fc, #38bdf8) border-box;
  background-clip: padding-box, border-box;
  -webkit-background-clip: padding-box, border-box;
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.18);
}

.rm-day-btn.has-advice::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f472b6, #38bdf8);
  box-shadow: 0 0 6px rgba(167, 139, 250, 0.85);
  pointer-events: none;
}

.rm-day-btn.has-advice.active {
  border: 2px solid transparent;
  background:
    rgba(56, 189, 248, 0.14) padding-box,
    linear-gradient(135deg, #f472b6, #c084fc, #38bdf8) border-box;
  background-clip: padding-box, border-box;
  -webkit-background-clip: padding-box, border-box;
  color: #fff;
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35), 0 0 10px rgba(167, 139, 250, 0.22);
  z-index: 1;
}

.rm-day-btn.future {
  opacity: 0.45;
  pointer-events: none;
}

.rm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  font-family: 'Inter', system-ui, sans-serif;
}

.rm-kpi {
  position: relative;
  background: linear-gradient(145deg, rgba(11, 28, 40, 0.95), rgba(6, 14, 22, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: 10px;
  padding: 0.5rem 0.55rem 0.45rem;
  min-width: 0;
  min-height: 4.6rem;
  overflow: hidden;
  font-family: inherit;
}

.rm-kpi-corner-note {
  position: absolute;
  top: 0.28rem;
  right: 0.35rem;
  max-width: 48%;
  font-size: 0.58rem;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #64748b;
  text-align: right;
  pointer-events: auto;
  cursor: help;
  z-index: 1;
}

.rm-kpi:has(.rm-triple-stack),
.rm-kpi:has(.rm-ga-compare) {
  min-height: 5.4rem;
}

.rm-kpi-compare-stack {
  position: relative;
  grid-column: span 2;
  min-height: 9rem;
  padding: calc(0.5rem + 5px) 0.55rem calc(0.55rem + 5px);
  font-family: inherit;
}

.rm-ga-compare-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}

.rm-ga-header-a,
.rm-ga-header-b {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rm-ga-header-a {
  color: #00cb25;
  text-align: left;
}

.rm-ga-header-b {
  color: #dc0004;
  text-align: right;
}

.rm-ga-header-title {
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}

.rm-kpi-compare-stack .rm-kpi-value {
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
}

.rm-kpi-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 400;
  letter-spacing: 0;
  margin-bottom: 0.2rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rm-kpi-value {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.25;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}

.rm-kpi-sub {
  font-size: 0.56rem;
  color: #64748b;
  margin-top: 0.1rem;
  line-height: 1.2;
}

.rm-triple-stack {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-top: 0.08rem;
}

.rm-triple-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
  line-height: 1.2;
}

.rm-triple-tag {
  flex: 0 0 auto;
  min-width: 1.75rem;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: #64748b;
}

.rm-triple-val {
  flex: 1 1 auto;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 400;
  color: #e2e8f0;
  letter-spacing: 0;
}

.rm-triple {
  display: block;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.3;
  white-space: normal;
}

.rm-triple-sep {
  display: none;
}

.rm-ga-compare-legend {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
  font-size: 0.5rem;
  line-height: 1.15;
}

.rm-ga-legend-a,
.rm-ga-legend-b {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rm-ga-legend-a { color: #4ade80; text-align: left; }
.rm-ga-legend-b { color: #f87171; text-align: right; }

.rm-ga-compare {
  display: flex;
  flex-direction: column;
  gap: 0.68rem;
  margin-top: 0;
  padding-bottom: 2px;
}

.rm-ga-compare-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 0.45rem;
}

.rm-ga-side {
  display: flex;
  align-items: center;
  min-width: 0;
}

.rm-ga-side-left {
  justify-content: flex-start;
  gap: 14px;
}

.rm-ga-side-right {
  justify-content: flex-end;
  gap: 14px;
}

.rm-ga-side-left .rm-ga-bar-zone {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 10px;
  box-sizing: border-box;
}

.rm-ga-side-right .rm-ga-bar-zone {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 10px;
  box-sizing: border-box;
}

.rm-ga-val {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.rm-ga-val-left {
  text-align: left;
  color: #00cb25;
}

.rm-ga-val-right {
  text-align: right;
  color: #dc0004;
}

.rm-ga-label {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 400;
  color: #e2e8f0;
  letter-spacing: 0;
  white-space: nowrap;
  text-align: center;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  padding: 0 0.1rem;
}

.rm-ga-bar-zone {
  position: relative;
  height: 2px;
  display: flex;
  align-items: center;
}

.rm-ga-bar-zone-left {
  justify-content: flex-end;
}

.rm-ga-bar-zone-right {
  justify-content: flex-start;
}

.rm-ga-bar-zone::before {
  display: none;
}

.rm-ga-bar {
  position: relative;
  z-index: 1;
  display: block;
  height: 2px;
  min-width: 0;
  width: 0;
  border-radius: 0;
  transition: width 0.22s ease;
}

.rm-ga-bar-on {
  min-width: 2px;
}

.rm-ga-bar-left {
  background: #00cb25;
}

.rm-ga-bar-right {
  background: #dc0004;
}

/* Hide repetitive window legend on all but the first KPI card */
.rm-kpi-grid > .rm-kpi .rm-kpi-sub {
  display: none;
}

.rm-kpi-grid > .rm-kpi:first-child .rm-kpi-sub {
  display: block;
}

.rm-kpi-dual-sub {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  margin-top: 0.2rem;
  font-size: 0.72rem;
}

.rm-kpi-dual-sub .ads {
  color: #f9a8d4;
  font-weight: 500;
}

.rm-kpi-dual-sub .all {
  color: #64748b;
}

.rm-dual-ads {
  color: #f9a8d4;
}

.rm-dual-sep {
  color: #475569;
  margin: 0 0.15rem;
}

.rm-dual-all {
  color: #94a3b8;
}

.rm-kpi-value.good { color: #4ade80; }
.rm-kpi-value.warn { color: #fbbf24; }
.rm-kpi-value.bad { color: #f87171; }

.rm-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.rm-chart-card {
  background: linear-gradient(145deg, rgba(11, 28, 40, 0.95), rgba(6, 14, 22, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: 14px;
  padding: 0.85rem 0.85rem 0.65rem;
  min-width: 0;
}

.rm-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  min-width: 0;
}

.rm-chart-card h3 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #e2e8f0;
  min-width: 0;
}

.rm-chart-head .rm-mode-toggle {
  flex-shrink: 0;
}

.rm-chart-wrap {
  position: relative;
  height: 190px;
}

.rm-chart-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: pan-y;
}

.rm-chart-wrap canvas.rm-chart-brushing {
  cursor: col-resize;
  touch-action: none;
}

.rm-chart-wrap .deep-chart-tooltip .tip-value {
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 0.1rem;
}

.rm-chart-playlists-card {
  grid-column: 1 / -1;
  margin-bottom: 1rem;
}

.rm-playlist-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.rm-type-toggle {
  display: inline-flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.rm-type-toggle .deep-mode-btn {
  border: none;
  border-radius: 0;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
}

.rm-type-toggle .deep-mode-btn + .deep-mode-btn {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.rm-chart-wrap-playlists {
  height: 440px;
}

.rm-playlist-note {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.rm-playlist-legend {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.rm-playlist-legend .rm-pl-legend-item {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  border-radius: 12px;
  padding: 0.55rem 0.65rem 0.5rem;
  min-width: 76px;
  max-width: 96px;
  text-align: center;
  gap: 0.4rem;
}

.rm-playlist-legend .rm-pl-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.rm-playlist-legend .rm-pl-thumb-fallback {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  display: inline-block;
}

.rm-playlist-legend .rm-pl-label {
  font-size: 0.68rem;
  line-height: 1.25;
  color: #cbd5e1;
  word-break: break-word;
}

.rm-playlist-table-wrap {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rm-pl-table-title-bar {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #e2e8f0;
}

.rm-pl-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.rm-pl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.rm-pl-table thead tr {
  background: rgba(255, 255, 255, 0.04);
}

.rm-pl-table th {
  padding: 0.55rem 0.75rem;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rm-pl-table th.num,
.rm-pl-table td.num {
  text-align: right;
  white-space: nowrap;
}

.rm-pl-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  vertical-align: middle;
}

.rm-pl-table tbody tr:last-child td {
  border-bottom: none;
}

.rm-pl-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.04);
}

.rm-pl-col-rank,
.rm-pl-table-rank {
  width: 2rem;
  color: #64748b;
  font-weight: 600;
  font-size: 0.72rem;
}

.rm-pl-table-name-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.rm-pl-table-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.rm-pl-table-thumb-fallback {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
  display: inline-block;
}

.rm-pl-table-name-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.rm-pl-table-title {
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.25;
}

.rm-pl-table-author {
  font-size: 0.68rem;
  color: #64748b;
}

.rm-pl-table-streams {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #7dd3fc;
}

.rm-pl-share-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  min-width: 5.5rem;
}

.rm-pl-share-val {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #a7f3d0;
}

.rm-pl-share-bar {
  display: block;
  width: 100%;
  max-width: 88px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.rm-pl-share-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.55), rgba(74, 222, 128, 0.75));
}

.rm-pl-table-foot {
  margin: 0.5rem 0 0;
  font-size: 0.68rem;
  color: #64748b;
}

.rm-milestone-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.rm-milestone-marker {
  position: absolute;
  top: 2px;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  background: rgba(6, 14, 22, 0.92);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  cursor: help;
  pointer-events: auto;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
}

.rm-milestone-marker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rm-milestone-marker .rm-milestone-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.62rem;
  font-weight: 700;
  color: #0f172a;
}

.rm-milestone-marker:hover {
  border-color: rgba(255, 255, 255, 0.65);
  transform: translateX(-50%) scale(1.06);
}

.rm-day-pl-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0 auto 0.2rem;
  flex-shrink: 0;
}

.rm-day-pl-icon {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Friday = Release Radar · Monday = Discovery Weekly */
.rm-day-btn.rm-day-fri {
  box-shadow: inset 0 -3px 0 rgba(96, 165, 250, 0.85);
}

.rm-day-btn.rm-day-mon {
  box-shadow: inset 0 -3px 0 rgba(250, 204, 21, 0.85);
}

.rm-day-btn.rm-day-fri.rm-day-mon {
  background-image: linear-gradient(90deg, rgba(96, 165, 250, 0.85) 50%, rgba(250, 204, 21, 0.85) 50%);
  background-size: 100% 3px;
  background-repeat: no-repeat;
  background-position: bottom;
  box-shadow: none;
}

.rm-segment-bars {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.65rem;
  background: rgba(255, 255, 255, 0.06);
}

.rm-segment-bars span {
  display: block;
  height: 100%;
}

.rm-seg-active { background: #4ade80; }
.rm-seg-programmed { background: #a78bfa; }
.rm-seg-editorial { background: #38bdf8; }

.rm-segment-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.55rem;
  font-size: 0.72rem;
  color: #94a3b8;
}

.rm-segment-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 0.3rem;
  vertical-align: middle;
}

.rm-empty {
  text-align: center;
  padding: 2.5rem 1.25rem;
  color: #94a3b8;
}

.rm-empty h3 {
  margin: 0 0 0.5rem;
  color: #e2e8f0;
}

.rm-demo-banner {
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  font-size: 0.82rem;
  color: #c4b5fd;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.28);
  text-align: center;
}

.rm-status {
  min-height: 1.25rem;
  margin-bottom: 0.75rem;
}

.rm-panel.filters-open .rm-head .deep-rail-toggle {
  display: none;
}

.rm-panel.filters-collapsed .deep-rail-toggle svg {
  transform: rotate(180deg);
}

@media (max-width: 900px) {
  .rm-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .rm-kpi {
    padding: 0.45rem 0.48rem 0.4rem;
    min-height: 4.9rem;
  }

  .rm-kpi:has(.rm-triple-stack),
  .rm-kpi:has(.rm-ga-compare) {
    min-height: 5.6rem;
  }

  .rm-kpi-compare-stack {
    min-height: 9.2rem;
  }

  .rm-ga-compare {
    gap: 0.62rem;
  }

  .rm-ga-header-a,
  .rm-ga-header-b,
  .rm-ga-header-title,
  .rm-ga-val,
  .rm-ga-label,
  .rm-kpi-label,
  .rm-kpi-value,
  .rm-triple-tag,
  .rm-triple-val {
    font-size: 11px;
  }

  .rm-ga-bar-zone,
  .rm-ga-bar {
    height: 2px;
  }

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

  .rm-chart-wrap {
    height: 160px;
  }

  .rm-head-actions {
    width: 100%;
  }

  .rm-track-select {
    flex: 1;
    max-width: none;
  }
}

@media (max-width: 1100px) {
  .rm-panel.filters-open .rm-main {
    padding-right: 0;
  }

  .rm-filters-drawer {
    width: min(100%, 340px);
  }
}

@media (max-width: 768px) {
  .rm-ai-dock {
    display: none !important;
  }

  .rm-panel {
    padding-bottom: 1.25rem;
  }

  .rm-head {
    margin-bottom: 0.65rem;
    flex-direction: column;
    align-items: stretch;
  }

  .rm-head-left {
    width: 100%;
    margin-bottom: 0;
    align-items: stretch;
  }

  .rm-title {
    display: none;
  }

  .rm-head-left .app-select-wrap,
  .rm-track-select {
    width: 100%;
    min-width: 0;
    max-width: none;
    display: block;
  }

  .rm-hero-head {
    width: 100%;
    margin: 0;
    order: 3;
  }

  .rm-head-actions {
    display: none;
  }

  .rm-panel.filters-open .rm-head .deep-rail-toggle {
    display: none;
  }

  .rm-drawer-backdrop.visible {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 39;
    background: rgba(0, 0, 0, 0.78);
  }

  /* Drawer только по body.rm-filters-open */
  .rm-filters-drawer {
    transform: translateX(110%);
  }

  body.rm-filters-open .rm-filters-drawer {
    transform: translateX(0);
  }

  .rm-filters-drawer {
    top: 1rem;
    height: calc(100dvh - 1rem);
    width: 100%;
    border-radius: 18px 18px 0 0;
    background: #060d16;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-left: none;
    padding: 0.6rem 7% 1.25rem 0.85rem;
  }

  .rm-filters-drawer .drawer-collapse-btn {
    padding: 0.6rem;
    margin-bottom: 0.15rem;
  }

  .rm-filters-drawer .drawer-collapse-btn svg {
    width: 20px;
    height: 20px;
  }

  .rm-hero-art {
    width: 56px;
    height: 56px;
  }

  .rm-hero-meta h2 {
    font-size: 1.15rem;
  }

  /* Playlist placements: no room for the title on mobile — controls own the row */
  #rm-chart-playlists-title {
    display: none;
  }

  .rm-playlist-controls {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .rm-playlist-controls .rm-type-toggle,
  .rm-playlist-controls .rm-mode-toggle {
    display: flex;
    flex: 1 1 auto;
  }

  .rm-playlist-controls .deep-mode-btn {
    flex: 1 1 0;
    text-align: center;
  }
}

.rm-ai-advisor-card {
  margin-bottom: 0.85rem;
}

.rm-ai-advisor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.rm-ai-advisor-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.rm-ai-advisor-meta {
  font-size: 0.72rem;
  margin-bottom: 0.55rem;
}

.rm-ai-advisor-panel {
  display: grid;
  gap: 0.65rem;
}

.rm-ai-advisor-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.rm-ai-advisor-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.rm-ai-advisor-badge.strong,
.rm-ai-advisor-badge.healthy {
  color: #86efac;
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.08);
}

.rm-ai-advisor-badge.mixed {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
}

.rm-ai-advisor-badge.weak,
.rm-ai-advisor-badge.critical {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
}

.rm-ai-advisor-block {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.rm-ai-advisor-block h4 {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rm-ai-advisor-block p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.rm-ai-advisor-signals {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: 1fr 1fr;
}

.rm-ai-advisor-signals ul {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.8rem;
  line-height: 1.4;
}

.rm-ai-advisor-warnings {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.rm-ai-advisor-warning {
  font-size: 0.7rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: #fde68a;
}

.rm-ai-advisor-loading {
  opacity: 0.7;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .rm-ai-advisor-signals {
    grid-template-columns: 1fr;
  }
}
