.knowledge-dual-title {
  display: flex;
  align-items: center;
  gap: 0.22em;
  white-space: nowrap;
}

.knowledge-dual-title i {
  font-style: normal;
  opacity: 0.34;
}

.knowledge-dual-option {
  opacity: 0.34;
  transition: opacity 180ms ease, color 180ms ease;
}

.knowledge-dual-option.is-current {
  opacity: 1;
}

.app-rankings {
  --ranking-line: color-mix(in srgb, currentColor 14%, transparent);
  --ranking-muted: color-mix(in srgb, currentColor 58%, transparent);
  display: grid;
  gap: 18px;
  width: 100%;
  min-width: 0;
}

.app-rankings-header {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-end;
  padding: 24px 26px;
  border: 1px solid var(--ranking-line);
  border-radius: 24px;
  background: linear-gradient(135deg, color-mix(in srgb, #675bff 11%, transparent), transparent 48%), color-mix(in srgb, currentColor 3%, transparent);
}

.app-rankings-kicker {
  display: block;
  margin-bottom: 8px;
  font: 700 11px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.13em;
  color: #8b80ff;
}

.app-rankings-header h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 38px);
  letter-spacing: -0.04em;
}

.app-rankings-header p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--ranking-muted);
  line-height: 1.7;
}

.app-rankings-summary {
  display: grid;
  grid-template-columns: auto auto 1px auto auto;
  align-items: baseline;
  gap: 7px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.app-rankings-summary strong {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.app-rankings-summary span {
  color: var(--ranking-muted);
  font-size: 12px;
}

.app-rankings-summary i {
  width: 1px;
  height: 28px;
  margin: 0 7px;
  background: var(--ranking-line);
}

.app-ranking-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.app-ranking-switcher button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid var(--ranking-line);
  border-radius: 16px;
  color: inherit;
  background: color-mix(in srgb, currentColor 3%, transparent);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.app-ranking-switcher button:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, #786dff 56%, transparent);
}

.app-ranking-switcher button.is-active {
  border-color: #786dff;
  background: color-mix(in srgb, #786dff 17%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #786dff 30%, transparent);
}

.app-ranking-switcher span {
  font-weight: 700;
  font-size: 15px;
}

.app-ranking-switcher small {
  display: grid;
  place-items: center;
  min-width: 27px;
  height: 27px;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 8%, transparent);
  color: var(--ranking-muted);
}

.app-ranking-caption,
.app-ranking-source {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 0 4px;
  color: var(--ranking-muted);
  font-size: 12px;
}

.app-ranking-table-shell {
  overflow-x: auto;
  border: 1px solid var(--ranking-line);
  border-radius: 20px;
  background: color-mix(in srgb, currentColor 2%, transparent);
  scrollbar-width: thin;
}

.app-ranking-paywall {
  min-height: 390px;
  border-color: var(--ranking-line);
  border-radius: 20px;
  background: color-mix(in srgb, currentColor 2%, transparent);
}

.app-ranking-paywall .subscription-preview-content {
  gap: 0;
  padding: 0;
}

.app-ranking-paywall .app-ranking-table-shell {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.app-ranking-paywall .subscription-preview-cta {
  top: clamp(116px, 38vh, 390px);
  margin-top: 64px;
  margin-bottom: -222px;
}

.app-ranking-table {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
  table-layout: auto;
}

.app-ranking-table.is-compact {
  min-width: 880px;
}

.app-ranking-table th,
.app-ranking-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--ranking-line);
  text-align: left;
  vertical-align: middle;
}

.app-ranking-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-top: 12px;
  padding-bottom: 12px;
  background: color-mix(in srgb, var(--panel-solid) 94%, currentColor 6%);
  color: var(--ranking-muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.app-ranking-table thead small {
  display: block;
  margin-top: 2px;
  color: inherit;
  font-size: 9px;
  font-weight: 500;
}

.app-ranking-table tbody tr:last-child > * {
  border-bottom: 0;
}

.app-ranking-table tbody tr {
  transition: background 150ms ease;
}

.app-ranking-table tbody tr:hover {
  background: color-mix(in srgb, #786dff 7%, transparent);
}

.app-ranking-rank {
  width: 48px;
  color: var(--ranking-muted);
  text-align: center !important;
}

.app-ranking-rank span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: color-mix(in srgb, currentColor 6%, transparent);
  font: 700 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.app-ranking-table tbody tr:nth-child(-n + 3) .app-ranking-rank span {
  color: #fff;
  background: linear-gradient(135deg, #786dff, #bb65e9);
}

.app-ranking-product {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 172px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.app-ranking-logo {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 1px solid var(--ranking-line);
  border-radius: 12px;
  background: #fff;
  color: #47415f;
  font-size: 15px;
  font-weight: 800;
}

.app-ranking-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.app-ranking-category {
  display: inline-block;
  padding: 5px 8px;
  border: 1px solid var(--ranking-line);
  border-radius: 999px;
  color: var(--ranking-muted);
  font-size: 10px;
  white-space: nowrap;
}

.app-ranking-number,
.app-ranking-change {
  font: 600 12px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: nowrap;
}

.app-ranking-current {
  font-weight: 800;
}

.app-ranking-change.is-up { color: #36b77a; }
.app-ranking-change.is-down { color: #f06468; }
.app-ranking-change.is-flat { color: var(--ranking-muted); }

.app-ranking-trend {
  width: 132px;
}

.app-ranking-sparkline {
  display: block;
  width: 116px;
  height: 38px;
  overflow: visible;
}

.app-ranking-sparkline polyline {
  stroke: #786dff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-ranking-sparkline circle { fill: #a99fff; }
.app-ranking-sparkline.is-up polyline { stroke: #36b77a; }
.app-ranking-sparkline.is-up circle { fill: #36b77a; }
.app-ranking-sparkline.is-down polyline { stroke: #f06468; }
.app-ranking-sparkline.is-down circle { fill: #f06468; }

.app-ranking-sparkline-baseline {
  stroke: var(--ranking-line);
  stroke-width: 1;
}

.app-ranking-loading {
  display: grid;
  grid-template-columns: 1.1fr 1.6fr 1fr;
  gap: 12px;
  min-height: 420px;
}

.app-ranking-loading span {
  border-radius: 20px;
  background: linear-gradient(100deg, color-mix(in srgb, currentColor 4%, transparent) 20%, color-mix(in srgb, currentColor 10%, transparent) 42%, color-mix(in srgb, currentColor 4%, transparent) 64%);
  background-size: 220% 100%;
  animation: app-ranking-shimmer 1.4s linear infinite;
}

@keyframes app-ranking-shimmer {
  to { background-position-x: -220%; }
}

@media (max-width: 860px) {
  .knowledge-dual-title { flex-wrap: wrap; white-space: normal; }
  .app-rankings-header { align-items: flex-start; flex-direction: column; padding: 20px; }
  .app-rankings-summary { white-space: normal; }
  .app-ranking-switcher { grid-template-columns: 1fr; }
  .app-ranking-switcher button { min-height: 50px; }
  .app-ranking-caption, .app-ranking-source { flex-direction: column; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .app-ranking-loading span { animation: none; }
  .app-ranking-switcher button { transition: none; }
}
