.wechat-overview-card {
  --wechat-accent: #0f766e;
  order: 4;
  display: block;
  border-top: 3px solid var(--wechat-accent);
  color: var(--text, var(--ink));
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.wechat-overview-card:hover {
  transform: translateY(-2px);
  border-color: var(--wechat-accent);
  box-shadow: var(--shadow-card);
}

.wechat-overview-card.running {
  border-color: var(--signal);
}

.wechat-overview-card.login-expired,
.wechat-overview-card.login-expired:hover {
  --wechat-accent: #b91c1c;
  border-color: #b91c1c;
}

.wechat-overview-card .card-head > div {
  min-width: 0;
}

.wechat-card-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--wechat-accent);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0;
}

.wechat-login-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 13px;
  padding: 10px 11px;
  border: 1px solid rgba(185, 28, 28, 0.2);
  border-radius: 6px;
  background: rgba(185, 28, 28, 0.07);
  color: #991b1b;
}

.wechat-login-alert[hidden] {
  display: none;
}

.wechat-login-alert-mark {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(185, 28, 28, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
}

.wechat-login-alert-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.wechat-login-alert-copy strong,
.wechat-login-alert-copy small {
  display: block;
  overflow-wrap: anywhere;
}

.wechat-login-alert-copy strong {
  font-size: 12px;
  font-weight: 750;
}

.wechat-login-alert-copy small {
  margin-top: 2px;
  color: #b91c1c;
  font-size: 10.5px;
  line-height: 1.45;
}

.wechat-login-alert-action {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.wechat-overview-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.wechat-overview-metrics div {
  min-width: 0;
  padding: 12px 9px;
}

.wechat-overview-metrics div + div {
  border-left: 1px solid var(--line);
}

.wechat-overview-metrics span,
.wechat-task-head span {
  display: block;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
}

.wechat-overview-metrics strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
}

.wechat-task-block {
  padding-top: 14px;
}

.wechat-task-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.wechat-task-head strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-task-progress {
  height: 7px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(36, 27, 20, 0.08);
}

.wechat-task-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--wechat-accent);
  transition: width 400ms ease;
}

.wechat-overview-card.running .wechat-task-progress span {
  background: var(--signal);
}

.wechat-account-progress-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.wechat-account-progress-block[hidden] {
  display: none;
}

.wechat-account-progress-head,
.wechat-account-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wechat-account-progress-head span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
}

.wechat-account-progress-head strong {
  color: var(--wechat-accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.wechat-account-progress {
  height: 5px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(36, 27, 20, 0.08);
}

.wechat-account-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--wechat-accent);
  transition: width 400ms ease;
}

.wechat-account-progress.indeterminate span {
  width: 32%;
  animation: wechat-account-progress 1.5s ease-in-out infinite;
}

.wechat-account-progress-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.wechat-account-progress-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.wechat-task-meta,
.wechat-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11.5px;
}

.wechat-task-meta span,
.wechat-card-foot span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.wechat-card-foot {
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--wechat-accent);
  font-weight: 650;
}

.wechat-card-foot b {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 15px;
}

.wechat-overview-card .state-pill.warn {
  border-color: rgba(185, 118, 19, 0.2);
  background: var(--warn-soft);
  color: var(--warn);
}

.wechat-overview-card .state-pill.bad {
  border-color: rgba(185, 28, 28, 0.18);
  background: rgba(185, 28, 28, 0.09);
  color: #b91c1c;
}

@media (max-width: 480px) {
  .wechat-overview-metrics div {
    padding-inline: 7px;
  }

  .wechat-overview-metrics strong {
    font-size: 15px;
  }

  .wechat-task-head,
  .wechat-task-meta,
  .wechat-account-progress-head,
  .wechat-account-progress-meta {
    gap: 8px;
  }

  .wechat-login-alert {
    align-items: flex-start;
  }

  .wechat-login-alert-action {
    display: none;
  }
}

@keyframes wechat-account-progress {
  from {
    transform: translateX(-110%);
  }

  to {
    transform: translateX(320%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wechat-overview-card,
  .wechat-task-progress span,
  .wechat-account-progress span {
    transition: none;
  }

  .wechat-account-progress.indeterminate span {
    animation: none;
  }
}
