.tkr-rotation {
  --tkr-border: #d8dee6;
  --tkr-text: #182230;
  --tkr-muted: #667085;
  --tkr-panel: #ffffff;
  --tkr-soft: #f6f8fb;
  position: relative;
  box-sizing: border-box;
  color: var(--tkr-text);
  font-family: inherit;
  margin: 24px 0;
}

.tkr-rotation *,
.tkr-rotation *::before,
.tkr-rotation *::after {
  box-sizing: border-box;
}

.tkr-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.tkr-header h2 {
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 6px;
  letter-spacing: 0;
}

.tkr-header p {
  color: var(--tkr-muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.tkr-badge {
  border: 1px solid var(--tkr-border);
  border-radius: 999px;
  color: #344054;
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1;
  padding: 8px 10px;
  white-space: nowrap;
}

.tkr-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
}

.tkr-chart-wrap {
  background: var(--tkr-panel);
  border: 1px solid var(--tkr-border);
  border-radius: 8px;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.tkr-chart {
  height: var(--tkr-chart-height, 620px);
  min-height: 360px;
  width: 100%;
}

.tkr-side {
  align-self: stretch;
  background: var(--tkr-soft);
  border: 1px solid var(--tkr-border);
  border-radius: 8px;
  padding: 14px;
}

.tkr-legend {
  display: grid;
  gap: 10px;
}

.tkr-legend span {
  align-items: center;
  color: #344054;
  display: flex;
  font-size: 13px;
  gap: 8px;
  line-height: 1.3;
}

.tkr-legend i {
  border-radius: 4px;
  display: inline-block;
  height: 12px;
  width: 12px;
}

.tkr-q-leading {
  background: #2f9e44;
}

.tkr-q-weakening {
  background: #d59f0f;
}

.tkr-q-lagging {
  background: #d9480f;
}

.tkr-q-improving {
  background: #1c7ed6;
}

.tkr-note {
  border-top: 1px solid var(--tkr-border);
  color: var(--tkr-muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 14px 0 0;
  padding-top: 12px;
}

.tkr-bg {
  opacity: 0.1;
}

.tkr-bg-leading {
  fill: #2f9e44;
}

.tkr-bg-weakening {
  fill: #d59f0f;
}

.tkr-bg-lagging {
  fill: #d9480f;
}

.tkr-bg-improving {
  fill: #1c7ed6;
}

.tkr-grid {
  stroke: #d0d5dd;
  stroke-width: 1;
}

.tkr-axis-main {
  stroke: #475467;
  stroke-dasharray: 4 4;
  stroke-width: 1.3;
}

.tkr-axis-text,
.tkr-axis-label,
.tkr-quadrant-label {
  fill: #667085;
  font-size: 11px;
  letter-spacing: 0;
}

.tkr-axis-label {
  font-weight: 600;
}

.tkr-quadrant-label {
  font-size: 12px;
  font-weight: 700;
}

.tkr-tail {
  fill: none;
  opacity: 0.58;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

.tkr-dot {
  opacity: 0.7;
  stroke: #ffffff;
  stroke-width: 1.2;
}

.tkr-dot-current {
  cursor: pointer;
  opacity: 1;
  stroke-width: 1.6;
}

.tkr-point-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 3px;
}

.tkr-tooltip {
  background: rgba(16, 24, 40, 0.94);
  border-radius: 8px;
  color: #ffffff;
  font-size: 12px;
  left: 0;
  line-height: 1.45;
  max-width: 220px;
  padding: 10px 12px;
  pointer-events: none;
  position: absolute;
  top: 0;
  z-index: 5;
}

.tkr-tooltip strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.tkr-table-wrap {
  border: 1px solid var(--tkr-border);
  border-radius: 8px;
  margin-top: 14px;
  max-width: 100%;
  overflow-x: auto;
}

.tkr-table {
  border-collapse: collapse;
  font-size: 13px;
  min-width: 620px;
  width: 100%;
}

.tkr-table th,
.tkr-table td {
  border-bottom: 1px solid #edf0f5;
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}

.tkr-table th {
  background: #f8fafc;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.tkr-table tr:last-child td {
  border-bottom: 0;
}

.tkr-quadrant-cell {
  font-weight: 700;
}

.tkr-leading {
  color: #2f9e44;
}

.tkr-weakening {
  color: #b77900;
}

.tkr-lagging {
  color: #d9480f;
}

.tkr-improving {
  color: #1c7ed6;
}

.tkr-error {
  background: #fff4f2;
  border: 1px solid #f4b4a8;
  border-radius: 8px;
  color: #912018;
  margin: 20px 0;
  padding: 12px 14px;
}

@media (max-width: 780px) {
  .tkr-header {
    display: block;
  }

  .tkr-badge {
    display: inline-block;
    margin-top: 12px;
    white-space: normal;
  }

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

  .tkr-side {
    padding: 12px;
  }

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

  .tkr-chart {
    min-height: 420px;
  }
}
